Cross-Encoder
A reranker that reads the query and a document TOGETHER for an accurate relevance score — slow but precise.
A cross-encoder feeds the query and a candidate document into the model together, letting every query token attend to every document token, and outputs a single relevance score. This joint processing is far more accurate than comparing separate embeddings — but far slower.
Worked example: a two-stage search uses a fast bi-encoder to retrieve the top 100 candidates, then a cross-encoder to rerank just those 100 — accuracy where it matters, without scoring the whole corpus. Gotcha: a cross-encoder cannot be precomputed (the score depends on the query), so it runs at query time for every candidate — which is exactly why it is used only to rerank a short list, never to search millions of documents directly.