Skip to content

Glossary

Reranking

Reranking reorders retrieved candidates using an additional relevance assessment.

Context engineering

Reranking takes an initial set of retrieved candidates and orders them again using a further relevance signal. The first stage aims to find plausible material efficiently; the second can compare each candidate more closely with the full query. The signal may come from lexical features, a trained model, or another scoring method. A reranker can only work with candidates it receives, so a missing source in the first stage remains missing.

A useful evaluation measures whether the relevant evidence reaches the candidate set and whether reranking then places it where a reader or model will use it. Relevance labels should account for entity, time, and the actual question, not just topical overlap. Scores from different rerankers are rarely interchangeable without calibration. When multiple sources disagree, keeping only the highest-ranked passage can erase the conflict that a defensible answer must disclose.

Reranking can improve context selection under a limited window, but it does not establish that a passage is true or sufficient. It sits between retrieval methods such as vector search and later checks such as grounding. For an organization that must defend a value, the selected evidence should be inspectable along with material contradictory enough to affect the conclusion. A better ordering is useful only if the decision basis remains visible.

Example

A reranker places the dated registration notice for Halden Therapeutics AG (fictional) above a general article, while retaining a conflicting notice for review.

Why a second stage helps

First-stage retrieval has to be fast over a very large collection, so it compares compact representations of the query and the documents. A reranker takes the top candidates, perhaps the top fifty or a few hundred, and scores each one against the query with a more expensive model that reads the query and the candidate together. The paper by Nogueira and Cho showed that fine-tuning a BERT model as a cross-encoder to rerank passages gave large gains on the MS MARCO passage ranking task. Late-interaction models such as ColBERT offer a trade-off between the precision of full cross-attention and the speed of precomputed representations. The survey of retrieval-augmented generation treats reranking as one of the main post-retrieval techniques.

The cost is latency and compute per query, which grows with the number of candidates scored. The gain is in precision at the top of the list, which matters because only a few passages fit in the model's window and the ones near the top are the ones used.

Reranking for evidence and not only relevance

A relevance score does not capture everything that matters for evidence. Two passages may be equally relevant and differ in authority: a registry entry and an aggregator page repeating it. Two may differ in currency: a corrected and an uncorrected version of a notice. Two may be duplicates presenting a single piece of evidence as two. A reranking stage can therefore include signals beyond relevance: source type and priority, publication or effective date relative to the question, duplicate and lineage grouping, and entity match. These signals are explicit rules or features and not model judgments, so they can be documented and tested.

Reranking also interacts with the position effect. As the study Lost in the Middle showed, models use passages unevenly depending on where they are placed, so the final order of the reranked list is a design choice and not merely the sorted order of scores. Measure the system with the reranker on and off, and examine the cases where it changes the outcome, as in the article on RAG fault isolation.

A worked example

A query asks for the current status of a study of Halden Therapeutics AG (fictional). First-stage retrieval returns forty passages. A cross-encoder scores them for relevance, putting a registry entry from last year and a news article from last week at the top, with the current registry entry fourth. A rule-based second pass groups the three directory copies of the news article under the article, prefers the registry entry with the latest effective date among those of the same type, and orders the final five passages as current registry entry, news article, earlier registry entry, then two others. The answer states the current status from the first passage and mentions the news article as consistent. Relevance alone would have put an out-of-date registry entry first.

Checks a reviewer can run

Compare retrieval quality at the top five with and without reranking on a labelled set. Examine a sample of cases where reranking moved a passage into or out of the top five. Check that rules for source type and date are documented and tested. Check that duplicate groups are collapsed. Check the added latency against the service budget.

Related terms and boundaries

Reranking refines the output of vector search before context engineering places material in the context window. It is where data conflict between passages can be detected and handled before generation, and it supports grounding by putting the best evidence in front.

Common misreadings

  • Assuming reranking can recover documents absent from initial retrieval.
  • Ranking topical similarity above entity and date match.
  • Discarding contradictory candidates after choosing a top hit.

Related terms

Appears in

  • Long context vs retrieval

    Long context places more material in one model input; retrieval selects a smaller set of material for each question.

Found an error on this page? See corrections for what counts as one, how to report it and the dated log.

Enquiry

Where does "Reranking" bear on a decision of yours?

This entry sits under context engineering. If a decision in your organization turns on it, send the entity concerned, the sources you fuse to describe it and who may read which of them. We reply with what a first record would cover.

Or write to [email protected] in your own words.