LIVE · Thursday 3 December

Best Way to Route Voice Agent Actions Under 200ms: Classifier, Semantic Router or Fast LLM by Situation

Most teams replace a GPT-4o-mini routing call with rules and a fine-tuned intent classifier. Here is which option fits a stable action list, a team with no labels, noisy calls or changing actions, and what each costs.

By Nick8 min read

The fastest reliable way to choose a voice agent's next action under 200ms is a local, fine-tuned intent classifier behind a few keyword rules, with a fast LLM only for unsure turns. Published 2026 measurements put a local RoBERTa classifier at a 2.4ms median and an LLM API classifier at 981ms. Teams with no labelled data yet can start with Aurelio's semantic-router on a local embedding model. The right mix depends on how stable your action list is and how many calls fall outside it.

Published latency figures show local classifiers answering more than 100 times faster than API calls

No published study tests every routing option on one voice dataset, one network and one GPU. The figures that do exist come from two 2026 papers and one model card, each on its own hardware. Together they show a consistent pattern.

Option Published median latency Where it ran Accuracy evidence
TF-IDF with logistic regression under 0.1ms Local 95.2% on ATIS
Fine-tuned RoBERTa 2.4ms Local 95.9% on ATIS, 89.1% on CLINC150
Fine-tuned ModernBERT 22.47ms Tesla T4 GPU 93.5% on Banking77
Fine-tuned DistilBERT 98 to 235ms Cloud Run, 2 vCPU Text tasks, not intents
GPT-4o, zero-shot 345 to 411ms OpenAI API Text tasks, not intents
Claude Haiku 4.5, zero-shot 981ms, p95 1,787ms Anthropic API 84.1% on ATIS, 88.5% on CLINC150

The TF-IDF, RoBERTa and Haiku rows come from a paper by Carson Rodrigues and Oysturn Vas, posted on June 19, 2026. The DistilBERT and GPT-4o rows come from a paper by Alberto Andres Valdes Gonzalez, posted on February 6, 2026, which tested sentiment, news and encyclopedia classification. The ModernBERT row comes from a public Banking77 fine-tune on Hugging Face, which reports no p95. The Rodrigues and Vas paper left multi-turn settings out of scope, so no published figure covers turns that depend on earlier context.

Two lessons follow from the table. Fine-tuned encoders are as accurate as zero-shot LLMs on fixed intent lists. Hosting also matters as much as the model, because the same kind of encoder took 98 to 235ms on a small remote CPU service.

A stable action list with logged decisions fits a fine-tuned encoder

Choose a fine-tuned DistilBERT, RoBERTa or ModernBERT model if your actions rarely change and you have past calls to learn from. The Rodrigues and Vas paper describes this case as a stable schema with abundant labels on a latency- or cost-critical path. For it, the paper recommends a fine-tuned encoder.

Your GPT-4o-mini logs can supply the labels. Export each turn with the action that the model chose, correct the wrong ones and add an "other" label. OpenAI's Services Agreement, version dated January 1, 2026, restricts using Output to build competing models. Its Permitted Exception covers models "primarily intended to categorize, classify, or organize data (e.g., embeddings or classifiers)" that are not distributed or sold to third parties. An internal router appears to fit that exception, but counsel should confirm it.

Run the model in the same region as the speech-to-text service, on a GPU or a fast CPU. ModernBERT-base has 149 million parameters and an Apache 2.0 licence, according to its model card.

A team without labelled data can start with semantic-router

Choose Aurelio's semantic-router if you need a router this week and have no training set. Each route is a name and a list of example sentences. The library embeds the examples once and matches each new utterance by meaning. The quickstart uses a local FastEmbed model, BAAI/bge-small-en-v1.5, so no API call is needed.

Two features suit a voice cascade:

  • Calling fit() on a few labelled queries turns similarity scores into probabilities, and confidence_threshold makes the router return None when no route clears it.
  • The Chain feature sends unsure queries to a slower router, which can be your LLM tier.

The README says that the router "decides in milliseconds," but the project publishes no benchmark for that claim. Accuracy depends on how well your example sentences match real caller speech.

Noisy lines and frequent out-of-scope requests need an LLM fallback tier

Add a fast LLM behind the classifier if callers often ask for things outside your action list or if your transcripts are noisy. The Rodrigues and Vas paper found the LLM stronger in both cases:

  • It caught 85.6% of out-of-scope requests, against 58.1% for fine-tuned RoBERTa.
  • It kept 92.5% accuracy on very noisy transcripts, with a 28.9% word error rate, where TF-IDF fell to 80.0%.

