vector database
A vector database is a specialized database designed to store and quickly search numerical vector representations of data, called embeddings, enabling similarity-based search that finds conceptually related items rather than only exact keyword matches.
```flowchart
{
"rows": [
{ "type": "nodes", "items": [
{ "title": "Text, images, or other content converted to embeddings", "sub": "numerical vectors capturing meaning, not just exact words", "tone": "neutral" }
]},
{ "type": "arrow" },
{ "type": "group", "title": "Vector database stores and indexes these embeddings", "items": [
{ "title": "Specialized indexing for fast similarity search", "sub": "finds nearest vectors even across huge collections", "tone": "blue" }
]},
{ "type": "arrow" },
{ "type": "nodes", "items": [
{ "title": "Conceptually similar items retrieved quickly", "sub": "relevant results even without exact keyword overlap", "tone": "green" }
]}
]
}
```
**Vector databases exist because traditional databases are built to match exact values or keywords, but a huge number of useful search and retrieval tasks actually depend on finding conceptually similar content, which exact matching simply can't capture.** Since converting content like text or images into embeddings, numerical vectors that capture semantic meaning, allows conceptually similar items to end up numerically close to each other, a vector database is specifically built to store these embeddings and efficiently search for the nearest ones to a given query, even across enormous collections, enabling similarity-based retrieval that traditional keyword-matching databases can't provide.
```svg
```
```svg
```
| Aspect | Traditional keyword search | Vector database similarity search |
|---|---|---|
| Matching basis | Exact keyword or value overlap | Numerical closeness in meaning |
| Handles synonyms/paraphrasing | Poorly | Well |
| Query representation | Literal terms | Embedding vector |
| Common use | Structured, exact-match lookups | Semantic search, recommendation, retrieval |
**Vector databases rely on approximate nearest-neighbor search algorithms rather than exact nearest-neighbor search, since finding the truly closest vectors exactly becomes prohibitively slow at large scale.** Because searching for the mathematically exact nearest vectors among millions or billions of embeddings would be far too slow for practical use, vector databases instead use approximate nearest-neighbor algorithms, specialized indexing structures that trade a small amount of search accuracy for dramatically faster query performance at large scale.
**Vector databases have become a core infrastructure component for retrieval-augmented generation systems, where relevant documents need to be quickly retrieved based on their semantic similarity to a query.** Because retrieval-augmented generation systems need to quickly find document passages that are conceptually relevant to a given question, rather than ones that merely share exact keywords, vector databases have become a standard infrastructure piece for such systems, providing the fast similarity search needed to surface genuinely relevant supporting content.
**Vector database performance and result quality depend heavily on the quality of the embedding model used to generate the vectors in the first place, not just on the database's search capability.** Because a vector database can only search as meaningfully as the embeddings it's given allow, the choice of embedding model, which determines how well the resulting vectors actually capture semantic similarity, is just as important to overall system quality as the vector database's own indexing and search performance.
Read the vector database through a library-by-meaning lens: rather than a card catalog that only helps if you know a book's exact title or keyword, a vector database is more like a librarian who groups books by what they're actually about, so asking about one topic surfaces genuinely related books even if they don't share a single word in common.