RAG

Reranker

A reranker rescoring a small candidate set with a more precise relevance model.

First passReranked1doc Cdoc A2doc Adoc D3doc Ddoc CA slower model re-reads each result with the query.
A reranker rescoring a small candidate set with a more precise relevance model. Values shown in the worked visual are illustrative unless the labels state otherwise.

How it works

First-stage retrieval maximizes recall cheaply, then the reranker spends more compute per candidate. Cross-encoders can inspect query-document interactions directly.

A concrete example

Illustrative: retrieve 100 candidates in 20 ms, rerank them, and pass the top 8 to the model.

Do not confuse it with Retriever

a retriever searches the full collection; a reranker refines its shortlist.

Study the full lesson