LIVE · Thursday 3 December

Replace LLM Calls With a Small Fine-Tuned Classifier? Swap Routing, Filtering and Triage; Keep Completion Checks

Fine-tuned BERT-class models beat prompted LLMs on fixed-label decisions in the published head-to-head studies. At November 2026 prices, accuracy and latency make the case more often than cost does.

By Surya10 min read

Of the eight decisions a typical workflow agent makes, the ones to replace with a small fine-tuned classifier are those that pick from a fixed set of labels: intent or task routing, spam or "is this actionable" filtering, and priority triage. Policy screening, escalation and tool choice from a small set belong in a cascade, where the classifier answers when it is confident and the LLM takes the rest. Completion checks, open-ended tool choice over long context and anything that writes text should stay with the LLM. Published head-to-head comparisons of fine-tuned BERT vs prompted GPT-class models on intent classification favour the fine-tuned model, but none tests a current frontier model, and with Claude Haiku 5.5 at $0.10 per million input tokens the cost and latency savings now depend heavily on call volume.

The rule Anthropic already wrote down

The design question is older than most agent frameworks. Anthropic's Building Effective Agents, published in December 2024, describes routing as a step that "classifies an input and directs it to a specialized followup task," and says it works "where classification can be handled accurately, either by an LLM or a more traditional classification model/algorithm." The same post advises "finding the simplest solution possible, and only increasing complexity when needed."

That gives a test, not an answer. A trained classifier is a legitimate replacement for an LLM call at a decision point, but only where it can be shown to be accurate. The rest of this piece is about which of the eight decision points pass that test, what the evidence says and where it runs out.

Why a fine-tuned encoder can beat a far larger model

An LLM prompted to classify reads a description of each label and a handful of examples, then reasons its way to an answer. A fine-tuned encoder such as BERT or RoBERTa has seen hundreds or thousands of labelled examples and learned the boundaries between labels directly. On a narrow, stable label set the second approach tends to win, because the boundaries are specific to your data and no prompt describes them fully.

The published results are consistent on this. In a 2024 study of biomedical intent detection by Mullick, Gupta and Goyal, fine-tuned RoBERTa averaged 83.4% accuracy across three datasets, PubMedBERT 82.5% and plain BERT 81.5%, against 50.3% for ChatGPT (gpt-3.5-turbo-instruct) and 44.4% for Llama 2. Even FastText, a far simpler model, reached 79.2%. The authors write that "all the SFT approaches consistently outperform the instruction-tuned ChatGPT."

A September 2025 paper on MultiWOZ dialogue, by Ahmad and colleagues, found the same pattern on multi-label intent with 14 classes: a supervised BERT classifier reached a weighted F1 of 0.89, or 0.92 when given the previous message, while the best 20-shot model, Mistral-7B, reached 0.50.

The banking study by Lajčinová, Valábek and Spišiak (October 2024) is the most useful for agent builders, because it also measures what happens when a query belongs to none of the labels. Fine-tuned SlovakBERT reached 77.2% in-scope accuracy with a 6.3% out-of-scope false-positive rate. Pre-trained gpt-3.5-turbo was close on accuracy at 76.6% but wrongly accepted 32.4% of out-of-scope queries; Gemma 7B pre-trained accepted 73.6%. Fine-tuning gpt-3.5-turbo lifted it to 79.5% and 4.3%, slightly ahead of the small model, which is a reminder that the comparison is between training and prompting as much as between small and large.

Where the evidence runs out

The newest LLMs in these studies are gpt-3.5-turbo, Llama 3 8B and Mistral 7B. No published benchmark compares fine-tuned small classifiers with current frontier models such as Claude Opus 5.5 or gpt-6.2-astra across the decision types an agent makes, so "a classifier wins" is a strong prior from 2024-era evidence, not a measured result for 2026 models. Each study also tests one task on one dataset. None covers completion checks, escalation or tool selection.