For the fallback, pick a model that can return one label quickly. Groq lists openai/gpt-oss-20b at 1,000 tokens per second and $0.075 per million input tokens. Cerebras lists gpt-oss-120b at about 3,000 tokens per second. Gemini 2.5 Flash-Lite costs $0.10 per million input tokens. OpenAI's gpt-6-luna costs $0.10 per million input tokens, and its default reasoning effort is medium, which should be set to none for routing. Throughput is not time to first token, and none of these providers publishes the latency of a one-label routing call.

Action lists that change often fit a prompted LLM or a decision model

Choose a model that reads the action list at call time if each customer or deployment has different actions. A fine-tuned classifier cannot predict a label that it never saw. In the Rodrigues and Vas paper, a RoBERTa trained on one app's intents scored 0% on a second app. The prompted LLM scored 93.9% on that second app with no retraining.

Decision models are built for this case. Parsec's TOD ranks the next action from a list of allowed actions supplied with each request and generates no free text. A confidence gate lets it answer when it is confident and passes other turns unchanged to the main LLM. According to Parsec's TOD page, the median model forward pass is 69ms on one H100 GPU, excluding provider look-ups, and the price is $0.30 per 1,000 decisions. Parsec's repository reports much slower medians on an A100 for short option lists. These are Parsec's own figures, and no independent re-run has been published.

The p95 of a cascade is set by how many turns reach the slow tier

A cascade can have a fast median and still miss a 200ms p95. The reason is arithmetic. If more than 5% of turns go to a fallback that takes longer than 200ms, the 95th-percentile turn is a fallback turn.

That gives two ways to meet the budget:

  1. Keep the share of turns that reach a slow fallback below 5%, by improving rules and the classifier.
  2. Use a fallback that itself answers in under 200ms on your network, which you must measure.

The share of real voice turns that each tier handles has not been measured in any published study. The blended p95 of such a cascade has not been measured either. Your own logs are the only reliable source for both.

A worked example shows that routing costs little at any tier

Suppose that an agent handles 300,000 calls a month and makes 6 routing decisions per call. That is 1.8 million decisions a month. Assume 500 input tokens and 5 output tokens per LLM decision, at list prices.

  1. Routing every decision through GPT-4o-mini costs $0.078 per 1,000 decisions, or about $140 a month.
  2. Routing every decision through a DistilBERT on Cloud Run costs $0.005 to $0.012 per 1,000, using the Valdes Gonzalez paper's estimate. That is about $9 to $22 a month.
  3. A cascade with a 20% fallback share adds 360,000 decisions on Groq openai/gpt-oss-20b at $0.039 per 1,000. That is about $14, for a total of about $23 to $36 a month.
  4. The same cascade with Claude Haiku 4.5 as the fallback pays $0.525 per 1,000 on those 360,000 decisions. That is about $189, plus the classifier.

The 20% share is an assumption for the example, not a measurement. The Groq figure leaves out any reasoning tokens. On these assumptions, the classifier saves about $100 to $120 a month against GPT-4o-mini. The bigger gain is latency, and GPT-4o-mini also reaches its shutdown date on January 14, 2027, according to OpenAI's deprecations page.

Calibrated scores and streaming transcripts let the fast tier handle more of each call

A threshold works only if the confidence scores are calibrated. A router that reports 0.9 should be right about nine times in ten at that score. Each tier can produce a score that you can calibrate:

  • Semantic-router's fit() converts similarity into a probability for each route.
  • A fine-tuned encoder produces a probability for each label from its final layer.
  • OpenAI's chat API returns token log probabilities when logprobs is set, with up to 20 alternatives through top_logprobs.

Hold out a few hundred real calls with correct labels and plot accuracy against confidence for your classifier. Pick the lowest threshold that meets your accuracy target. The share of turns above it is the share that stays on the fast path. No published study reports these reliability curves for voice routing.

Streaming speech-to-text lets the router start before the caller stops speaking. Deepgram sends interim transcripts marked is_final: false and sets speech_final: true when it detects a pause. Its default endpointing is 10ms, and it suggests 300 to 500ms for callers who pause mid-thought. Classify each interim transcript and start read-only work, such as the order look-up, once confidence clears your threshold. Wait for the final transcript before you transfer or end the call. Router accuracy on partial transcripts has not been measured in any published study.

New actions can go straight to the LLM tier, which needs only an updated action list. Add the action to semantic-router as a new route with example sentences, or retrain the encoder once enough logged examples exist.

Sources

More in Research

All Research →