Overview

Embedding retrieval scores query and chunk independently. A cross-encoder reranker reads query and chunk together and scores the pair, which is more accurate and slower, so it runs only on the candidates retrieval returns. The reranker cannot recover a chunk that retrieval missed; see rag-retrieval for the stage before it.

Retrieve broad, rerank narrow

Return 30 to 100 candidates from retrieval, rerank, and pass the top few chunks to the prompt.

query -> dense top 30 + BM25 top 30 -> RRF merge to 50 -> rerank -> top 5 to 20 -> prompt

Merge multiple retrievers with RRF before reranking so you do not score the same chunk twice. Skipping the rerank stage is the most common reason a tuned system answers wrong on borderline queries.

Choose a hosted reranker for the easy path

RerankerContextNotes
Cohere rerank-v4.0-pro / rerank-v4.0-fast32KMultilingual; accepts semi-structured (JSON) documents; -fast for low latency
Voyage rerank-3 / rerank-3-lite32K, up to 1,000 documentsPairs with Voyage embeddings; rerank-2.5 is legacy but still served
Jina jina-reranker-v3listwise0.6B model that scores a batch of documents in one pass; v3.5 is faster
  • Cohere rerank-v3.5 has a 4K context and is superseded by v4.0. Pinecone’s hosted inference lists cohere-rerank-4-fast and bge-reranker-v2-m3 and marks cohere-rerank-3.5 deprecated.
  • Cohere, Voyage, and Pinecone bill rerankers per request or per token; check each price sheet against your candidate count.
  • Run a bake-off on your golden set; the right reranker wins there, not on a leaderboard. See rag-eval.

Self-host when latency or data residency demands it

BAAI/bge-reranker-v2-m3 (568M parameters, 8K context, Apache 2.0, multilingual) is the open-weight default. Qwen3-Reranker (0.6B, 4B, 8B) is the larger alternative.

from FlagEmbedding import FlagReranker
 
reranker = FlagReranker("BAAI/bge-reranker-v2-m3", use_fp16=True)
scores = reranker.compute_score([[query, chunk] for chunk in candidates])
ranked = sorted(zip(candidates, scores), key=lambda x: -x[1])
  • Pin the model revision in your image.
  • Batch pairs; unbatched GPU calls waste most of the hardware.
  • CPU reranking is for prototypes.

Self-host when the corpus is sensitive, the latency budget is tight, or volume makes a hosted API uneconomic.

Budget the reranker on latency

Reranking is usually the slowest stage you can still afford. Measure p95 latency at your real candidate count, set a budget, and cut candidates (for example 50 to 25) or move to a smaller reranker before you remove the stage.

Choose by lift, not by vendor claims

  • Score recall@5 and nDCG@5 on the golden set for each candidate reranker.
  • Score the same chunks with no reranker as the baseline.
  • Pick the reranker with the largest lift at acceptable latency and cost. One point of accuracy at four times the cost usually loses.

Pass the right amount of context

Tune the number of reranked chunks on your eval set, not by habit. Anthropic’s contextual-retrieval experiments found that passing 20 chunks beat 10 and 5; your corpus may differ. Order chunks by reranker score, trim long chunks to the relevant section, and format them for citation as described in rag-citations.