Danielle Hoopes6 pieces7 min
Vector Databases: Why Your AI App Actually Needs One (2026 Explainer)
Every AI app demo looks the same: "Chat with your docs!" "Ask questions about your codebase!" "Search your notes with natural language!"
And every one of those demos hits the same wall the moment it touches real data: your database has no idea what anything means. It can find the rows where title LIKE '%refund%'. It cannot find the support ticket that says "I want my money back."
That gap — between matching text and matching meaning — is the entire reason vector databases exist. Here's what they actually do, why regular databases can't fake it, and (honestly) when you can skip the dedicated one.
1 min read
Embeddings in 60 Seconds
An embedding model takes a piece of content — a sentence, a paragraph, an image — and turns it into a long list of numbers (a vector). Typically somewhere between 384 and 3,072 of them.
The magic property: content with similar meaning gets similar numbers. "I want my money back" and "requesting a refund" land close together in that number space. "I want my money back" and "great product, five stars" land far apart.
So "search by meaning" becomes a geometry problem: embed the query, then find the stored vectors closest to it. That's it. That's semantic search, and it's the backbone of RAG (retrieval-augmented generation) — the pattern behind basically every "chat with your data" product you've used.
The catch is in the words "find the closest."
1 min read
Why Your Regular Database Can't Do This
Regular databases are unbelievably good at exact answers. Indexes like B-trees work because data can be sorted: names alphabetically, dates chronologically. Walk the tree, find your row, done.
Vectors break that model completely. There's no meaningful way to "sort" points in 1,536-dimensional space so that similar meanings sit next to each other on disk. A B-tree can't help you.
Which leaves brute force: compare your query vector against every single stored vector, compute the distance, keep the closest ones. At 10,000 documents, fine — that's milliseconds. At 10 million, you're burning serious compute on every keystroke of a search box. At 100 million, your "AI-powered search" has a loading spinner.
Full-text search doesn't save you either. It's still keyword matching with better plumbing — stemming, ranking, typo tolerance. It will never connect "my dog is scratching a lot" to an article titled "Treating Flea Infestations in Pets," because no words overlap. The meaning does. Keywords don't.
2 min read
What a Vector Database Actually Does
A vector database is built around one job: approximate nearest neighbor (ANN) search — finding the closest vectors without checking all of them.
The dominant approach is an index called HNSW (Hierarchical Navigable Small World). Mental model: a multi-level highway system. The top level has a few long-distance connections that get you to roughly the right region fast. Each level down gets denser and more local, until you're on surface streets navigating to the exact closest neighbors. You check a tiny fraction of the data and still land on (nearly) the right answer.
The trade is in the word "approximate" — you might get the 10 nearly-closest matches instead of the exact 10. For semantic search, nobody can tell the difference, and it turns a scan of millions of vectors into a query that returns in single-digit milliseconds.
Around that core index, a good vector database also handles:
- Metadata filtering — "closest vectors where user_id = 123 and date > last month," which is genuinely tricky to do fast alongside ANN search
- Live updates — inserting and deleting vectors without rebuilding the index from scratch
- Compression — quantization tricks that shrink memory use so millions of vectors don't require a small fortune in RAM
- Hybrid search — combining semantic similarity with old-school keyword scoring, because sometimes the user really does mean the literal words
Could you bolt some of this onto a regular database? Yes — and that's exactly what extensions like pgvector do (more on that below). But the ANN index is the non-negotiable part. Without it, "AI search" doesn't survive contact with production-scale data.
1 min read
Why Not Just Use a Bigger Context Window?
Fair question in 2026. Models take a million tokens now. Why retrieve anything? Just paste everything in.
Three reasons this loses:
- Cost. You pay per token, per request. Shipping your whole knowledge base with every question is like mailing someone your entire filing cabinet because they asked about one invoice. Retrieval sends the three relevant pages instead.
- Latency. More input tokens = slower responses. Every time.
- Recall. Models demonstrably get worse at using information buried in the middle of enormous contexts. Ten relevant chunks beat ten thousand mostly-irrelevant ones.
Big context windows and vector search aren't competitors. Retrieval picks what goes in the window; the window holds what got picked. Every serious RAG system uses both.
1 min read
When You Don't Need a Dedicated One
Time for the honest part, because "you have to use a vector database" is only true if we're loose about the word "database."
You need vector search. You don't always need a dedicated vector database:
- Tiny datasets (under ~100k vectors): brute force in NumPy or SQLite with the sqlite-vec extension is genuinely fine. Don't add infrastructure to search 5,000 documents.
- Already on Postgres: pgvector adds HNSW indexing to the database you already run. One less service, your vectors live next to your relational data, and it comfortably handles millions of vectors. This is the right default for most products, and I'll die on that hill.
- Prototyping: embedded libraries like Chroma or FAISS run in-process. Zero infrastructure while you figure out if the feature is even good.
The dedicated players earn their place when you're at tens of millions of vectors, need heavy filtered search at scale, or want someone else to operate the thing entirely.
1 min read
The Options in 2026
The short version of a very long market:
| Option | Best for |
|---|---|
| pgvector | You already run Postgres (most of you) |
| Qdrant | Self-hosted, heavy metadata filtering |
| Pinecone | Fully managed, zero ops appetite |
| Weaviate | Built-in hybrid search, flexible deployment |
| Chroma | Prototypes and local development |
Start with pgvector or Chroma. Graduate to a dedicated engine when you have the scale problem, not before. Picking Pinecone for your 2,000-document side project is buying a forklift to move a couch cushion.