The Wider Lens logoThe Wider Lens
← All topics

Advanced

What is a Vector Database?

Storage engineered for similarity search over embeddings.

A vector database stores embeddings and finds the nearest neighbors to a query vector in milliseconds — even across billions of items — using approximate nearest neighbor (ANN) indexes like HNSW or IVF.

Popular options include pgvector (Postgres extension), Qdrant, Weaviate, Pinecone, and Milvus. Choice depends on scale, filtering needs, and whether you want managed or self-hosted.

In a RAG pipeline, the vector DB is the retrieval layer: embed the user query, fetch the top-k similar chunks, and pass them to the LLM. Hybrid search (vectors + keywords) usually beats pure vector search.

Key points

  • ANN indexes enable millisecond similarity search
  • Options: pgvector, Qdrant, Weaviate, Pinecone, Milvus
  • The retrieval layer of RAG systems
  • Hybrid (vector + keyword) search works best