Cross Encoder vs LLM Reranker: Start With a Compact Cross-Encoder and Add an LLM Only for a Measured Gain
A cross-encoder is a way of scoring, not a model size, and an LLM can be one. The research shows that compact rerankers stay competitive, so the choice comes down to a test on your own retrieved candidates.
For most search and RAG systems, the better first reranker is a compact cross-encoder. An LLM reranker should be added only after a test on your own data shows a gain that pays for its cost and latency. A 2024 comparison of cross-encoders and LLMs for reranking SPLADE results found that GPT-4 performed impressively without training, while traditional cross-encoders remained very competitive and were far more efficient. The Sentence Transformers documentation and the RankLLM toolkit make it possible to run that test on identical retrieved documents. No reranker can recover a relevant document that retrieval failed to return.
A cross-encoder is a way of scoring a query and a document together, not a model size
A cross-encoder reads the query and one candidate document as a single input and produces one relevance score for that pair. Because attention runs across both texts at once, it can judge relevance more precisely than a bi-encoder, which embeds the query and the document separately. The cost of that precision is that every pair needs its own forward pass. According to the Sentence Transformers Retrieve & Re-Rank guide, scoring "thousands or millions" of query and document pairs would be slow. For that reason, a fast retriever first returns a shortlist, for example 100 hits, and the cross-encoder then rescores only that shortlist.
The term says nothing about how large the model is. According to the Sentence Transformers training documentation, a CrossEncoder can wrap encoder models such as BERT, RoBERTa or ModernBERT. It can also wrap a causal language model whose configuration ends in ForCausalLM, such as google/gemma-2-2b-it. In that case, a LogitScore module takes the logits for chosen tokens, such as "yes" and "no," and turns them into one score for each pair. An LLM used this way is a cross-encoder in every technical sense.
So the real question behind "cross encoder vs LLM reranker" is narrower. It asks whether a small model that was trained for relevance scoring is good enough, or whether a large, prompted language model earns its extra cost.
LLM rerankers work in three different ways, and each way has its own costs
LLM reranking is not one method. The RankLLM toolkit, described in a SIGIR 2025 paper, supports all three main strategies in one package:
- A pointwise reranker scores each document on its own, as a compact cross-encoder does. According to RankLLM's README, its authors usually rerank 1,000 candidates with MonoT5, a pointwise model.
- A pairwise reranker compares two documents at a time and asks which one is more relevant. The RankLLM authors recommend reranking only the top 50 candidates with DuoT5, because the number of comparisons grows with the square of the list length.
- A listwise reranker places many documents in one prompt and asks the model to return them in order. RankGPT, RankZephyr and LiT5 work this way, and LiT5-Distill V2 can rerank 100 documents in a single pass.
The listwise approach brings problems that a compact scorer does not have. The first is list order. Tang and colleagues showed in 2023 that LLMs "exhibit positional bias," so the same documents in a different order can produce a different ranking. Their fix shuffles the list several times and combines the results, which improved scores by up to 7% to 18% for GPT-3.5, but it multiplies the number of calls.
The second problem is output format. The SPLADE comparison authors report that GPT-4 needed almost no clean-up of its output. They also report that other models "do not always respect the formatting instructions," so post-processing is strongly recommended for them. RankLLM includes a ResponseAnalyzer that counts these errors, and its authors describe the module as a response to unreliable LLM APIs and to non-deterministic output from mixture-of-experts models.
The third problem is prompt sensitivity. Qin and colleagues argued in 2023 that off-the-shelf LLMs "do not fully understand" pointwise and listwise ranking prompts. Their pairwise prompting method let a 20-billion-parameter open model compete with GPT-4-based results on TREC Deep Learning. The way a ranking prompt is written can change the outcome as much as the choice of model.
The direct comparison found that compact cross-encoders remain competitive with GPT-4
The study that answers the question most directly is "A Thorough Comparison of Cross-Encoders and LLMs for Reranking SPLADE," by Hervé Déjean, Stéphane Clinchant and Thibault Formal, posted on March 15, 2024. They reranked results from strong SPLADE retrievers on TREC Deep Learning and on out-of-domain collections from BEIR and LoTTE.
Their findings point in one direction, with conditions attached:
- On in-domain MS MARCO data, the cross-encoders they tested were hard to tell apart.
- Out of domain, the type of model and the number of documents reranked made a difference, and the effect of reranking depth depended on the dataset.
- Effective cross-encoders paired with strong retrievers outperformed every LLM they tested except GPT-4 on some datasets, "while being far more efficient."
- A cascade did slightly better than GPT-4 alone on TREC DL23. In that cascade, a DeBERTa-v3 cross-encoder reranked the top 200 SPLADE results, and GPT-4 then reranked only the top 25. It scored 63.7 nDCG@10, against 63.0 and 63.1 for GPT-4 alone on 50 and 75 documents.
The efficiency gap was large. The authors report that reranking 50 documents could take up to a minute with GPT-4 or Llama 70B on an H100 GPU. They also wrote that the cost of OpenAI's models prevented them from testing those models at full scale. Their conclusion is that LLM rerankers are new "contenders" on the trade-off between effectiveness and efficiency, not automatic replacements for cross-encoders.
The authors also point to the design that most teams should test. They note that an effective cross-encoder can select the candidates that a costly LLM then reranks in a cascade. The cascade gain on TREC DL23 was under 1 point, and the authors write that differences of that size are usually not considered significant.
A 6-layer compact cross-encoder matches a 12-layer one at nearly twice the speed
The Sentence Transformers pretrained-model table shows how much quality a small model delivers. The figures below come from that table. The page does not state the hardware behind its documents-per-second column, so the speeds are useful only for comparing these models with one another.
| Model | NDCG@10, TREC DL19 | MRR@10, MS MARCO dev | Docs per second |
|---|---|---|---|
ms-marco-TinyBERT-L2-v2 |
69.84 | 32.56 | 9,000 |
ms-marco-MiniLM-L4-v2 |
73.04 | 37.70 | 2,500 |
ms-marco-MiniLM-L6-v2 |
74.30 | 39.01 | 1,800 |
ms-marco-MiniLM-L12-v2 |
74.31 | 39.02 | 960 |
Doubling the depth from 6 to 12 layers roughly halves the speed and adds 0.01 points of NDCG@10. The same documentation lists larger community rerankers that are also cross-encoders, including BAAI/bge-reranker-v2-m3, BAAI/bge-reranker-v2-gemma and Alibaba-NLP/gte-reranker-modernbert-base.
No reranker can recover a relevant document that retrieval did not return
A reranker only reorders the candidates that it receives. If the relevant document is not in the retrieved pool, every reranker fails on that query, whatever its size. Retrieval recall at the chosen depth therefore sets the ceiling for every reranking result.
The Sentence Transformers documentation shows how easily an evaluation can hide this ceiling. By default, its CrossEncoderRerankingEvaluator adds every known relevant document to the list, even when retrieval missed it. According to the documentation, this setting gives "a slightly unrealistic performance." In its worked example, ms-marco-MiniLM-L6-v2 on 1,000 GooAQ questions lifts NDCG@10 from 59.12 to 71.35 in the default setting. With always_rerank_positives=False, which keeps only the documents that retrieval actually found, the result is 70.10. Any comparison between rerankers should use the realistic setting and report retrieval recall next to the ranking scores.
A fair test freezes retrieval and gives every reranker the same candidates
No published experiment yet compares no reranking, a compact cross-encoder, an LLM reranker, a compact-to-LLM cascade and a decision model on identical frozen candidates with answer correctness, p95 latency and cost per query. That measurement has not been made, so each team has to run it on its own data. The protocol below uses only documented tools.
- Freeze retrieval. Save the top 100 candidates for each query from your current retriever, and save the retriever's own ranking as the no-reranking baseline.
- Record retrieval recall at each depth that you plan to test, such as 10, 20, 50 and 100.
- Fix a document-length policy. RankGPT truncates documents to 300 tokens by default, and the SPLADE authors found that removing titles cost DeBERTa-v3 5 points of nDCG@10 but cost GPT-4 only 1 point. Every reranker should see the same text.
- Split queries into development and held-out test sets before you mine negatives or tune anything, so that no test query leaks into training or prompt design.
- Run four configurations on the same candidates: no reranking, compact only, LLM only and compact-to-LLM.
- Sweep reranking depth for each configuration, because the SPLADE study found that the best depth varied by dataset.
- Repeat the run on at least two domains with held-out relevance labels.
The compact baseline can be scored with code from the Sentence Transformers documentation. The example below runs the realistic evaluator at several depths on candidates that are already ranked by your retriever.
from sentence_transformers import CrossEncoder
from sentence_transformers.cross_encoder.evaluation import CrossEncoderRerankingEvaluator
model = CrossEncoder("cross-encoder/ms-marco-MiniLM-L6-v2")
# frozen: list of {"query": str, "positive": [str], "documents": [str]}
# where "documents" is the retriever's ranked top 100 for that query
for depth in (10, 20, 50, 100):
samples = [
{"query": s["query"], "positive": s["positive"], "documents": s["documents"][:depth]}
for s in frozen
]
evaluator = CrossEncoderRerankingEvaluator(
samples=samples, batch_size=32, name=f"heldout-top{depth}",
always_rerank_positives=False,
)
print(depth, evaluator(model))
The LLM arms can be run with RankLLM, whose README shows retrieval, reranking with ZephyrReranker or an OpenAI model, nDCG@10 evaluation and error counting in one script. RankLLM's current release is 0.26.0. Pin that version, the Sentence Transformers version and each model's Hugging Face commit, and save the prompt templates, batch sizes, hardware, precision and concurrency with the results.
Ranking scores are only part of the result, so latency, cost and answer quality need separate numbers
A reranker that improves nDCG@10 does not always improve the final answer in a RAG system. The test should therefore report several separate results:
- Ranking quality, as nDCG@10 and MRR@10 for each domain, with confidence intervals across queries.
- Downstream answer correctness, judged against held-out labels with the same generator for every arm.
- Latency at p50 and p95, measured for the reranker alone and for the full request, with retrieval and generation timed separately.
- Throughput and GPU memory at the concurrency that you expect in production.
- Full cost per query, including every stage of a cascade and every retry after a formatting failure.
Latency figures need care. Peng and colleagues pointed out in 2025 that latency and token counts depend on hardware and on choices such as batch size, and they proposed measuring ranking quality per petaFLOP instead. Reporting the hardware and settings with each latency figure keeps the numbers comparable.
Parsec's TOD is a decision model, and its fit for relevance ranking has not been shown
Parsec's TOD is a different kind of entrant, which Parsec calls a "universal decision model." It ranks the next action from a list of allowed actions and returns one probability for each supplied option. According to its model card, the release consists of LoRA adapters on google/gemma-4-12B-it plus a ModernBERT-base retriever that shortlists options. That design is different from a compact encoder cross-encoder. A query and its candidate documents could be mapped onto TOD's state, question and options inputs, and sorting the option probabilities would give a full ordering. That conversion has not been validated for relevance ranking, and Parsec's pages give no nDCG or MRR results for it. Parsec's TOD page lists a price of $0.30 per 1,000 decisions, flat regardless of context length. The adapters are Apache-2.0, but users must accept the Gemma 4 licence for the base model, and according to the repository, TOD was measured with up to 300 options. Its option probabilities sum to 1 across the options supplied, so they describe relative preference within one list.
The decision depends on whether a larger model shows a measured gain on your own candidates
The evidence supports a clear order of choices for each situation:
- If retrieval recall at your chosen depth is low, improve retrieval first, because reranking cannot add documents that are missing.
- If a ready-made compact cross-encoder such as
ms-marco-MiniLM-L6-v2meets your quality and p95 latency targets on held-out queries, keep it. - If a larger cross-encoder such as a BGE or GTE reranker improves held-out nDCG@10 and answer correctness within your latency budget, move to it before trying a prompted LLM.
- If an LLM or a cascade improves answer correctness by a margin that justifies its full cost per query, use the cascade and keep the LLM's shortlist small.
- If none of the ready-made models meets your target, consider tuning a cross-encoder on your own domain. Compare it with the frozen baselines on a split that was made before training. According to the Sentence Transformers documentation, fine-tuning can be crucial to keep a reranker from reducing performance on a specific use case.
A worked example shows how fast LLM reranking costs grow with depth
The figures below are list prices applied to stated assumptions. They are not measurements of any system. The sample workload is 1 million queries a month.
The LLM arm uses OpenAI's gpt-6.2-sol at its standard price of $2.00 per million input tokens and $10.00 per million output tokens. Each listwise call holds 20 documents of 300 tokens plus 200 tokens of instructions, which is 6,200 input tokens, and returns about 100 output tokens. One call costs $0.0124 for input and $0.001 for output, or $0.0134.
- Reranking the top 20 with the LLM only costs $13,400 a month. If 5% of calls had to be retried after a formatting failure, the total would be $14,070. The real retry rate has not been measured for this model.
- Reranking the top 100 with the LLM only, using a sliding window of 20 documents that moves 10 places at a time, takes 9 calls per query. That is about $120,600 a month before retries.
- Reranking the top 100 with a compact cross-encoder on one Together H100 dedicated endpoint at $5.49 an hour costs $3,952.80 for a 30-day month. The average load is 100 million pairs a month, or about 39 pairs per second. Whether one GPU carries peak traffic at your latency target has not been measured.
- A cascade that runs the compact model on 100 candidates and the LLM on the top 20 costs about $18,023 a month with the same 5% retry assumption.
On these assumptions, the cascade costs about 4.6 times as much as the compact reranker alone. It needs to show a matching gain in answer quality to be worth that difference.
A relevance score is not a probability that an answer is correct
According to the Sentence Transformers documentation, a cross-encoder's raw output usually falls between -10 and 10, and a sigmoid only rescales it to between 0 and 1. Turning that score into a calibrated probability of correctness would need its own check on held-out labels. A relevance score should not, by itself, give a system permission to take an action.
Sources
- Sentence Transformers, Cross Encoder Training Overview: https://www.sbert.net/docs/cross_encoder/training_overview.html
- Sentence Transformers, Retrieve & Re-Rank: https://www.sbert.net/examples/sentence_transformer/applications/retrieve_rerank/README.html
- Sentence Transformers, Cross Encoder Pretrained Models: https://www.sbert.net/docs/cross_encoder/pretrained_models.html
- Déjean, Clinchant and Formal, A Thorough Comparison of Cross-Encoders and LLMs for Reranking SPLADE (abstract): https://arxiv.org/abs/2403.10407
- Déjean, Clinchant and Formal, full text: https://arxiv.org/html/2403.10407v1
- Sharifymoghaddam et al., RankLLM: A Python Package for Reranking with LLMs: https://arxiv.org/abs/2505.19284
- RankLLM repository: https://github.com/castorini/rank_llm
- Sun et al., Is ChatGPT Good at Search? (RankGPT): https://arxiv.org/abs/2304.09542
- Qin et al., Large Language Models are Effective Text Rankers with Pairwise Ranking Prompting: https://arxiv.org/abs/2306.17563
- Tang et al., Found in the Middle: Permutation Self-Consistency Improves Listwise Ranking in Large Language Models: https://arxiv.org/abs/2310.07712
- Peng et al., Efficiency-Effectiveness Reranking FLOPs for LLM-based Rerankers: https://arxiv.org/abs/2507.06223
- OpenAI, API pricing: https://developers.openai.com/api/docs/pricing
- Together AI, Pricing: https://www.together.ai/pricing
- Parsec, TOD: https://parseclab.ai/tod/
- Parsec, TOD model card: https://huggingface.co/parsecai/tod