What is reranking?

Quick answer

Reranking is a second-stage relevance-scoring step applied after an initial retrieval pass, using a more precise but more computationally expensive method to reorder a smaller set of already-retrieved candidates before deciding what gets used downstream. Where initial vector search, covered throughout this collection’s discussion of embedding similarity, finds candidates quickly across a large collection by comparing pre-computed embeddings, reranking applies a considerably more thorough, more accurate relevance judgment to just that smaller candidate set, trading the speed of the first stage for the precision of the second, applied only where it actually matters.

Summary slides
Reranking
Why a single-stage search can't be both fast and maximally precise…
Why reranking often catches errors the first stage's ranking misses
How many candidates to rerank, and why that number matters
Common mistakes teams make around reranking

Why a single-stage search can’t be both fast and maximally precise at once

Vector search’s speed comes specifically from comparing pre-computed embeddings against each other using a relatively simple, fast mathematical operation, which is exactly what makes it practical to search across millions of vectors quickly, but that same simplicity limits how precisely it can judge relevance, since it’s comparing fixed representations computed independently for the query and each candidate, without ever directly examining the query and candidate together as a pair. A reranking model, by contrast, typically examines the query and each candidate jointly, directly comparing the specific pairing rather than comparing two independently computed representations, which lets it capture considerably more nuanced relevance signal, but at real computational cost that scales with how many candidates it needs to evaluate this way.

This is the fundamental architectural difference between the two stages, often described as the distinction between a bi-encoder, which embeds the query and candidates independently and compares the results, the approach behind ordinary vector search, and a cross-encoder, which processes the query and a specific candidate together as one combined input, the approach typically used for reranking. A cross-encoder simply couldn’t be run against an entire large collection directly, its per-comparison cost is too high to apply at that scale, which is exactly why it gets reserved for reranking a much smaller set of candidates that an earlier, faster stage has already narrowed down.

How the two-stage pattern gets its accuracy and speed benefits together

The two-stage retrieval pattern, fast, approximate search first, followed by slower, more precise reranking on a narrowed candidate set, is specifically designed to capture the best of both approaches, the speed needed to search a large collection at all, combined with the precision needed to produce a genuinely well-ordered final result. Running vector search first to retrieve, say, the top fifty candidates, then reranking just those fifty with a cross-encoder, costs considerably less than running the cross-encoder against the entire collection directly, while still delivering meaningfully better final ranking quality than trusting the first stage’s ordering alone.

This pattern mirrors a broader principle that shows up throughout this collection’s discussion of inference optimization and cascading, applying an expensive, precise method only to a narrowed, promising subset rather than to an entire large collection, capturing most of the accuracy benefit of the expensive method while paying its cost only where it’s actually likely to matter.

Why reranking often catches errors the first stage’s ranking misses

Vector search’s initial ranking, based purely on embedding similarity, doesn’t always place the truly most relevant result at the very top, since embedding similarity captures general semantic relatedness rather than the finer, more precise judgment of which specific candidate best answers a specific query, covered in more depth in this collection’s discussion of embedding similarity’s limitations. A reranking step, examining each candidate against the query more directly and specifically, frequently reorders the initial candidate set meaningfully, promoting a candidate that was ranked lower by pure embedding similarity but that a more careful, joint comparison recognizes as genuinely more relevant.

This reordering effect is where reranking’s practical value comes from, it’s not merely a refinement of an already-good ranking, it’s frequently a meaningful correction to ranking errors the faster first stage introduced simply by relying on a less precise comparison method, and the size of this improvement is exactly what a team should measure directly when deciding whether reranking is worth its added cost for a given application.

Why reranking isn’t automatically worth adding to every retrieval system

Reranking adds real latency and computational cost, since it requires running a considerably more expensive model against every candidate in the narrowed set for every single query, and this cost needs to be weighed against the actual improvement it delivers for a given application, connecting to the broader latency-versus-quality tradeoff covered throughout this collection’s infrastructure discussions. For applications where initial vector search already produces a good enough ranking for practical purposes, adding reranking increases cost and latency without a correspondingly meaningful quality improvement, while for applications where getting the very top result exactly right matters enormously, the accuracy gain reranking provides can easily justify its added cost.

This is an empirical question specific to a given application’s actual content and query patterns, connecting to the broader discussion of AI native testing covered elsewhere in this collection, measuring how much reranking actually improves final ranking quality on a representative sample of real queries, rather than assuming reranking is either always worth adding or never worth the added complexity, is what determines whether it’s the right choice for a specific system.

How many candidates to rerank, and why that number matters

Deciding how many initial candidates to pass into the reranking stage is its own meaningful tuning decision, reranking too few candidates risks the true best result never having made it into that narrowed set in the first place, since the first stage’s imperfect ranking might have placed it just outside the cutoff, while reranking too many candidates increases cost and latency without a correspondingly meaningful improvement in final quality, since most of the additional candidates beyond a certain point are unlikely to be genuinely competitive anyway.

Finding the right number here benefits from the same empirical approach covered throughout this article, measuring how often the truly best result falls within different candidate-set sizes for a representative sample of real queries, and choosing a cutoff that reliably captures the genuinely competitive candidates without unnecessarily reranking a much larger set that adds cost without meaningfully improving the final outcome.

Why reranking connects directly to how well a RAG system’s generation step performs

For retrieval-augmented generation specifically, covered in this collection’s discussion of vector databases for RAG, reranking has an outsized effect on final answer quality precisely because the generation step typically has room for only a limited number of retrieved passages within its context window, which means getting the truly most relevant passages into that limited slot matters considerably more than it would for an application, like a general search interface, where a user can scan past a few less-than-perfect results near the top of a longer list. A RAG system passing its top handful of results directly into a language model’s context benefits disproportionately from reranking’s improved precision at the very top of the ranking, exactly where a generation step’s limited context window is most sensitive to getting the ordering right.

This is part of why reranking has become a particularly common addition specifically to RAG pipelines, even in systems that might not bother with it for other, less context-constrained applications, the cost of reranking is easier to justify when the alternative is a language model generating its response based on a meaningfully worse, unranked set of passages that happened to fit within its available context budget.

Common mistakes teams make around reranking

1. Adding reranking to a system without measuring how much it actually improves final ranking quality, rather than assuming it’s automatically worth its added cost.

2. Reranking too small a candidate set, risking that the truly best result was already excluded by the first stage’s imperfect initial ranking.

3. Reranking an unnecessarily large candidate set, paying real cost and latency for candidates that were never genuinely competitive for the top position anyway.

4. Treating reranking as a universal best practice rather than a targeted improvement worth applying specifically where the added precision at the top of the ranking genuinely matters, like RAG pipelines with limited context budgets.

5. Skipping reranking for a RAG system with a tightly limited context window, missing that this is precisely the situation where reranking’s improved top-of-ranking precision delivers the most meaningful value.

What connects these mistakes is treating reranking as either a mandatory step or an unnecessary complication without actually measuring its impact for a specific application, reranking’s value comes from a real, measurable tradeoff between added cost and improved ranking precision, and applying it well requires understanding both sides of that tradeoff for the specific system it’s being added to.

The deeper point about reranking is that it embodies a broader pattern that shows up throughout retrieval system design, matching the precision of a method to where that precision actually matters most rather than applying the same approach uniformly everywhere, a fast, approximate first pass finds the plausible candidates, and a slower, more careful second pass gets the final ordering right specifically where getting it right actually changes what a user or a downstream system ultimately sees.