Reranking
What is reranking?
Reranking is a second-stage process that reorders an initial set of retrieved results using a more detailed relevance assessment. The retrieval stage finds candidates quickly; the reranker spends more computation deciding which candidates best answer the specific query.
The highest-ranked items can then be placed into the model’s context.
How reranking works
A typical pipeline may retrieve 50 candidates using keyword, vector, or hybrid search. A reranking model evaluates the query together with each candidate and produces a new relevance score. The system keeps the strongest few results.
For example, a vector search for “cancel a business plan” might return passages about account cancellation, subscription changes, and project planning. A reranker can prioritize the passage that specifically describes cancelling the business subscription.
Reranking versus retrieval
Retrieval searches a large collection and produces candidates. Reranking operates on that smaller candidate set. It normally does not search the full collection itself.
This two-stage design balances speed and precision. Fast retrieval narrows the space; a slower but stronger relevance model improves the ordering.
Reranking is also different from generation. It selects evidence but does not compose the final answer.
Types of reranking
Reranking can use rules, metadata, language models, or dedicated cross-encoder models that evaluate the query and candidate together. A system may combine relevance with freshness, authority, permissions, diversity, or business constraints.
The scoring objective should match the task. Similarity alone may not favor the latest policy or the document for the correct region.
Costs and failure modes
Reranking adds latency and computation. If the first retrieval stage fails to include the correct document, reranking cannot recover it. A reranker can also prefer fluent but incomplete passages or overfit to common query patterns.
Builders should evaluate retrieval recall before reranking precision, test multiple candidate sizes, and preserve metadata filters. Sensitive results must be removed before model-based reranking if the reranker is not authorized to process them.
Why it matters
RAG quality depends heavily on which evidence enters the context window. Reranking can reduce irrelevant passages, improve answer grounding, and make limited context capacity more useful.
It is most valuable when initial retrieval has reasonable coverage but imperfect ordering. It cannot fix missing, stale, poorly chunked, or unauthorized source data.