- 1Return the final top k documents with their fused and reranked scores
- 2Run ANN search over the dense index to fetch the top dense candidates
- 3Rerank the fused pool with a cross-encoder or late interaction model
- 4Fuse the two candidate lists with reciprocal rank fusion into one ranked pool
- 5Run BM25 over the inverted index to fetch the top sparse candidates
- 6Parse the query: extract keyword terms for sparse scoring and embed the text into a query vector
Parse, retrieve sparse and dense in parallel, fuse the lists by rank, rerank the fused pool with a cross-encoder, return top k. The cross-encoder runs last because it is the expensive step.
Picture a recipe search. Step one, you read the user's words: they typed 'spicy chicken curry'. You extract the keywords for the spice-rack search engine and you also turn the whole sentence into an embedding for the meaning search engine. Step two and three run at the same time. The keyword arm pulls recipes with the words 'spicy', 'chicken', 'curry'. The meaning arm pulls recipes that match the idea, including ones written as 'fiery birds in coconut sauce' that share no keywords. Step four, you combine the two shortlists by how high each recipe ranked on either arm, not by raw score, because the two arms produce numbers on different scales. Step five, a slow but smart judge reads the title and first paragraph of each recipe and re-orders the top dozen. Step six, you serve the top three. The slow judge runs last on purpose, because letting it score everything would take all day.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Hybrid search with reranking is the default 2026 retrieval stack. The pipeline assembles BM25 and dense vector search as complementary recall engines, fuses their results to remove score-scale incompatibility, then runs an expensive cross-encoder rerank on the survivors. The order of operations is not arbitrary; it is dictated by funnel economics, where each stage trades breadth for cost per item.
This walkthrough explains each stage, why it sits where it does, what the alternatives look like, and the operational details that show up in production.
Mental model: a six-stage funnel. Parse cheap, retrieve broad in parallel, fuse cheap on the ranks, rerank expensive on the survivors, emit top k. The slow accurate step sees the fewest items.
Why two retrieval arms
BM25 and vector search catch different things. BM25 scores documents by term frequency and inverse document frequency: a document with the rare query term in it scores high, even if the rest of the document is unrelated. This is exactly what you want for product SKUs, error codes, person names, and any query where the exact token matters.
Vector search scores by semantic similarity in the embedding space. A query 'how do I reset my password' matches a document titled 'account recovery procedure' even though they share zero words. This is what you want for natural-language questions, paraphrases, and concept queries where the exact term is unknown.
Neither arm dominates. A pure-BM25 system fails on paraphrases; a pure-vector system fails on exact tokens because embedding models compress information and lose specificity. Hybrid systems consistently outperform either alone across benchmarks (MS MARCO, BEIR, in-domain retrieval suites), which is why every production stack in 2026 fuses the two.
The two arms also have complementary failure modes. BM25 fails silently on synonyms; vector search fails silently on the absence of a critical term. Fusing the lists means a document needs to look good to either arm to make the candidate pool, raising recall without sacrificing precision.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
Real products, models, and research that use this idea.
- Weaviate exposes a single hybrid query API that runs BM25 and vector search in parallel and applies RRF by default, with an alpha parameter to weight the two arms.
- Qdrant 1.7+ ships a query API where sparse and dense queries fuse with RRF, then a rerank stage calls an external reranker like Cohere Rerank.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow would you size the rerank pool when latency budget shrinks from 1s to 200ms?
Drop pool size proportionally. At 10ms per cross-encoder pair, 200ms gives you 20 items. Either shrink the pool to top 20 fused candidates, or swap the cross-encoder for a faster late-interaction model that processes more items in parallel.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Running the cross-encoder over the whole corpus, or fusing before both arms return, or skipping fusion and concatenating raw scores. All three break the pipeline economics.
60 second bullets to scan on the way to the call.
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.