Rerankers vs Classifiers: Use a Classifier for Fixed Labels and a Reranker When the Options Change
A fixed-label classifier is the right tool when categories stay put. Cross-encoder rerankers and zero-shot classifiers score candidate options supplied at run time, but a relevance score is not proof that an option is the right action.
Use a fixed multiclass classifier when the set of categories is stable and you have labelled examples, and use a cross-encoder reranker or a zero-shot classifier when the candidate options change from request to request. A classifier learns one output per class, so adding a class means retraining. A reranker scores each input and candidate pair, so new options cost nothing to add but each one costs a forward pass. For choosing actions, the deciding test is decision accuracy and safe abstention, not topical relevance, and nobody has published that comparison yet.
The choice depends on whether the options are fixed or supplied at run time
Each method fits a different shape of problem. The table gives a starting choice for four common situations.
| Situation | Starting choice | Why |
|---|---|---|
| Stable labels such as billing, technical, sales, with labelled data | Fixed multiclass classifier | One pass returns a score for every class |
| Options that change per request and carry rich descriptions | Cross-encoder or decision-trained scorer | Each option is scored together with the input |
| A few changing labels and little training data | NLI zero-shot classifier | Labels are written as text at inference time |
| Hundreds or thousands of candidates | Retrieve a shortlist, then rerank | Scoring every pair grows with the pool |
A Hugging Face blog post on decision models, published November 10, 2026, draws the same line. It says that in classification the output classes are "baked into the model's classification head," while in zero-shot classification "we supply the candidate labels at inference time."
Architecture and training objective are two separate choices
The word "reranker" describes an objective more than an architecture. The Sentence Transformers documentation describes a Cross Encoder as a model that "calculates a similarity score given pairs of inputs." The same pair-input design can be trained for different outputs.
The training overview makes the split explicit. It says that "Rerankers always have just 1 output label," set with num_labels=1, while "Pair Classifiers generally have more than 1 output label." The NLI cross-encoders in the Sentence Transformers model list are an example of the second kind. A model such as cross-encoder/nli-deberta-v3-base returns three scores per pair, mapped to contradiction, entailment and neutral.
Zero-shot classification in Hugging Face Transformers is built on that NLI kind. The pipeline source code treats the input as the premise and fills each candidate label into a hypothesis. The default template is "This example is {}." The code then finds the label whose name starts with "entail" and uses its logit as the score. With multi_label=False, it applies a softmax across all candidate labels, so the scores sum to 1. With multi_label=True, each label is scored on its own, as entailment against contradiction.
So a zero-shot classifier and a reranker do similar work. Both pair the input with each option and run the model once per pair. They differ in what the model was trained to predict: logical entailment for one, search relevance for the other.
A relevance score can rank the wrong action first
A retrieval-trained reranker is optimised to rank passages that answer a query. Its score measures topical fit. Choosing an action requires a different judgement: whether the option is correct under the current state and policy.
Consider a refund request for an order that, according to the stored state, falls outside the refund window. The option "Issue a full refund to the original payment method" shares almost every word with the request. The correct option, "Explain the refund policy and offer store credit," shares fewer. A relevance score can rank the first one higher, because topical overlap is what the model was trained to reward. Whether a specific model makes that mistake on a specific dataset has not been measured.
The Sentence Transformers training overview warns about this gap in general terms. It says: "To avoid the reranker model reducing the performance on your use case, finetuning it can be crucial." It also says that training success "often depends on the quality of the negatives." For action selection, the most useful hard negatives are exactly these near misses: options that are on topic but wrong.
Score scales add a second trap. The documentation says that MS MARCO cross-encoders return logits that "can reasonably range between -10 and 10." A sigmoid maps them to 0 to 1 but "does not affect the ranking." A score of 0.9 after a sigmoid therefore does not mean a 90% chance that the option is correct.
One shared contract makes the four methods comparable
The four methods return different things. A classifier returns a class ID and per-class probabilities. A reranker returns one scalar relevance score per pair. The zero-shot pipeline returns labels sorted by a softmax over entailment logits. A decision-trained scorer returns one probability per supplied option.
Putting them behind one interface keeps the comparison fair. The contract below takes a state, a question and a list of options, filters the options by rules, and returns either a selected option or a deferral.
from dataclasses import dataclass
@dataclass
class Option:
id: str
text: str
@dataclass
class Decision:
option_id: str | None # None means defer or none-of-the-above
score: float | None # raw score from the method
kind: str # "class_prob", "relevance", "entailment_prob", "option_prob"
def eligible(state: dict, options: list[Option]) -> list[Option]:
# Hard rules run before any model. Example: no refund outside the window.
if state.get("days_since_order", 0) > state.get("refund_window_days", 30):
options = [o for o in options if o.id != "refund_full"]
return options
The stable support-routing case fits a plain classifier. This example uses scikit-learn, whose documentation says that LogisticRegression "is more likely to return well calibrated predictions by itself."
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.linear_model import LogisticRegression
from sklearn.pipeline import make_pipeline
texts = ["I was charged twice", "The app crashes on login", "Do you offer a team plan?"]
labels = ["billing", "technical", "sales"]
clf = make_pipeline(TfidfVectorizer(), LogisticRegression(max_iter=1000))
clf.fit(texts, labels)
def classify(state, question, options):
probs = clf.predict_proba([state["message"]])[0]
i = probs.argmax()
return Decision(option_id=clf.classes_[i], score=float(probs[i]), kind="class_prob")
The variable-action case needs a method that accepts options as text. The zero-shot pipeline and a cross-encoder both do.
from transformers import pipeline
from sentence_transformers import CrossEncoder
zs = pipeline("zero-shot-classification", model="facebook/bart-large-mnli")
ce = CrossEncoder("cross-encoder/ms-marco-MiniLM-L6-v2")
def zero_shot(state, question, options):
out = zs(state["message"], candidate_labels=[o.text for o in options],
hypothesis_template="The correct next step is: {}")
best = next(o for o in options if o.text == out["labels"][0])
return Decision(option_id=best.id, score=out["scores"][0], kind="entailment_prob")
def rerank(state, question, options):
query = f'{question}\n{state["message"]}\n{state["policy"]}'
ranked = ce.rank(query, [o.text for o in options])
top = ranked[0]
return Decision(option_id=options[top["corpus_id"]].id, score=float(top["score"]), kind="relevance")
A decision-trained scorer fits the same contract. The repository for Parsec's TOD, for example, documents a predict(state, options, question, images) call that returns one probability per supplied option, summing to 1. It slots into the same contract once it is loaded as the repository describes.
The threshold and the deferral path matter more than the top score
A score normalised across candidates always picks a winner. The zero-shot softmax and TOD's option probabilities both sum to 1 over the options that were supplied. If none of the options is acceptable, one of them still receives the highest probability.
That is why the contract returns None. The application needs an explicit rule for deferring, set on data that the model never trained on. The scikit-learn calibration guide gives the reason. It says a calibrator fitted on the classifier's own training output becomes "a biased calibrator" that pushes probabilities toward 0 and 1.
Raw maximum probabilities are also hard to compare across lists of different lengths. The Hugging Face decision post defines confidence for K options as (p_max − 1/K) / (1 − 1/K), so a uniform distribution scores 0. A top probability of 0.40 gives a confidence of 0.25 with five options and about 0.37 with twenty. A fixed raw threshold would treat those two cases the same.
Three rules keep the gate sensible:
- Apply eligibility rules before scoring, so that a forbidden action can never be selected by a high score.
- Add an explicit none-of-the-above or deferral option, and include test cases in which it is the correct answer.
- Choose the threshold on a separate calibration split, then test it again under new labels or a changed policy.
Selecting an action also does not authorise running it. Arguments such as the refund amount still need to be filled and checked, and permission to execute still has to come from the application.
Decision-trained scorers are the newest option and the least tested
A third family of models is trained to choose among allowed answers rather than to judge relevance or entailment. The Hugging Face decision post frames it as "State + Questions + Allowed Answers → Decisions + Probabilities." It adds that the model "returns the probability parameter itself, leaving the application to decide how to act on it." The post reports no accuracy or calibration benchmarks.
Parsec's TOD is one model of this kind. Parsec's TOD page describes it as a "universal decision model" that ranks the next action from a list of allowed actions and invents no actions. According to its model card, the release is LoRA adapters on google/gemma-4-12B-it plus a ModernBERT-base retriever. The base weights are not included, and users must accept the Gemma 4 licence. Parsec's page labels the evaluation "TOD decision v1 release evaluation, 29 September 2026." On the public JevBench set, that page says that TOD scored below its own untrained base model, and it says that the next release will fix this. The repository says that TOD is not state of the art on JevBench. The TOD page lists a price of $0.30 per 1,000 decisions regardless of context length, with parent-model costs billed separately. Parsec also publishes an MIT-licensed SDK, open-jev, for fine-tuning small decision models.
A fair comparison has to measure decisions, not relevance
No published study compares these four methods on the same decision task with decision-level metrics. A fair one gives every method identical decision-time information: the same state, the same eligible options and the same option descriptions. Labels come from a held-out split.
Five measurements matter for choosing among the methods:
- Report top-1 decision accuracy, which is the share of cases in which the selected option is the correct one.
- Report the consequential-error rate, which is the share of cases in which the method picks an option that causes harm, such as a refund outside policy.
- Count no-valid-option errors, which are cases in which the right answer was to defer but the method selected something.
- Measure calibration with reliability curves such as scikit-learn's
CalibrationDisplay. - Plot risk-coverage curves, which show the error rate on the cases kept at each threshold.
Each figure needs a confidence interval, and the report should include the cases in which a method lost. Retrieval relevance, measured with NDCG@10 or MRR@10, belongs in a separate table.
Candidate recall needs its own line when a retriever builds the shortlist. A scorer cannot select a valid option that was never passed to it. The Sentence Transformers reranking evaluator illustrates the issue. By default it reranks all positives "even if they are not in the documents," which it calls "a slightly unrealistic performance." Its realistic setting reranks only "the positives that the retriever found."
Reproducibility depends on publishing pinned model revisions, prompts and hypothesis templates, training splits, hardware, precision, batch size and raw outputs.
Cost grows with the number of candidates for every pair scorer
A fixed classifier runs once per request, whatever the number of classes. A cross-encoder and an NLI zero-shot classifier run once per option. The Sentence Transformers documentation says Cross Encoders are slower than bi-encoders because they need "computation for each pair rather than each text."
The model list shows how much size matters. It gives about 1,800 documents per second for ms-marco-MiniLM-L6-v2 and about 960 for the twelve-layer version, without naming the hardware. Longer option descriptions add tokens to every pair. That is the reason for the retrieve-then-rerank pattern that the documentation describes, and the reason to measure candidate recall alongside it.
A worked example shows the scale of serving cost. Assume 300,000 decisions a month with 20 candidate options each, so a cross-encoder scores 6,000,000 pairs. At the model list's 1,800 pairs per second, that is about 56 minutes of compute, on hardware that the page does not name. Hugging Face's Inference Endpoints pricing page lists an AWS intel-spr x1 CPU at $0.033 an hour and an nvidia-t4 x1 GPU at $0.50 an hour, billed by the minute. An always-on replica for 730 hours therefore costs about $24.09 a month on that CPU and $365 on the T4. Raising the list from 20 to 300 options multiplies the pairs by 15. How latency and cost scale with candidate count and description length on common hardware has not been measured for these methods side by side.
Test unmodified models first and tune only when decision-level results show a gap
Fine-tuning is worth its cost only after unmodified models have been compared on the same decisions. For stable categories, the test may show that rules or a conventional classifier are the best choice. For options that change per request, compare an NLI zero-shot classifier, a cross-encoder fine-tuned with near-miss negatives and a decision-trained scorer on the same held-out decisions. Deploy whichever keeps consequential errors lowest at the coverage you need.
Sources
- Sentence Transformers, Cross Encoder usage: https://www.sbert.net/docs/cross_encoder/usage/usage.html
- Sentence Transformers, Cross Encoder training overview: https://www.sbert.net/docs/cross_encoder/training_overview.html
- Sentence Transformers, Cross Encoder pretrained models: https://www.sbert.net/docs/cross_encoder/pretrained_models.html
- Hugging Face Transformers, zero_shot_classification.py: https://github.com/huggingface/transformers/blob/main/src/transformers/pipelines/zero_shot_classification.py
- Hugging Face, facebook/bart-large-mnli: https://huggingface.co/facebook/bart-large-mnli
- Hugging Face, Decision Models in Hugging Face: https://huggingface.co/blog/decision
- Hugging Face, Inference Endpoints pricing: https://huggingface.co/docs/inference-endpoints/pricing
- scikit-learn 1.9.1, Probability calibration: https://scikit-learn.org/stable/modules/calibration.html
- Parsec, TOD: https://parseclab.ai/tod/
- Parsec, TOD model card: https://huggingface.co/parsecai/tod
- Parsec, TOD repository: https://github.com/daseinlabs/tod
- Parsec, open-jev repository: https://github.com/daseinlabs/open-jev