The Problem
Traditional databases are great for exact matches. But AI needs semantic similarity — finding "happy customer review" when you search for "positive feedback."
Embeddings: The Key Concept
An embedding is a vector (list of numbers) that captures the meaning of text. Similar meanings → similar vectors.
"I love this product" → [0.12, -0.34, 0.56, ...]
"This is amazing" → [0.11, -0.31, 0.58, ...] ← Very similar!
"It broke after 2 days" → [-0.45, 0.22, -0.11, ...] ← Different
How Vector Databases Work
- Ingest: Convert documents into embedding vectors
- Index: Build an efficient index (HNSW, IVF) for fast search
- Query: Convert search text to embedding, find nearest neighbors
Popular Options
| Database | Type | Best For |
|---|---|---|
| Pinecone | Managed | Quick start, no ops |
| Weaviate | Self-hosted/Managed | Production RAG |
| Qdrant | Self-hosted | High performance, Rust-based |
| pgvector | PostgreSQL ext | If you already use Postgres |
| Chroma | Embedded | Local dev, prototyping |
Do You Need One?
If you're building RAG — yes. But start simple: Chroma for prototyping, then migrate to Qdrant or pgvector for production.