AI term

What is Vector database?

A database optimized for storing and searching embeddings, commonly used to power RAG and semantic search in AI apps.

A vector database stores embeddings and finds the ones most similar to a query vector, fast, even across millions of entries. Regular databases match exact values or keywords; a vector database ranks results by distance in embedding space, which is how semantic search works. Under the hood, most use approximate nearest neighbor (ANN) indexes such as HNSW, trading a tiny amount of accuracy for large speed gains. Popular options include Pinecone, Weaviate, Qdrant, Milvus, and Chroma, and many general databases (Postgres via pgvector, Elasticsearch, MongoDB) now have vector search built in. Practical nuance: for small datasets (a few thousand documents) you often do not need a dedicated vector database at all; a library or a pgvector column is simpler and cheaper. Dedicated systems earn their keep at scale or when you need filtering plus vector search combined.

Example

A startup builds a "chat with your knowledge base" feature. Each document chunk is embedded and stored in a vector database; every user question is embedded too, and the top 5 closest chunks are pulled and fed to the LLM as context.

Why it matters

If you are evaluating RAG platforms or building AI search, the vector database determines retrieval speed, scale, and cost. Knowing that simpler options like pgvector exist can save you a whole extra vendor. Browse the AI tools directory or the model leaderboard to put it into practice.

Related AI terms

All 36 →