Vector database
Also called vector store, vector index.
A database built to store embeddings and quickly find the ones closest to a query vector.
Last updated
What it is.
A vector database stores embeddings alongside the original item and its metadata, and builds an index for nearest-neighbour search: given a query vector, return the most similar items fast. Most use approximate search, which trades a little accuracy for a lot of speed.
It can be a dedicated product or an extension to a database you already run, such as a vector type and index in PostgreSQL. Good systems also filter on metadata, such as customer, language or date, in the same query.
Why it matters
It is the retrieval engine behind most RAG and semantic search features. The choice affects cost, latency, how permissions are enforced and how much new infrastructure the team has to run.
Common mistakes.
- 01
Adding a new database before checking whether the one you have can do vector search well enough.
- 02
Filtering for permissions after the search, which can leak results or return too few.
- 03
No plan for re-indexing when documents change or the embedding model is replaced.
Work it out with a tool.
Related terms.
- Embedding (vector embedding)A list of numbers that represents the meaning of a piece of text, an image or other data, so that similar items have similar numbers.
- RAG (retrieval-augmented generation)A pattern that finds relevant passages from your own data and gives them to a language model along with the question, so it answers from your content.
- Fine-tuningTraining an existing model further on your own examples so it behaves the way you want, such as following a format, tone or task more reliably.
- LLM (large language model)An AI model trained on very large amounts of text that predicts the next piece of text, which lets it read, write and reason in language.
Guides and pages
Browse the full glossary or read answers to common questions.