Back to glossary

Term

Vector Database

A vector database stores embeddings as high-dimensional vectors and searches them by semantic similarity — the core infrastructure for RAG, semantic search, and recommendation systems.

Vector Database — explained

Instead of looking up records by exact keys or full-text indexes, a vector database compares points in vector space: two embeddings are “similar” when their distance (cosine, euclidean, dot product) is small. To make this work in milliseconds across millions of vectors, ANN indexes are used — Approximate Nearest Neighbor, typically HNSW or IVF — which avoid comparing every vector with every other and instead build a clever search structure.

Example / Practical context

In a RAG chatbot, documents are split (chunking), turned into embeddings, and stored in the vector database. For each question, the question itself is embedded, the top-k most similar chunks are retrieved, and handed to the LLM as context. Well-known systems include Pinecone, Qdrant, Weaviate, Milvus, and pgvector as a PostgreSQL extension.

A vector database is not a relational database — JOINs and transactions are not the focus, similarity search is. Full-text engines like Elasticsearch match tokens and exact terms; vector search also finds concepts whose surface words never appear in the text, as long as the meaning is close. Hybrid search combines both worlds.

Entdecke mehr

Themenuebersicht