"Should we use vector search or keyword search for RAG?" is the wrong question. The right one is "which failures can we not afford?" β because dense (vector) and sparse (lexical/BM25) retrieval fail in opposite ways, and hybrid search exists precisely to cover both. This is a decision guide: what each method is good and bad at, when pure vector is genuinely enough, and how fusion actually works when you need both.
The two retrievers, and how they fail
| Vector / dense (embeddings) | Keyword / sparse (BM25) | |
|---|---|---|
| Matches on | Meaning β paraphrase, synonyms, concepts | Exact terms β tokens, stems |
| Strength | "How do I cancel?" finds "terminating a subscription" | "ERR_4021", "SKU-8841", "getUserById" matched exactly |
| Blind spot | Misses rare exact tokens: codes, IDs, names, symbols | Misses synonyms and rephrasing entirely |
| Out-of-vocabulary | Embeds unseen jargon poorly | Handles any literal string |
| Cost/infra | Embedding model + vector index (ANN) | Inverted index, cheap and mature |
The key insight: their failure modes are complementary. The query dense search misses (an exact error code) is exactly the one BM25 nails, and vice versa. That is why fusing them beats either alone on mixed real-world traffic.
When pure vector search is enough
Don't add complexity you don't need. Dense-only is fine when:
- Queries and documents are natural-language paraphrases of each other (conceptual docs, FAQs, conversational Q&A).
- The vocabulary is not dominated by identifiers β few part numbers, error codes, symbols, legal citations.
- You value recall of meaning over exact-term precision, and your evaluation set confirms dense-only recall is high enough.
When you need hybrid (or lexical) search
- Identifier-heavy domains β support tickets ("ORA-00600"), e-commerce (SKUs), code search (function names), finance/legal (citations, clause numbers). Pure vectors routinely miss these; users expect an exact-match to win.
- Rare or new terms β a product launched last week, an internal acronym, a customer name. The embedding model never learned them; BM25 doesn't care.
- Mixed query styles β some users type keywords, others type sentences. Hybrid serves both without forcing a mode.
- High-stakes recall β when missing the one relevant document is a real cost, the redundancy of two retrievers is worth it.
This is the single most common production upgrade for a RAG system that "mostly works but misses obvious exact matches." See the failure taxonomy in why RAG retrieval quality drops in production.
How hybrid fusion works
You run both retrievers and merge their ranked lists. Two mainstream methods:
- Reciprocal Rank Fusion (RRF) β score each document as the sum of
1 / (k + rank)across the lists it appears in (ka small constant, often 60). It uses only ranks, so it needs no score normalisation between the incompatible scales of cosine similarity and BM25. It is robust, parameter-light, and the default hybrid mode in many vector databases. Great starting point. - Weighted score fusion β normalise each retriever's scores (e.g. min-max) and combine as
Ξ±Β·dense + (1-Ξ±)Β·sparse. More tunable β you can dial the dense/sparse balance per domain β but you own the normalisation and the tuning.
Start with RRF; move to weighted fusion only when your evaluation set shows a domain-specific balance worth tuning.
Where hybrid sits in the pipeline
Retrieval quality is a pipeline, and these stages stack β they don't compete:
- Hybrid retrieval β build a broad, high-recall candidate pool (say top 50) using dense + sparse fusion.
- Reranking β a cross-encoder re-scores those candidates by true queryβpassage relevance, lifting precision at the small
kyou can afford. - Context assembly β pass the reranked top few chunks, with metadata filters already applied, to the model.
Hybrid improves what enters the pool (recall); reranking improves the order of the pool (precision). Doing both is standard in strong systems.
Costs and trade-offs to be honest about
- Two indexes β you maintain and keep in sync a vector index and an inverted index (many engines β OpenSearch, Elasticsearch, pgvector-with-full-text, and purpose-built vector DBs β do both in one store, which simplifies this).
- Latency β two retrievals plus fusion, then optional reranking, add milliseconds. Usually acceptable; measure it.
- Tuning surface β fusion weights, per-retriever
k, and reranker depth are all knobs. More power, more to get wrong. Anchor every change to an evaluation set.
A decision cheat-sheet
| Your corpus / queries | Start with |
|---|---|
| Conceptual docs, conversational, few identifiers | Dense-only; add hybrid if recall gaps appear |
| Support, code, commerce, finance, legal (identifier-heavy) | Hybrid (RRF) from day one |
| Right chunk retrieved but ranked too low | Add reranking on top of your retriever |
| Multi-tenant / versioned corpus | Metadata filtering + hybrid |
Common wrong approaches
- Assuming "semantic search" is strictly better. It isn't for exact tokens; that's a category error that quietly loses support and code queries.
- Adding hybrid without measuring. Build a golden query set and confirm the recall lift before shipping fusion weights.
- Expecting hybrid to fix bad chunking or an embedding mismatch. It won't β those are upstream and dominate.
- Skipping reranking because "we added hybrid." They address different stages; the best systems use both.
Related resources
- Why RAG retrieval quality drops in production β the full retrieval debugging checklist.
- OpenSearch vs pgvector for Bedrock RAG β choosing the store that runs your hybrid search.
- RAG explained and LLM hallucination root-cause analysis.
- RAG & Agentic AI job support guide.
If you're choosing a retrieval strategy for a live RAG project and want a senior engineer to pressure-test the trade-offs with you, that's what real-time proxy job support is for. And explaining why you chose hybrid over dense-only β with the failure modes to back it β is exactly the depth RAG interview proxy support prepares you to demonstrate.
Last reviewed: September 2026.