Is an LLM Overkill for Classification? Usually: Fine-Tuned Small Models Match It at a Fraction of the Cost
For routing and yes/no decisions with a fixed label set, a fine-tuned encoder, SetFit or an embedding router usually does the job for one to two orders of magnitude less. A frontier LLM still earns its place on a short list of cases.
For most routing and yes/no decisions, a large language model is overkill once you have a fixed label set and some labeled examples. A 2026 study found that fine-tuned BERT-family encoders beat GPT-4o and Claude Sonnet 4.5 prompting on three of four standard text classification datasets, at one to two orders of magnitude lower cost and latency. With no labels at all, a small LLM that is restricted to your label set costs about $0.03 per 1,000 decisions at today's list prices. A frontier LLM is worth paying for when you have no labels, your categories change weekly, or the decision needs multi-step judgment.
Fine-tuned small models come within about two points of LLMs on text classification
A broad comparison is a benchmark by Washington Cunha, Leonardo Rocha and Marcos André Gonçalves, posted to arXiv on April 2, 2025. It ran 12 methods on 22 datasets. The methods ranged from TF-IDF features with logistic regression or a support vector machine, through small language models such as RoBERTa, up to five open LLMs of 7 to 8 billion parameters.
The LLMs won on 21 of the 22 datasets, but the margin over small models was narrow. The authors report that LLMs beat small models such as RoBERTa by 1.9% on average and by 4.9% at most. Against the traditional TF-IDF methods, the lead was 7.1% on average and up to 26%. The cost of that edge was large. The LLMs were on average 8.5 times slower than the small models and 590 times slower than the traditional methods.
One detail matters for anyone reading these numbers as "LLM versus BERT." The LLMs in that study were fine-tuned with QLoRA, not prompted. A prompted frontier model through an API is a different option, and a second study measured it directly.
Prompted frontier models lose to fine-tuned encoders on most of the standard tasks
Alberto Andres Valdes Gonzalez's paper, posted on February 6, 2026, compared fine-tuned BERT, DistilBERT and RoBERTa with zero-shot and few-shot prompting of GPT-4o and Claude Sonnet 4.5. It used four public datasets: IMDB, SST-2, AG News and DBPedia. Its code and data are public.
The fine-tuned encoders won on three of the four. On the AG News topic task, RoBERTa scored 94.63 macro-F1 against 91.35 for Claude Sonnet 4.5 zero-shot and 87.93 for GPT-4o zero-shot. On SST-2 sentiment, BERT scored 94.42 against 87.00 for GPT-4o zero-shot. The prompted LLMs won only on IMDB, where Claude Sonnet 4.5 few-shot reached 96.48 against 94.84 for RoBERTa.
The cost and speed figures explain why the paper calls indiscriminate LLM use "suboptimal" for standard classification. On AG News, the paper puts a fine-tuned BERT at $10.44 per million requests on a small Cloud Run container with 2 vCPUs. GPT-4o zero-shot cost $276 per million at January 22, 2026 prices, and Claude Sonnet 4.5 zero-shot cost $440.58. Median end-to-end latency was 197 ms for BERT, 411 ms for GPT-4o and 1,435 ms for Claude Sonnet 4.5.
A third paper, posted on October 16, 2026 by Shivam Mathur and colleagues, found the same pattern on a 16-class survey task. A fine-tuned RoBERTa scored 96% F1 against 83% for GPT-3.5. On 10,000 records, RoBERTa took 12 minutes on a T4 GPU, while GPT-3.5 took 6 hours.
These results come from sentiment, topic and survey datasets. No published benchmark has yet run the full range of methods on the same routing and yes/no tasks, so the gap on your own intents or approval rules has not been measured.
Each cheaper method fits a different amount of labeled data
The methods below are listed from cheapest to most expensive to run. The right one depends mostly on how many labeled examples you have and how often the labels change.
- Writing rules or regular expressions works when the signal is a keyword, a format or an ID pattern. Rules match only the exact patterns that you write, so a reworded request falls through.
- Training TF-IDF features with logistic regression gives a fast baseline on a CPU once you have labeled data. Cunha et al. recommend these traditional methods when resources are limited.
- Using an embedding router sends each query to the route whose example phrases are closest in meaning. Aurelio Labs' open-source Semantic Router defines a route as a name plus a list of example utterances, so a new route is a new list of examples.
- Training SetFit suits the case of 8 to 50 labels per class. Hugging Face reported that SetFit with 8 examples per class was competitive with RoBERTa Large trained on the full 3,000-example set of the Customer Reviews task.
- Fine-tuning an encoder such as ModernBERT or RoBERTa suits teams with hundreds to thousands of labels. Cunha et al. call RoBERTa-class models a near-optimal balance of accuracy and efficiency. ModernBERT's base model has 149 million parameters and accepts inputs of up to 8,192 tokens.
- Prompting a small LLM restricted to your label set needs no training data. OpenAI's Structured Outputs accepts an
enumof allowed labels, and its guide says that completed, non-refusal output is constrained to the supplied schema. Applications still need to handle refusals and incomplete responses. - Prompting a frontier LLM handles the hardest and least-defined cases at the highest cost per decision.
SetFit's training costs are small enough to change the calculation. Hugging Face measured about 30 seconds on one V100 GPU, roughly $0.025, for a model trained on 8 examples per class. On the RAFT few-shot benchmark, its 355-million-parameter version scored 71.3, against 62.7 for the 175-billion-parameter GPT-3.
Routing needs a plan for queries that match no route
Routing has one problem that standard classification benchmarks do not test: queries that belong to no route at all. Semantic Router's documentation says that "by default the best route always wins," which means that an off-topic query still lands somewhere. To allow a "no route" result, the library fits a confidence threshold on labeled examples that include out-of-scope queries. The same README describes a Chain option that falls back from the fast router to a slower one when the score is low.
An open-source example of this idea is the vLLM Semantic Router. Its October 9, 2025 paper describes a fine-tuned ModernBERT classifier that labels whether a prompt needs reasoning mode, and that also screens for personal data and jailbreak attempts. Against direct vLLM inference, the authors report 10.2 percentage points higher accuracy on MMLU-Pro, 47.1% lower latency and 48.5% fewer tokens. The paper does not report how long the classifier itself takes, and it does not evaluate the privacy or jailbreak checks.
The cost of adding a route differs by method. An embedding router needs new example phrases and a refit of its threshold. A fine-tuned encoder needs labeled examples for the new class and a retraining run. A prompted LLM needs only a new label in the prompt. No study has measured these costs side by side.
Yes/no gates depend on confidence scores that you can trust
A yes/no gate, such as approve or escalate, is only as useful as its confidence score. The score determines which cases are handled automatically and which go to a person or a larger model.
Scikit-learn's documentation defines the standard: among predictions with a score of about 0.8, about 80% should belong to the positive class. It plots this as a reliability curve. Logistic regression tends to produce well-calibrated scores by itself. Naive Bayes tends to push scores toward 0 or 1, and support vector machines produce an S-shaped curve. Scikit-learn's CalibratedClassifierCV corrects these scores on held-out data. Its isotonic method works as well as or better than the sigmoid method once you have more than about 1,000 samples.
A small LLM can produce a similar score. OpenAI's logprobs guide shows how to read the probability of each label token and send cases below a threshold to manual review. The same guide warns that this confidence "measures certainty in the classification, not whether the classification is correct." Published reliability curves for single-token yes/no probabilities on approval or policy tasks do not exist in these sources. That calibration has not been measured, so check it on a held-out set before trusting a threshold.
A cascade sends only the uncertain cases to the LLM
The most practical design combines a cheap model and a large one. The cheap classifier handles every request, and only requests with a score below a threshold go to the LLM. The LLM's answers on those escalations can then become new training labels for the small model.
Mathur et al. report the clearest result for a combined system. An ensemble of the fine-tuned RoBERTa and GPT-3.5 reached 97.5% F1, above either model alone, at 4.4% of the inference cost of running GPT-3.5 by itself. The abstract does not explain how the work was split between the two models. For routing and yes/no gates specifically, the share of traffic that a cascade resolves automatically and its blended accuracy have not been measured. The improvement from retraining on LLM-labeled escalations over several rounds has not been measured either.
The labeling step is cheap at current prices. Labeling 2,000 examples with Claude Opus 5.5, at 300 input tokens and 50 output tokens each, costs about $4.40 at its list price of $4 per million input tokens and $20 per million output tokens.
The decision by situation follows from labels, churn, volume and reasoning
This table maps each situation to a method and to the published evidence behind it.
| Situation | Method to start with | Why it fits |
|---|---|---|
| No labeled data | Small LLM restricted to the label set | Needs no training; about $0.03 per 1,000 at Claude Haiku 5.5 list price |
| 8 to 50 labels per class | SetFit, or an embedding router | SetFit 71.3 vs GPT-3 62.7 on RAFT |
| Hundreds to thousands of labels | Fine-tuned encoder, with a TF-IDF baseline first | Encoders beat prompted GPT-4o on 3 of 4 datasets |
| Categories change weekly | Embedding router or prompted LLM | A new route needs examples or a prompt edit, not a retrain |
| Multi-step policy judgment | Frontier LLM, behind a cheap first pass | The decision needs reasoning across several conditions |
Volume moves the line between these options. At a few hundred decisions a day, the API bill for a frontier model is small, and the engineering time for a fine-tuned model may cost more. At 100,000 decisions a day, the gap is large. Assume 300 input tokens and 5 output tokens per decision, standard rates and no reasoning tokens. Claude Opus 5.5 then costs $1.30 per 1,000 decisions, or $3,900 a month. Claude Haiku 5.5 costs about $97.50 a month. A fine-tuned BERT at the Valdes Gonzalez serving figure costs about $31 a month.
A cascade sits between them. Suppose that the BERT model scores every request and that Opus 5.5 handles the uncertain share. At a cautious threshold that escalates 20% of traffic, the monthly cost is about $811. At a looser threshold that escalates 5%, it is about $226. These escalation shares are assumptions, because no study has measured them for routing or yes/no gates.
Decision models are a newer option for gates that choose from a fixed list of actions. Parsec's TOD model ranks the allowed actions for each turn and passes the turn unchanged to the parent LLM when its confidence gate is not met. According to Parsec's TOD page, it costs $0.30 per 1,000 decisions, separate from parent-model fees, with a median forward pass of 69 ms on one H100 GPU. These are Parsec's own figures, not independent measurements. The same page reports that the release scored slightly below its untrained base model on a public decision benchmark.
The LLM is the right tool in four situations
An LLM is not overkill in these cases, because the cheaper methods need labels, retraining or setup time that these cases do not allow.
- With no labeled data, an LLM gives usable answers on day one, while every trained method needs examples first. Mathur et al. note that GPT-style models need only 1 to 5 examples per class.
- With categories that change faster than you can retrain, a prompted LLM takes a new label immediately.
- With multi-step policy judgments, such as deciding whether a refund request meets several conditions, the decision needs reasoning that a single-pass classifier does not perform.
- With very low volume, the API cost is small enough that a trained model does not pay back its setup time.
The accuracy gap between LLMs and the cheaper methods on these four kinds of cases has not been measured.
RouteLLM is often cited in these discussions, but it solves a different problem. It chooses which LLM answers a query, not which label a query gets. The LMSYS team reported on July 1, 2024 that its routers cut costs by over 85% on MT Bench, 45% on MMLU and 35% on GSM8K against GPT-4 alone, while keeping 95% of GPT-4's quality. Those savings come from sending easy questions to a cheaper model. They do not measure intent or yes/no accuracy.
Sources
- Cunha, Rocha and Gonçalves, A thorough benchmark of automatic text classification (arXiv 2504.01930): https://arxiv.org/abs/2504.01930
- Cunha et al., full text (HTML): https://arxiv.org/html/2504.01930v1
- Valdes Gonzalez, Cost-Aware Model Selection for Text Classification (arXiv 2602.06370): https://arxiv.org/abs/2602.06370
- Valdes Gonzalez, full text (HTML): https://arxiv.org/html/2602.06370
- Mathur et al., Best of Both Worlds: Fine-Tuned Small Models Complement LLMs (arXiv 2610.24260): https://arxiv.org/abs/2610.24260
- Hugging Face, SetFit: Efficient Few-Shot Learning Without Prompts: https://huggingface.co/blog/setfit
- Tunstall et al., Efficient Few-Shot Learning Without Prompts (arXiv 2209.11055): https://arxiv.org/abs/2209.11055
- Hugging Face, Finally, a Replacement for BERT: Introducing ModernBERT: https://huggingface.co/blog/modernbert
- Aurelio Labs, Semantic Router: https://github.com/aurelio-labs/semantic-router
- Wang et al., When to Reason: Semantic Router for vLLM (arXiv 2510.08731): https://arxiv.org/abs/2510.08731
- vLLM Semantic Router repository: https://github.com/vllm-project/semantic-router
- LMSYS, RouteLLM: An Open-Source Framework for Cost-Effective LLM Routing: https://lmsys.org/blog/2024-07-01-routellm/
- Ong et al., RouteLLM: Learning to Route LLMs with Preference Data (arXiv 2406.18665): https://arxiv.org/abs/2406.18665
- OpenAI, Structured Outputs guide: https://developers.openai.com/api/docs/guides/structured-outputs
- OpenAI, Using logprobs: https://developers.openai.com/cookbook/examples/using_logprobs
- scikit-learn, Probability calibration: https://scikit-learn.org/stable/modules/calibration.html
- Anthropic, Claude pricing: https://platform.claude.com/docs/en/about-claude/pricing
- Parsec, TOD: https://parseclab.ai/tod/