Vector database
A vector database stores embeddings and performs approximate nearest-neighbor search at scale, the persistence layer behind RAG and semantic search.
A vector database (or vector index) indexes high-dimensional embedding vectors using algorithms like HNSW, IVF, or ScaNN so you can find the top-k most similar vectors to a query in milliseconds even across millions of records. Managed options include Pinecone, Qdrant Cloud, Weaviate, Vespa, and Turbopuffer. Open-source self-hosted: Qdrant, Weaviate, Milvus, LanceDB. Postgres extensions like pgvector make it possible to keep vectors next to relational data. Choose based on filter-and-search needs, hybrid (vector + BM25) support, and operational profile.
When to use vector database
- Any production RAG system.
- Semantic search at >100k document scale.
- Personalization features driven by embedding similarity.
Common mistakes
- Picking a managed DB before validating the embedding model — DB swaps are cheap, embedding swaps are not.
- Forgetting hybrid (vector + keyword) — pure vector search misses exact-match queries.
FAQ
What is vector database?
A vector database stores embeddings and performs approximate nearest-neighbor search at scale, the persistence layer behind RAG and semantic search.
When should I use vector database?
Any production RAG system. Semantic search at >100k document scale. Personalization features driven by embedding similarity.
What are the most common mistakes with vector database?
Picking a managed DB before validating the embedding model — DB swaps are cheap, embedding swaps are not. Forgetting hybrid (vector + keyword) — pure vector search misses exact-match queries.
Related terms
- Embeddings — Embeddings are dense numeric vectors that represent the meaning of text, images, or other data, allowing similarity to be measured as vector distance.
- Retrieval-augmented generation (RAG) — Retrieval-augmented generation (RAG) injects relevant documents into the prompt at query time so the model answers from your data instead of its training memory.
- Semantic search — Semantic search finds documents by meaning rather than keyword match, using embedding similarity in a vector space.
Last updated: 2026-06-01. Raw markdown: https://promtable.com/glossary/vector-database.md.