Prompts Forms Resume Reports ★ Saved ★ Saved★ + Submit a tool
Techniques

Reranker

About 3223 characters Updated Nov 30, 2026 32 views AI wiki

A reranker is the second-stage ranking component of a retrieval pipeline, finely scoring candidates from initial recall. In the typical "recall then rerank" architecture it sits after vector retrieval and before generation by a large model, the link that lifts "roughly relevant" to "actually usable."

Core Principles

The key difference from recall is whether interaction is computed. Vector retrieval is a bi-encoder: query and document are encoded separately and compared by cosine, so document vectors can be precomputed and retrieved in milliseconds, but no word- or sentence-level cross information survives, only a fixed vector into which detail is compressed.

The reranker uses a cross-encoder: query and document are concatenated into one input, so every attention layer sees token-level interaction, and the model outputs a relevance score. This is far more discriminative, aligning query qualifiers with document evidence instead of fuzzy-matching an averaged vector, typically raising Top-10 hit rate by double digits on Chinese benchmarks; but it cannot be precomputed, since each pair needs a forward pass, so it only runs on the dozens to hundreds of candidates after recall.

Mainstream models include BAAI's bge-reranker series (v2-m3, v2-gemma, large), Cohere Rerank and Jina Reranker, plus LLM-based reranking (numbering documents and asking a large model for relevance). Listwise reranking feeds several documents at once for global ordering, better but slower; pointwise pairwise scoring is the most stable and most common in engineering.

Key Points

First, the coarse-to-fine funnel needs proportion: recall 50 to 200 and keep 5 to 10 for the model is the usual ratio; too few leaves reranking powerless, too many explodes latency. Second, reranking is a latency hog: tens of milliseconds per item on CPU, a few on GPU with batching, so production uses batching, int8 quantization or TensorRT. Often underestimated is input truncation: extract the fragment most relevant to the query rather than feeding the whole document.

Third, scores are relative, not thresholds: distributions differ by model and batch, so a "fallback when nothing is relevant" rule needs a threshold calibrated on your data. Fourth, rerankers must align with the domain: general models lose power on legal clauses, medical records and internal code names, needing domain fine-tuning or few-shot samples. Fifth, reranking can fuse multiple recall channels: merging vector, BM25 and knowledge-graph results before reranking beats a single channel, and a rule layer can add forced boosts for the latest version, same-source dedup and title-match penalties.

Common Misconceptions

Misconception one: with vector retrieval, reranking is unnecessary; vector recall confuses hard negatives that are semantically close but off-answer, exactly what reranking fixes, though adding a general reranker to exact keyword matching can scramble a correct order. Misconception two: using a reranker as a vector model; its output is a score, not a vector, and cannot be indexed. Misconception three: tuning reranking but not recall; if the right document is not in the Top-50, reranking is helpless. Misconception four: no latency budget, raising candidates from 50 to 500 and doubling end-to-end time. Misconception five: switching models without checking score distributions, voiding thresholds unnoticed.

Application Scenarios

Fine ranking for RAG, search result ordering, e-commerce product search, legal and patent retrieval, customer service knowledge matching, resume screening, candidate convergence in QA, fusion of multi-channel recall, literature recommendation, relevant-event filtering in opinion monitoring, case matching in consultation, and compliance review of enterprise documents.