Skip to content

AI term · last reviewed 2026-07-07

Vector database

Also known as: Vector store

A vector database indexes and searches embeddings by similarity rather than exact match, using approximate nearest-neighbor algorithms; it is the retrieval layer behind semantic search and RAG.

How it works

A vector database is a datastore built to index and search embeddings by similarity rather than by exact match. Instead of "find rows where name equals X," you ask "find the vectors nearest to this query vector," and the database returns the closest matches using approximate nearest-neighbor (ANN) algorithms that stay fast at scale. Examples include Pinecone, Weaviate, Qdrant, Milvus, and pgvector (a Postgres extension). The core job is low-latency similarity search over millions or billions of vectors.

When it matters

A vector database matters whenever you build semantic search or a RAG pipeline, because it is the retrieval layer that finds relevant context for the model. The quality of retrieval (recall, latency, filtering) directly shapes answer quality. For many early apps a Postgres extension like pgvector is enough; dedicated vector databases earn their keep at larger scale or with heavier filtering and hybrid-search needs.

Common misconceptions

  • "You always need a dedicated vector database." For modest scale, pgvector or a library index is often sufficient.
  • "Vector search replaces keyword search." Hybrid (vector plus keyword) usually beats either alone.
  • "It stores your documents." It stores vectors and metadata; keep the source text in your primary store.

Related terms

← All terms