Skip to main content

AI glossary Data & Retrieval

What is a vector database?

← All glossary terms
In short

A database built to store embeddings and return the stored vectors most similar to a query vector, quickly and at scale.

Explained

A vector database stores embeddings: lists of numbers that represent the meaning of a text, an image or another item. Given a query turned into an embedding, it returns the stored items whose vectors are closest, which usually means the most similar in meaning. To do this fast over millions of items it uses approximate nearest neighbour indexes such as HNSW, trading a small amount of accuracy for speed. It is a core building block of semantic search and retrieval-augmented generation (RAG), and most products also store metadata so results can be filtered by date, source or permission.

How it works

  • Each document, or chunk of a document, is turned into an embedding by an embedding model.
  • The vectors are stored with an index designed for nearest neighbour search, often a graph (HNSW) or a partitioned and compressed structure.
  • At query time the question is embedded with the same model and the index returns the closest vectors by a distance measure, such as cosine similarity.
  • Metadata filters narrow the results, for example to documents the user is allowed to see.

What it is used for

The main use today is retrieval for language model applications: finding the passages that a model should read before it answers. It is also used for semantic search over documents and products, recommendations, deduplication and finding similar images or cases.

The quality of the results depends as much on the embedding model and on how documents are split into chunks as on the database itself.

Dedicated vector database or a vector index in your current database?

  • Many relational and search databases now support vector columns and indexes, which avoids running another system.
  • A dedicated vector database can make sense with very large collections, high query volumes or advanced filtering and hybrid search needs.
  • Either way, permissions, updates and deletions have to stay in sync with the source systems, or the index will return stale or forbidden content.

Frequently asked questions

What is a vector database used for?

Mostly for finding items similar in meaning to a query: the relevant passages for a RAG assistant, related products, similar support cases or near-duplicate documents. It answers 'what is closest to this?' rather than 'what matches exactly?'.

What is the difference between a vector database and a relational database?

A relational database is built for exact matches, joins and transactions over structured rows. A vector database is built for approximate similarity search over high-dimensional vectors. Many relational databases now add vector indexes, so the line is blurring.

Do I need a vector database for RAG?

You need some form of vector search, but not necessarily a separate product. For moderate volumes, the vector features of an existing database or search engine are often enough. A dedicated one becomes worth it with scale, latency or filtering requirements.

What is an embedding in a vector database?

An embedding is the numeric vector a model produces for a piece of content, placed so that similar content ends up close together. The vector database stores these vectors and searches over them.

Is vector search accurate?

It is approximate by design: indexes trade a little recall for speed, and the results are only as good as the embedding model. For exact terms such as product codes or names, combining it with keyword search (hybrid search) usually works better.

Decision guides that use this term

How to put it to work

Where it shows up at Thinkia

Further reading

Sources

Updated: 2026-10-21

Want to see how this applies to your organisation?

Talk to an AI Expert