The out-of-scope problem cuts the other way. CLINC150, a 2019 benchmark of 150 intents, found BERT at 96% in-scope accuracy or better even with only 50 training queries per intent, but the best system caught only 66% of out-of-scope queries. Classifiers are good at the labels they were trained on and poor at noticing when an input fits none of them. In an agent, that is the case where a human or an LLM most needs to see the input.

The eight decision points, one by one

Intent or task routing. Swap, with a fallback. This is the decision with the most evidence behind it: every study above is an intent task, and the label set is usually small and stable.

Spam, relevance or "actionable" filtering. Swap. A binary or three-way label on short text is the easiest case for a classifier. SetFit, a 2022 few-shot training method, was competitive with full-dataset fine-tuning on a sentiment task with only 8 labelled examples, which suggests how little data a simple filter can need.

Priority triage into fixed tiers. Swap or cascade. Fixed tiers suit a classifier; the risk is the rare urgent case that looks routine, which is where a confidence threshold sends work to the LLM.

Policy or PII screening. Cascade. The classifier clears the obvious cases cheaply; borderline cases go to the LLM because a miss is costly. For PII, span-level extraction is a known strength of encoders: the biomedical study found PubMedBERT surpassing ChatGPT on entity recognition with only 5 supervised examples.

Tool or next-step selection. Cascade if the tool set is small and stable and the input is short; keep the LLM otherwise. ModernBERT, a current encoder released in December 2024 at about 149 million and 395 million parameters, reads at most 8,192 tokens, so a decision that depends on a long conversation history or many tool outputs falls outside what it can see.

Completion checks. Keep the LLM. Deciding whether a task is done means reading and judging the agent's own output against the request. Anthropic's post describes exactly this as the evaluator role in its evaluator-optimizer pattern, best used "when we have clear evaluation criteria."

Escalation to a human. Cascade, with a low bar for deferring. Escalation is triggered by unusual inputs, and unusual inputs are what classifiers detect worst, as CLINC150's out-of-scope results show.

Structured field extraction. Split it. Fields that are spans in the text, such as names, account numbers or dates, suit a token-classification model; fields that require interpretation or generated wording stay with the LLM.

How much data you need, and where it comes from

The practical obstacle is labelled data, and most agent teams already have it: every logged LLM decision is a labelled example. Training on a larger model's output is an established technique. A 2021 study by Wang and colleagues found that training on GPT-3 labels reached the same downstream performance as human labels at 50% to 96% lower labelling cost, and that mixing the two did better on a limited budget. The 2023 Distilling Step-by-Step paper trained a 770-million-parameter T5 model that outperformed few-shot prompted 540-billion-parameter PaLM using 80% of the training data.

On quantity, the studies give rough markers rather than a curve: 8 examples for SetFit's sentiment result, 50 per intent for CLINC150's 96%, 20 to 500 per intent in the banking study. A learning curve at 100, 500, 1,000, 5,000 and 10,000 examples for agent decision types, comparing human labels with logged LLM decisions, has not been published. The safe method is to log several weeks of decisions, hold out a test set that includes the hardest cases, and stop adding data once accuracy on that set stops rising.

Training on the LLM's own decisions has one limit worth stating plainly: the classifier learns the LLM's mistakes along with its correct answers, so a few hundred human-checked labels in the test set are what tell you whether the copy is good enough.

The cascade, and the drift that follows

A cascade keeps the LLM as a safety net. The classifier returns a label and a confidence score; above a threshold its answer stands, below it the input goes to the LLM. FrugalGPT, a 2023 paper by Chen, Zaharia and Zou, built such cascades across LLMs and reported savings of 50% to 98% while matching GPT-4. Its case study on a financial-news labelling task used a DistilBERT scorer with acceptance thresholds of 0.96 for the cheapest model and 0.37 for the second, falling through to GPT-4 otherwise. RouteLLM, a 2024 paper by Ong and colleagues, reported costs cut "by over 2 times in certain cases" with routers that included a BERT classifier.

