A precision-focused second stage that rescores the first-stage's top-K with a cross-encoder, picking the sharpest top-10 for the LLM consumer.
Picture finding the best lawyer for a case. First you skim a hundred profiles fast, narrow down to the twenty that look promising, and only then do real interviews with those twenty. The skim is cheap and lets you cover everyone. The interview is expensive but tells you who is actually a fit. Reversing the order, doing real interviews with everyone before any skim, would take forever. Retrieval works the same way. A cheap first stage looks at the whole corpus and shortlists the top hundred. A more expensive cross-encoder then reads each shortlisted document together with the query and gives a sharp relevance score. The top ten by that score is what you actually use.
Detailed answer & concept explanation~4 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
60s: bi-encoder retrieves top-100 fast via ANN; cross-encoder rescores those 100 with joint attention to pick top-10 precisely; cost asymmetry is why it must be the second stage; production stack names.
Real products, models, and research that use this idea.
- Cohere rerank-3.5 is the most-used reranker API in 2026 production RAG, paired with Cohere embed-v4 as the canonical bi-encoder.
- Voyage rerank-2.5 sits behind Anthropic's contextual retrieval recipe, rescoring Voyage v3 embedding results from the top-100 to the top-10.
- BGE-reranker-v2 is the leading open-weight reranker, drop-in compatible with BGE-M3 embeddings for self-hosted RAG.
- Jina rerank-v2 ships in the LlamaIndex and LangChain rerank modules with a documented latency budget of ~200ms per 100-candidate rerank.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhy is the cross-encoder typically too expensive to use as the first-stage retriever?
QHow does the choice of top-K for the bi-encoder stage interact with cross-encoder quality?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Confusing a cross-encoder with a bi-encoder. A bi-encoder embeds query and doc separately and compares with cosine. A cross-encoder reads both together in one forward pass.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.