Retrieval & Data Entry

Vector databases, explained

Reviewed August 2026

TL;DR: A vector database stores embeddings - the numeric fingerprints of meaning that AI models produce - and answers one question extremely fast: which stored items are most similar to this one? That single capability powers semantic search, recommendations, and the retrieval half of RAG.

How it works

An embedding model turns text (or images, or audio) into a vector: a list of hundreds or thousands of numbers where similar meanings land close together. A vector database indexes those vectors so that a nearest-neighbor query - "find the 10 vectors closest to this one" - returns in milliseconds even across millions of items, using approximate algorithms like HNSW rather than brute-force comparison.

Most real systems pair vector similarity with traditional filters: fetch the nearest neighbors among documents this user can access, tagged 2026, in English. That combination - metadata filtering plus similarity - is where vector databases earn their keep over a bare index. Many also support hybrid search, blending keyword matching with semantic similarity so exact terms like product codes are not lost to fuzziness.

The practical decision is rarely exotic: if your data already lives in Postgres, an extension like pgvector is the proven default; dedicated engines earn their place at larger scale or when retrieval is the product itself.

Where it sits in the AI stack

The vector database is the storage layer of retrieval - downstream of embedding models, upstream of RAG:

Key tools and implementations

  • pgvector

    A Postgres extension adding vector types and similarity indexes to the database you already run.

  • Pinecone

    A fully managed vector database service built for large-scale, low-latency similarity search.

  • Qdrant

    An open-source vector engine with strong filtering, available self-hosted or as a managed cloud.

  • Chroma

    A lightweight open-source store popular for local development and smaller RAG projects.