What Is a Vector Database?
.avif)
A vector database is a database built to store and search data by meaning rather than by exact matches. It does this by holding embeddings — numerical representations of text, images, or other content, where similar items end up close together in a high-dimensional space. When you ask a vector database a question, it doesn't look for the exact words; it finds the items whose meaning is closest to your query. That capability is what makes modern AI applications — semantic search, recommendations, and especially RAG — possible, because they all depend on finding "the most relevant thing" rather than "the exact string."
Embeddings: the idea underneath
An embedding is a list of numbers (a vector) that captures the meaning of a piece of content. An embedding model turns "How do I reset my password?" and "I forgot my login" into vectors that sit near each other, even though they share almost no words — because they mean the same thing. Traditional databases can't do that: they match keywords. A vector database is designed around embeddings, so "close in meaning" becomes "close in the data."
How vector search works
- Embed your content. Run documents (or images, audio, etc.) through an embedding model to produce vectors, and store them.
- Embed the query. When a query comes in, embed it the same way.
- Find nearest neighbours. The database searches for the stored vectors closest to the query vector — using approximate nearest-neighbour (ANN) algorithms that make this fast even across millions of items.
- Return the most similar items — the content most relevant in meaning to the query.
The engineering trick is doing step 3 quickly at scale, which is exactly what vector databases are optimised for.
Why AI applications need one
- RAG. Retrieval-augmented generation retrieves the passages most relevant to a question and feeds them to an LLM. That retrieval is a vector search — no vector database, no RAG at scale.
- Semantic search. Search that understands intent ("affordable laptops for students") instead of matching keywords.
- Recommendations. Finding items similar to what a user liked, by meaning or behaviour.
- Deduplication and clustering. Grouping content that's similar even when it isn't identical.
Vector database vs traditional database
They're complementary, not rivals. A traditional (relational) database is built for structured data and exact queries — "find orders where status = shipped." A vector database is built for unstructured data and similarity — "find the documents most like this question." Many AI systems use both: the relational database for the system of record, the vector database for semantic retrieval. Some traditional databases now add vector search extensions, blurring the line for smaller workloads.
What to consider when choosing one
- Scale and latency — how many vectors, and how fast must search be?
- Filtering — can it combine similarity search with metadata filters (e.g. "similar, but only from this customer")?
- Freshness — how easily can you add and update vectors as your data changes?
- Operational fit — managed service vs self-hosted, and how it fits your existing stack.
The database is only one piece; retrieval quality also depends on chunking, the embedding model, and (often) a re-ranking step — see What Is RAG.
F. A. Q.
A database that stores data as embeddings — numeric representations of meaning — and finds results by similarity rather than exact matches, so it can return "the most relevant thing" to a query.
Because features like RAG, semantic search, and recommendations depend on finding content that's similar in meaning to a query, which is exactly what vector search does — and does fast at scale.
A regular database matches exact, structured queries; a vector database finds items similar in meaning using embeddings. They're often used together — one as the system of record, the other for semantic retrieval.
Numerical representations of content (text, images, etc.) where similar meanings produce similar vectors, allowing "closeness in meaning" to be measured as distance between numbers.