Here's a number worth pinning above your desk: a vector database query costs you an embedding call on every query, plus a nearest-neighbor search, plus the memory for the index. A BM25 query costs a lookup in an inverted index that fits in RAM and returns in single-digit milliseconds. Those are two very different bills — and yet almost every RAG tutorial in 2026 opens with "set up your vector store," as if the other path didn't exist.
If you're building retrieval and wondering whether you actually need a vector database, this article gives you a decision rule you can run against your own query log tonight. The core idea: choose the retrieval method by the shape of your queries, not by vendor benchmarks or hype.
Why your query log, not a benchmark, is the real oracle
Vendor benchmarks measure performance on their queries, not yours. A model that tops an embedding leaderboard on general web text may be mediocre on your error codes, SKUs, and product names.
The only honest test is your own data. Export a few hundred real queries from your logs or support tickets and sort them into two piles: ones that contain an exact string (an order number, a part code, a person's name) and ones that are paraphrased questions. The ratio of those piles tells you which method to build around. This is the vector database vs keyword search decision, and it's made with data — not vibes. More on the topic: “RAG Data Residency Checklist: How to Decide If Embeddings Can Leave Your Perimeter”.
Failure 1: the vector database that can't find "ERR-4471"
Picture a support chatbot with a vector store full of help-center articles. A user types the error code from their log: ERR-4471. The chatbot returns three articles about "general troubleshooting" and none containing that code. The user gives up.
Why does this happen? Embeddings compress text into a fixed-size vector — a point in high-dimensional space. In that compression, ERR-4471 and ERR-4472 land almost exactly on top of each other, because they share nearly all their characters and context. Semantically, they're neighbors. But they describe different failures with different fixes. The vector store has no concept of the exact string; it only knows the neighborhood.
How it ends: precision collapses on exactly the queries where the user is most frustrated and most specific. How to fix it: for identifier-heavy corpora, a keyword/BM25 index is the right primary tool. BM25 scores by term frequency and inverse document frequency, and a rare token like ERR-4471 gets a huge IDF weight — it appears in one document, so a match is almost a certainty. That exact-match precision is a feature, not a limitation.
Failure 2: keyword search that misses the question behind the words
Now flip it. A legal or HR knowledge base indexed with BM25. A user asks: "can I take time off if my kid is sick?" The policy document says "employee may request unpaid leave for dependent care." Zero shared keywords. BM25 returns nothing useful, because it matches tokens, not meaning.
This is the mirror image. When to use vector search: when the query and the answer use different words for the same thing. Paraphrase, synonyms, acronyms vs. full names, cross-language questions — embeddings win because they compare meaning, not spelling.
So you have two tools, each dominant in a different regime. The mistake is treating it as a religious war instead of a routing problem.
The decision rule you can actually run
Here's a checkable criterion. Run it on your query log:
- Sample 200 queries from production, support tickets, or user interviews.
- Tag each one as identifier (SKU, error code, name, order ID) or conceptual (paraphrased question).
- Compute the ratio. If more than roughly half are identifiers, keyword-first. If most are conceptual, vector-first.
- Check the failure cost. A missed exact match on an order ID is a support ticket. A missed paraphrase is a shrug. Weight the piles by what a miss actually costs you.
That's it. No benchmark, no leaderboard — just your users' actual behavior. The rule is runnable tonight.
Why "hybrid search RAG" is usually the honest answer
If your log is mixed — and it almost always is — the pragmatic default in 2026 is hybrid search RAG: run BM25 and vector search in parallel, merge the results, and let a reranker sort out the final order. You get exact-match precision for identifiers and semantic recall for paraphrase, at the cost of a slightly more complex pipeline and one extra retrieval pass.
If you're building this out in production rather than a demo, the orchestration details matter more than the vector store you pick. More on the topic: "Building RAG Systems: Chunking, Hybrid Search and Reranking in Real Production Pipelines".
And if your hybrid pipeline still returns wrong answers, the problem is often upstream of retrieval — in how you split documents. More on the topic: "RAG Chunking Strategy: The Chunk Size and Overlap Settings That Actually Raise Retrieval Accuracy".
What each path actually costs you
Let's put the trade-offs side by side, because the cost difference is real and often ignored.
| Dimension | Keyword / BM25 | Vector database |
|---|---|---|
| Query cost | Inverted-index lookup, milliseconds | Embedding call + ANN search |
| Index memory | Compact, fits in RAM | High-dimensional vectors, larger footprint |
| Exact identifiers | Precise | Degrades on near-duplicates |
| Paraphrase / synonyms | Weak | Strong |
| Setup complexity | Low | Embedding model + index + tuning |
| When it wins | SKUs, codes, names | Conceptual questions, messy docs |
Notice the pattern: the vector path is not "better" — it's more expensive and better at a specific job. Building a vector store for a corpus that's 80% part numbers is paying for capability you don't use.
The trap of "just add a vector database"
The most common failure isn't choosing the wrong tool. It's choosing the trendy one without checking the query shape. Teams bolt on a vector database because it's the default in every tutorial, then discover their users search by exact identifiers and their precision dropped compared to the old keyword search they replaced.
If you're evaluating vector databases seriously — and you should, if your queries are conceptual — it pays to know where they break. More on the topic: "Vector Databases — From Search to RAG: Why Your RAG Chatbot Gives Wrong Answers and How to Fix Retrieval". More on the topic: “GPU Break-Even Math for Self-Hosted LLM vs API in a RAG Pipeline”.
A quick sanity check before you commit
Ask three questions before writing a line of index code:
- What does a miss cost? A wrong support answer is cheap to retry; a wrong compliance answer isn't. Weight accordingly.
- How stable is your corpus? Keyword indexes are trivial to update; embedding indexes require re-embedding changed chunks, which costs tokens and time.
- Who maintains it? A BM25 index is a few lines of config. A vector pipeline needs an embedding model versioned and monitored. That's a real operational line item.
If you're still deciding whether retrieval is even the right adaptation strategy for your problem, that's a separate fork worth settling first. More on the topic: "RAG vs Fine-Tuning: How to Choose the Right LLM Adaptation Method and Avoid Paying for Extra Tokens". More on the topic: “LLM Engineering with LangChain: RAG and Agents — What Actually Separates a Demo from a Product”.
The teams that get this right in 2026 aren't the ones with the fanciest vector store. They're the ones who opened their query log, counted the identifiers, and built the retrieval path their users actually needed. Your query distribution is the only benchmark that matters — go read it.