Reranking in RAG: when to reorder vector search

What is reranking in RAG?
Reranking in RAG reorders passages already retrieved before handing them to the generator. A cross-encoder scores each question-and-passage pair and decides which candidates move up the list. It does not find evidence missing from the initial retrieval. The stage pays off when it improves accepted answers inside the latency and cost budget.
Key facts / Decision box:
- Useful evidence is among the candidates but outside the final cutoff: test reranking.
- Evidence is missing: review retrieval, the index and segmentation before reordering.
- Quality gain below what is required, or wait time above the limit: keep the initial search.
- Production decision: compare quality, latency and cost per accepted answer on the same load.
The right passage can sit on the list and still never reach the answer. That is the near miss of vector search: retrieval found the candidate, but it landed below the cutoff sent to the generator.
RAG, or retrieval-augmented generation, combines a search over documents with a response grounded in the retrieved context. Reranking sits between those two stages. Its promise has a precise address: change the order of the available candidates, not repair an outdated corpus or guarantee that the final answer is correct.
In 2019, Rodrigo Nogueira and Kyunghyun Cho studied the reordering of passages retrieved by lexical search, not a corporate RAG application; the original paper helps explain the technique and its historical limits. The decisive measurement belongs to the corpus and the questions of whoever operates the application.
How do vector search and the cross-encoder work together?
In vector search for RAG, the system compares the numeric representation of the question with representations of indexed passages and selects candidates. The cross-encoder receives each candidate together with the question, computes a score for the pair and produces a new order. The generator receives only the passages chosen after the final cutoff.
The first stage has to scan a large collection without running a joint evaluation for every document on every query. A common architecture uses a bi-encoder: it produces embeddings of the question and of the passages separately. Document embeddings can be prepared during indexing; at query time, the application searches for neighbors in the vector space.
The second stage trades breadth for a more local examination. For each retrieved candidate, the cross-encoder processes question and passage together, with attention between the texts, and the application sorts the scores to select the top results. The technical documentation on retrieval and reranking describes this arrangement and also allows lexical retrieval as the first stage.
| Aspect | Initial search with a bi-encoder | Reranking with a cross-encoder |
|---|---|---|
| Input | Question and passages encoded separately | Each question-and-passage pair processed together |
| Work | Locate candidates in an indexed collection | Score and reorder the candidates received |
| Output | Initial list, ordered by similarity or another retrieval rule | List in a new order according to the model score |
| Limit | Can leave evidence off the list or below the cutoff | Does not add documents missing from the received list |
A score is not truth. It expresses the model's judgment for that pair, and its scale depends on the model; it is not safe to treat it as a calibrated probability without validation. Language, domain and truncation change the evaluation.
Where does reranking help, and where does it fall short?
Reranking can help with the ordering problem when useful evidence is already on the initial list but appears far from the top. It does not, by itself, solve a coverage problem: if the relevant document did not enter the candidate list, no rearrangement of that list can place it in the generator's context.
A missing passage requires investigating the earlier path: a document not indexed, an old version, a split that separated related information, a poorly represented query, or an initial list that is too short. Hybrid search, which combines lexical and vector signals, is an alternative to compare when exact terms and semantic similarity both matter for the domain. The results still require evaluation.
The Nogueira and Cho study illustrates that limit by another route. On the MS MARCO development set, some queries had no annotated relevant passage, and the authors note that BM25 may not have retrieved some relevant passages. Their study reorders existing candidates; it does not prove that a cross-encoder retrieves an omitted document. The initial search in that work was BM25, not vector search.
There is another detail. Duplicate passages can occupy the final cutoff and reduce the variety of evidence sent to the generator. Reordering, deduplication and context selection are distinct decisions. A better ranking by one metric does not, by itself, guarantee that the final set gathers every source needed to answer.
What does a cross-encoder cost for reranking?
The cost of a cross-encoder for reranking depends on the number of pairs scored, the size of the texts, the model and the deployment form. Added latency includes execution, queueing and, when there is a remote service, the network. The billing unit varies. That is why measuring price requires reading the contract and using the real load.
More candidates increase the pairs to score, but execution time does not necessarily grow in the same proportion.
Batches, parallelism, concurrency and available capacity change the relation between total work and perceived wait. A test without load can hide queue wait. Long passages, in turn, can exceed the model's input limit, and the truncation policy decides what will be evaluated: if only the beginning is kept, the answer at the end stays out.
There is also cost outside reranking. Retrieval, generator calls, reserved infrastructure and extra attempts enter the task cost when they are attributable to the query. If the final cutoff changes, the volume of context sent to the generator changes too. The comparison of the real cost of an AI application helps separate the price of one call from the cost of the result obtained.
On owned infrastructure, the bill includes provisioned capacity and utilization; on a contracted service, the billed unit depends on the contract. The analysis of self-hosting models and infrastructure cost complements that choice.
How do you measure retrieval quality in RAG?
Retrieval quality in RAG requires measuring coverage and order separately. Recall on the initial list shows how much of the known relevant evidence entered the candidates; nDCG and MRR show aspects of result position. None of these metrics replaces evaluation of the final answer, and none resolves operational cost by itself.
For each question with available labels, recall@k is the fraction of known relevant passages that appears among the first k results. Measured on the initial list, it shows the coverage that reordering receives. Measured at the final cutoff, it shows the fraction present in the selected context. The denominators must use the same definition of relevance and the same reference set.
Recall of the full list stays the same. That holds when reranking only permutes the initial candidates. Recall at the final cutoff can rise or fall because the composition of the top results changed. Incomplete labels also limit the reading: an unannotated passage is not necessarily irrelevant.
nDCG@k considers the relevance of the results and discounts useful items that appear further down, comparing the observed order with an ideal order according to the labels. It accommodates grades of relevance. MRR uses the position of the first relevant result and averages the reciprocal of that position across queries. If the first relevant result does not appear in the chosen cutoff, that query's contribution is zero.
MRR ignores relevant results after the first. When the answer requires several pieces of evidence, MRR alone hides the rest. The retrieval evaluation material from Stanford University describes these metrics and warns about redundant documents.
A well ranked passage can be insufficient, outdated or used incorrectly by the generator. Defining an accepted answer and adequate evidence before the experiment avoids confusing a ranking change with an improvement in the answer.
How do you test whether the gain covers the latency?
The test compares the same query sample with and without reranking, keeping the corpus, the generator and the acceptance criteria constant. The team measures candidate coverage, quality at the final cutoff, accepted answers, latency percentiles and cost. The stage enters production only if it meets the limits defined for the application.
- Prepare the sample. Gather representative questions, including difficult queries, and record relevance labels with reviewers and explicit criteria. Splitting by language, question type and need for multiple sources helps locate where the method works or loses quality.
- Freeze the comparison. Use the same version of the corpus, segmentation, index, initial retrieval, generator and response parameters in both variants. Also keep the same final cutoff to isolate the change in order. If any of those factors changes, record another experiment.
- Measure each stage. Compute recall on the initial set and recall, nDCG or MRR at the final cutoff according to the task, recording accepted answers and their evidence, including cases with no reliable answer. Compare each query.
- Measure the operation. Under representative concurrency, record the total path latency and the latency of the reordering stage, with percentiles and errors. Compute the total cost attributed to the queries divided by the number of accepted answers; if there is no accepted answer, do not present a division as a finite cost.
- Decide with prior limits. Compare the required gain in accepted answers with the allowed increase in wait and spend. Only then vary the size of the initial list and the final cutoff, one parameter at a time, to see how each choice changes quality and cost.
A larger list can bring evidence that was missing before, but it requires scoring more pairs and can include distractions. If the expansion changes the initial retrieval, the team should evaluate it as a separate variant, without attributing the gain exclusively to reranking.
Sending more passages in the final cutoff can increase coverage, but it consumes context and can add redundancy. Fewer passages reduce that volume, provided they preserve the evidence required.
Observability of models in production helps organize the measurement of calls. The application still needs to instrument its own retrieval and reordering stages to attribute time, cost and outcome to each query. Without that separation, the average of the final response does not show where the wait started.
Frequently asked questions about RAG reranking
The most useful questions about reranking in RAG concern the limits of the initial list, the difference between the models and the choice of cutoffs. The answers below apply to the two-stage architecture described here; a different implementation needs to be evaluated according to its own components and data.
Does reranking retrieve missing documents?
No. The reranking presented here receives and reorders a list of candidates already retrieved. If the relevant document is outside that list, the team should investigate indexing, segmentation, the search method and the size of the initial list. Only then does it make sense to evaluate the effect of the new order on the final cutoff.
What is the difference between a bi-encoder and a cross-encoder?
The bi-encoder produces separate representations for the question and the passage, which allows comparing embeddings at the retrieval stage; the cross-encoder processes each pair together to assign a score and reorder candidates. They are distinct functions. Effective quality and speed depend on the models, the data and the execution conditions.
Do more candidates always improve the result?
No. A larger initial list can include evidence that was missing before, but it increases evaluation work and can bring less useful passages. The effect on quality, latency and cost should be measured on representative queries.
How do you choose the final cutoff?
The final cutoff should preserve the evidence required for the task inside the context and latency budget. The team compares options using relevance at the cutoff, accepted answers, duplication and generation cost. The best number is not fixed: it changes with the corpus, the passage format and the question.
References and further reading
The sources below support the mechanism and the evaluation discussed in the text. The reordering study is historical and uses lexical retrieval, while the documentation describes a reference architecture, and neither supplies a performance result for the specific system of the person reading this. Missing candidates require investigating the initial retrieval.
- Nogueira and Cho, Passage Re-ranking with BERT, submitted in 2019 and revised in 2020. Research on passage reordering on the MS MARCO and TREC-CAR sets.
- Sentence Transformers, Retrieve & Re-Rank. Documentation on initial retrieval, the bi-encoder and joint evaluation by a cross-encoder.
- Stanford University, Introduction to Information Retrieval: Evaluation. Material on ranking metrics and the limits of relevance and redundancy.
When should search stay without reranking?
Search without reranking is the choice when the test does not show a useful gain in accepted answers inside the wait and cost limits. It also makes sense to keep it when the main defect sits before the candidate list, because adding an ordering stage does not retrieve the content that stayed out.
If the initial retrieval already delivers sufficient evidence at the final cutoff, the second evaluation can add work with no measurable benefit. Waiting also costs. In an application sensitive to wait time, even a ranking gain has to fit the experience deadline; if it does not fit, keeping the initial search is an architecture decision, not a refusal of improvement.
The decision can vary by query class, provided the application can identify that class and the policy is measured. A selective route requires measuring the quality of the cases skipped, the cost of classification and the failures of the selection.
What to do with this on Monday
The next decision is to locate the loss before adding another call: compare the retrieved candidates with the passages that actually reach the generator. If the evidence is present but below the cutoff, a paired reranking test has a concrete hypothesis. If it is absent, the investigation starts at retrieval.
The team can use Nexforce Router to govern inference calls with routing across models, budget and observability, without assuming that the product runs reranking or vector search. The application remains responsible for instrumenting those stages when needed. To connect the decision to the inference layer, the analysis of routing and cost in production shows the neighboring problem.
The better order is the one that delivers useful evidence on time and at an acceptable cost. If the test does not meet those limits, the initial search stays in production.

Save up to 50% in creditswith a single smart API
Connect your operations to our AI Router and optimize the consumption of multiple LLMs
Free TrialRelated articles

LLM self-hosting: When does an owned GPU pay off?
LLM self-hosting and managed APIs can be compared by utilization and total cost per accepted task under the same quality and latency requirements.
Read more
Security boundaries in agentic architectures
AI agent security depends on four boundaries, execution, credentials, tools and inference, each with a control point and a test before production.
Read more
AI router in production: multi-model routing and fallback
An enterprise AI router governs inference traffic across multiple LLM providers, implementing dynamic routing, automatic failover, and budget caps.
Read more