Designing Hybrid Retrieval Pipelines That Survive Real Queries
Production retrieval systems fail for different reasons depending on the query distribution. Dense retrieval is excellent when semantic similarity dominates, but it often underperforms on rare entities, exact terminology, versioned identifiers, and mixed-domain queries. Sparse retrieval such as BM25 behaves almost inversely: it is strong on lexical precision, but weak when relevant passages use paraphrases or implicit terminology. In practice, users do not care which failure mode is more elegant. They only see that the answer is wrong.
Why Dense Retrieval Alone Breaks Down
Embedding-based retrieval compresses text into a continuous vector space. This is powerful, but it creates an information bottleneck. Small lexical cues such as model names, file versions, regulation codes, or exact product identifiers may not dominate the final embedding enough to survive nearest-neighbor search. This matters in RAG because an LLM can only reason over the evidence it receives. If retrieval misses the key chunk, generation quality collapses regardless of model size.
Why Sparse Retrieval Is Still Necessary
BM25 remains competitive because it preserves lexical sharpness. Exact matches, especially on technical corpora, often correlate strongly with relevance. Acronyms, API names, and domain-specific terminology are common in engineering and NLP datasets. Removing sparse retrieval in these environments usually hurts recall on the very queries users perceive as most important.
Fusion as a Reliability Layer
The strongest practical pattern is hybrid retrieval: run dense and sparse retrievers in parallel, then merge their candidates. Reciprocal Rank Fusion works well because it is robust to score calibration issues across retrievers. Weighted fusion can outperform it when validation data exists, but the weights must be tuned against actual query categories rather than intuition. Good retrieval engineering is mostly about designing for distribution shift.
Reranking Changes the Final Mile
Fusion improves candidate recall, but reranking improves the precision of what the generator actually sees. Cross-encoders are valuable here because they score query-document pairs jointly instead of independently. That allows them to reason over interaction patterns such as negation, entity binding, and subtle intent differences. In my experience, reranking is the step that most often converts a merely functional pipeline into one that feels trustworthy.
What to Measure
Top-k recall is necessary but insufficient. You should also inspect MRR, nDCG, latency percentiles, and downstream answer faithfulness. A retrieval change that raises recall but doubles tail latency may degrade real product quality. Similarly, a reranker that improves offline metrics but shifts relevant evidence from rank 2 to rank 1 only matters if your context window was previously tight enough for that rank change to affect generation.
Design Principle
Retrieval should be treated as a system, not a model. Indexing quality, chunk boundaries, query rewriting, candidate fusion, reranking, and context assembly all interact. Hybrid pipelines work because they acknowledge that no single retrieval representation is sufficient for all queries. That is not redundancy. That is engineering for reality.