The memory layer of AI - search by meaning, not keywords
Traditional databases search by exact match - 'find rows where city = Tokyo.' Vector databases search by meaning - 'find documents similar to this concept.' This semantic search is what powers RAG, recommendation engines, and AI memory.
The core idea: convert any data (text, images, audio) into high-dimensional vectors (embeddings), then find nearest neighbors in that space. Two sentences with similar meaning will have similar vectors, even if they share no words.
An embedding model converts data into dense vectors (typically 768-3072 dimensions). Each dimension captures a facet of meaning. Similar items cluster together.
Raw vector search is O(n) - too slow for millions of vectors. Index structures like HNSW (Hierarchical Navigable Small World) enable approximate nearest neighbor (ANN) search in milliseconds.
Given a query vector, find the k most similar vectors using cosine similarity, dot product, or Euclidean distance. Trade accuracy for speed with approximation.
Combine vector similarity with keyword filtering, metadata matching, and re-ranking. Best results come from mixing semantic and lexical search.
Retrieved results are re-ranked by a cross-encoder model for higher precision. This two-stage approach (retrieve broadly, rank precisely) balances speed and quality.
Managed vector DB, serverless, enterprise-grade, simple API
PostgreSQL extension - add vector search to your existing database
Open-source, hybrid search, built-in vectorization modules
Rust-based, high-performance, rich filtering, open-source
Developer-friendly, in-process, great for prototyping RAG apps
Cloud-native, GPU-accelerated, scales to billions of vectors
Vector search over web-scale indices for real-time AI search
Embedding-based music recommendations - find songs you'll love
Visual search - find similar pins using image embeddings
Semantic product search - find what customers mean, not just what they type
Key Takeaway
Vector databases are the bridge between AI models and real-world data. They enable search by meaning rather than keywords - turning every database into a knowledge base that AI can reason over.