Two things the cascade does not fix are new labels and drift. A classifier cannot output a category that did not exist when it was trained, so any change to the label set means retraining. On drift, Agarwal and Nenkova's 2022 study of temporal effects found that deterioration over time "is not necessarily a concern," depending on the task, but that retraining on newer data helped "in all cases," and that self-labelling new data, which for an agent means using fresh LLM decisions from the fallback path, "shows consistent improvement." A retraining cadence that keeps a classifier within a given accuracy bar for agent traffic has not been measured; re-scoring against a fresh held-out sample every month is a reasonable starting point.

What it costs, and why volume decides

At current list prices the cost case is narrower than it was. Assume each decision sends 1,500 input tokens and returns 20 output tokens. On Anthropic's pricing page, Claude Sonnet 5.5 costs $2 per million input tokens and $10 per million output, which works out to $3.20 per 1,000 decisions. Claude Haiku 5.5, at $0.10 and $0.50, costs $0.16 per 1,000; so does OpenAI's gpt-6-luna at the same rates.

A classifier has a fixed cost instead. A Hugging Face Inference Endpoint on one NVIDIA T4 lists at $0.50 an hour, or $365 for a 730-hour month; a two-vCPU CPU endpoint lists at $0.067 an hour, or about $49. For an agent running one million workflows a month, each decision point is called one million times. On Sonnet 5.5 that point costs $3,200 a month and a T4 classifier saves about $2,835. On Haiku 5.5 the same point costs $160, and the T4 endpoint costs more than the LLM it replaces; only the CPU endpoint saves money, about $111 a month, if it keeps up with the load, which has not been measured. The break-even for a T4 endpoint is about 114,000 decisions a month against Sonnet 5.5 and about 2.3 million against Haiku 5.5.

Latency follows the same logic. In the MultiWOZ study, each 7-billion-parameter LLM took about 300 minutes to label 7,374 turns on two RTX A6000 GPUs, roughly 2.4 seconds a turn, while BERT finished 7,282 in under a minute, under about 8 milliseconds a turn. Published p50 and p95 latencies for today's hosted APIs on short classification prompts do not exist, so the size of the gap against Haiku 5.5 or gpt-6-luna has not been measured.

How to run the test on your own agent

  1. Log every decision point's input, output and monthly volume for two to four weeks.
  2. Rank the points by volume times per-call cost, moving latency-critical steps to the top.
  3. For each fixed-label candidate, fine-tune an encoder on the logs and score it on a held-out set of a few hundred human-checked cases, including inputs that fit no label.
  4. Compare it with the current LLM and with a cheaper tier on the same set.
  5. Deploy winners behind a confidence threshold set on held-out data, and re-score monthly on fresh traffic.

Where Parsec fits

Parsec, a small language model lab, offers a managed version of the log, train and fall-back loop. Its inference page describes tracing production requests, building datasets and evaluations the customer approves, training with SFT or LoRA, and serving the result, with requests the model is not confident about sent to a closed frontier model; it says the weights are the customer's to download. Its routers page says the first post-trained model arrives in about four weeks, without a baseline. Separately, Parsec's account publishes open-jev, an MIT-licensed repository with an SDK for fine-tuning small "decision models", including one called TOD. Parsec publishes no price for the custom-model service and no accuracy figures for its decision models on the decision types above, so it would need the same held-out test as any other option.

Bottom line

If a decision point outputs one of a fixed set of labels on short input, train a classifier on your logged LLM decisions and run it in a cascade with the LLM as fallback: routing, filtering and triage first, then policy screening, escalation and small-set tool choice. Keep the LLM for completion checks, long-context tool choice and anything that generates text. Rank candidates by monthly call volume times current per-call cost: on a Sonnet-class model the swap pays at around 100,000 calls a month, while on Haiku 5.5 or gpt-6-luna the reason to swap is accuracy, out-of-scope handling and latency rather than the bill. Measure all of it on your own held-out traffic, because no one has yet published the comparison against 2026 models.

Sources

More in Research

All Research →