# Vector database

Category: [AI Search & GEO](https://seo-geo-glossary.com/en/glossary/category/ai-search-geo/) › [Retrieval & grounding](https://seo-geo-glossary.com/en/glossary/category/ai-search-geo/retrieval-grounding/)

A **vector database** stores embeddings, the number vectors that represent the meaning of text, images or audio, and retrieves the entries closest to a query. It ranks by similarity instead of by exact matches.

## How does a vector database work?

The usual sequence has four steps. A model converts the data into vectors, and the database stores and indexes them. A user query is converted by the same model into a vector. The database then compares that vector with the stored ones using a similarity measure such as cosine similarity or Euclidean distance. It returns the nearest entries, ranked by similarity. Many systems store metadata next to each vector so results can also be filtered, for example by language or date.

Comparing a query with millions of vectors one by one would be slow, so these systems use approximate nearest neighbor (ANN) indexes. They trade a small loss in accuracy for speed. Traditional databases handle exact queries on structured rows and columns, while vector databases handle similarity queries on embeddings. Some established databases now also offer vector search as a feature.

## What role does it play in RAG and AI search?

Vector databases are a common building block of retrieval-augmented generation (RAG). A system splits documents into passages, creates embeddings and stores them. For a question, it retrieves the closest passages and passes them to a language model as source material. For website owners this suggests that individual sections of a page can be retrievable on their own (assessment).

## Example

A help center with 5,000 articles is split into passages and stored as vectors. The question "How do I change my shipping address?" also finds a section titled "Edit delivery details", because both phrasings produce similar vectors. A plain keyword search could miss it.

## FAQ

**Is a vector database a SQL or NoSQL database?**
It is a separate category built for similarity search over vectors. Some SQL and NoSQL databases offer vector features, and dedicated products exist as well.

**Does every AI application need one?**
No. Whether an existing database with vector support is enough depends on data volume and requirements.

*Diagram: Meaning as closeness in space.* Made-up example. According to Google, points that sit close together in embedding space are more closely related than distant ones. Real embeddings often have 256, 512 or 1024 dimensions.

*Diagram: Retrieval-augmented generation.* In retrieval-augmented generation, the system first retrieves matching passages and passes them to the language model as context. Google calls the link between model output and verifiable sources grounding. The answer can only cite what was retrieved first (an inference from the method, not a Google statement).

## Related terms

- [Vector search](https://seo-geo-glossary.com/en/glossary/vector-search/index.md)
- [Embeddings](https://seo-geo-glossary.com/en/glossary/embeddings/index.md)
- [Retrieval-augmented generation (RAG)](https://seo-geo-glossary.com/en/glossary/retrieval-augmented-generation/index.md)
- [Semantic search](https://seo-geo-glossary.com/en/glossary/semantic-search/index.md)

## Sources

- [What is a vector database? - Google Cloud](https://cloud.google.com/discover/what-is-a-vector-database)
- [What is a vector database? - lakeFS (secondary source)](https://lakefs.io/blog/what-is-vector-databases/)
- [What is a vector embedding? - IBM Think](https://www.ibm.com/think/topics/vector-embedding)
- [What is vector search? - Elastic](https://www.elastic.co/what-is/vector-search)

---

Last updated: October 8, 2026
URL: https://seo-geo-glossary.com/en/glossary/vector-database/
