Vector database
A vector database stores embeddings, the numerical representations of text, images or other data, and finds the stored items most similar to a query vector. It is the usual storage layer for semantic search and retrieval-augmented generation, where an AI system needs to look up relevant passages quickly.
Comparing a query against millions of vectors one by one would be slow, so vector databases use approximate nearest-neighbour indexes, such as HNSW graphs, to find close matches quickly at a small cost in accuracy. Most also store metadata alongside each vector, so results can be filtered by date, source, language or user permissions.
Why it matters: the vector store determines how fast, accurate and scalable a RAG or search feature can be, and whether access controls are respected at retrieval time. Options range from dedicated vector databases to vector search features added to existing databases and search engines; for many teams, using a database they already run is simpler than adding a new system.
Example: a legal team indexes its contract library as embeddings in a vector database; an assistant then retrieves the five most relevant clauses before drafting an answer.
Limits: retrieval quality depends more on how documents are chunked and embedded than on the database itself, and approximate search can occasionally miss the best match.
Related terms
Learn it step by step
Sources
- Efficient and robust approximate nearest neighbor search using Hierarchical Navigable Small World graphs. Malkov and Yashunin, arXiv, March 2016
- Billion-scale similarity search with GPUs. Johnson et al., arXiv, February 2017
Topic: AI fundamentals
Last updated