Vector Database
A database purpose-built to store and query high-dimensional vector embeddings, enabling semantic similarity search at scale.
What Is Vector Database?
A vector database stores data as high-dimensional numerical vectors (embeddings) and provides efficient algorithms for finding the most similar vectors to a query vector. Unlike traditional SQL databases that filter by exact or range conditions, vector databases answer questions like "find the 10 most semantically similar documents to this query" — a nearest-neighbour search problem.
Under the hood, vector databases use approximate nearest-neighbour (ANN) algorithms such as HNSW (Hierarchical Navigable Small World) or IVF (Inverted File Index) to search billions of vectors in milliseconds. Leading solutions include Pinecone, Weaviate, Qdrant, Chroma, and Milvus, as well as pgvector for Postgres.
Why It Matters
Vector databases are the foundational infrastructure for semantic search and RAG systems. Without them, finding relevant context from millions of documents would be too slow to be practical. They are also essential for recommendation engines, duplicate detection, and multimodal search (searching text, images, and audio in the same space).
Real-World Examples
Semantic Document Search
Embed a company knowledge base as vectors. When a user asks a question, find the top-5 most relevant document chunks in milliseconds.
Product Recommendations
Represent products and user preferences as embeddings. The closest vectors are the best recommendations.