Book a 30-min callBook a call

Reranking for search and RAG: cross-encoders, ColBERT and LLM rerankers

How rerankers work in search and RAG: bi-encoders vs cross-encoders, ColBERT late interaction, LLM rerankers, candidate depth, score thresholds and evaluation.

A tall stack of document cards flowing through a search box into a reranker box, which outputs three cards in a new order.
Written by
BYD Tech
Published
Topic
Deep dives
Reading time
13 min read

Questions people ask

How many candidates should I rerank?

Enough that the first stage's recall has leveled off, and no more than your latency budget allows. Measure first-stage recall at depths such as 20, 50, 100 and 200 on labeled queries, then time the reranker at those depths. Rerank at the smallest depth where recall stops rising.

Is a cross-encoder better than an LLM reranker?

Not always in quality, but usually in latency and cost. A fine-tuned cross-encoder runs one fast forward pass per candidate, while listwise LLM reranking needs several sequential calls to a much larger model. RankGPT showed that LLMs can rank very well, and that a small model distilled from their rankings can serve most of that quality cheaply.

Can I compare reranker scores across queries?

Only loosely. Scores are tuned to order candidates within one query, and their spread varies from query to query. If you need a global cutoff, choose it on labeled pairs from your own data, or calibrate the scores first.

Do I need a reranker if I use hybrid search?

Often, yes. Hybrid search improves which candidates are found; a reranker improves their order by reading the text. Test both on your labeled queries: if the first stage already ranks the answer near the top for almost every query, a reranker adds latency for little gain.

Building something like this?