---
title: Vector Database — AI Glossary
description: A vector database stores embeddings and retrieves them by similarity, using approximate nearest-neighbor search to find the vectors closest to a query vector quickly. It is the storage and search layer behind semantic search and retrieval-augmented generation, scaling similarity lookups to millions or billions of items.
canonical: https://prompeteer.ai/glossary/vector-database
---

# Vector Database

A vector database stores embeddings and retrieves them by similarity, using approximate nearest-neighbor search to find the vectors closest to a query vector quickly. It is the storage and search layer behind semantic search and retrieval-augmented generation, scaling similarity lookups to millions or billions of items.

## Definition

Once text or other data is turned into embeddings, those vectors need to be searched by closeness rather than exact match. A vector database indexes them with approximate nearest-neighbor algorithms — such as HNSW graphs — so that similarity queries run in sublinear time even over very large collections.

Vector databases typically add metadata filtering, hybrid keyword-plus-vector search, and persistence and scaling features on top of the core index. They are a standard component of RAG pipelines, holding the pre-computed document embeddings that retrieval draws on at query time.

## Sources

- [Malkov & Yashunin (2018), Efficient and robust approximate nearest neighbor search using HNSW](https://arxiv.org/abs/1603.09320)
- [OpenAI — Embeddings use cases (search and retrieval)](https://platform.openai.com/docs/guides/embeddings)

## Related terms

- [embedding](https://prompeteer.ai/glossary/embedding)
- [semantic-search](https://prompeteer.ai/glossary/semantic-search)
- [retrieval-augmented-generation](https://prompeteer.ai/glossary/retrieval-augmented-generation)
- [reranking](https://prompeteer.ai/glossary/reranking)
