RAGcore
Reranking
A slower, smarter model reorders the top candidates.
What it is and why it exists
Retrievers score query and document independently (bi-encoders). A cross-encoder reranker reads the query and each candidate together and scores relevance much more accurately — too slow for the whole corpus, fine for the top 20–100. LLMs can also rerank listwise.
Quick prototype
Skip it; take top-5 from retrieval.
In production, at scale
Retrieve 50–100 with hybrid search, rerank to 5–10, cap by score threshold, budget its latency (tens to a few hundred ms), and measure the lift on your eval set.
Vendors and tools
| Cohere Rerank | Hosted cross-encoder reranker |
|---|---|
| Voyage rerank / Jina reranker | Hosted rerankers |
| BGE reranker / ms-marco cross-encoders | Open, self-hostable |
On AWS: Cohere Rerank and Amazon Rerank models on Bedrock; Bedrock Knowledge Bases can rerank results.
How it fails
- Reranking 1,000 candidates and blowing the latency budget
- Retrieval never surfaced the right document, so reranking can’t help
What the interviewer asks next
Bi-encoder vs cross-encoder?
Bi-encoder: embed query and documents separately, compare vectors — precomputable and fast. Cross-encoder: one forward pass per (query, document) pair — accurate, can’t be precomputed.