Tools & agents
Vector Database
Also known as: vector store
A database built to store embeddings and find items by meaning rather than exact keywords; the search engine behind RAG.
A vector database is a special kind of storage designed to search by meaning. Normal databases match exact words; a vector database can find the passage that means the same thing as your question, even if it uses completely different words. It is the piece that lets an AI assistant look things up in your own documents and answer from them.
A vector database stores embeddings, the numeric fingerprints of meaning, and is optimised to answer one question fast: "which stored items are closest in meaning to this one?" That makes it the retrieval engine behind RAG and semantic search.
How it is used
- Documents are split into chunks and turned into embeddings.
- The embeddings are stored (indexed) in the vector database.
- A user's question is embedded too.
- The database returns the chunks whose vectors are nearest, which are then given to the model.
Because comparing against millions of vectors exactly would be slow, these databases use approximate nearest-neighbour search to stay fast while remaining accurate enough.
A vector database indexes high-dimensional embedding vectors and serves approximate nearest-neighbour (ANN) queries under a similarity metric (cosine, dot product, Euclidean). Exact search is O(n) per query and infeasible at scale, so ANN indexes, graph-based (HNSW; Malkov & Yashunin 2018), quantisation-based (IVF-PQ), or hybrids, trade a controllable recall/latency budget for sub-linear query time.
Beyond the index, production systems add metadata filtering, hybrid retrieval (fusing dense vectors with lexical BM25), re-ranking, and CRUD/consistency guarantees. They are the substrate of RAG and of agent memory, but retrieval quality, not the store itself, usually determines end-to-end answer quality: chunking strategy, embedding-model fit, metric choice and the recall/precision operating point all matter. Options range from dedicated engines to vector extensions of general-purpose databases; the right choice depends on scale, latency targets and existing infrastructure.