Development

Routing a Request to a Person or a Model: A Decision Rule

Antonio Evans8 min read

A horizontal routing lane seen from above.
Key points

Key points

  1. 1The handoff threshold is one boundary in a three-way routing decision: small model, large model, person.
  2. 2Choose the signal with the best separation between cases a cheap handler gets right and cases it gets wrong.
  3. 3Set the cutoff by sweeping it over a labeled sample and trading the cost of a person against the errors it prevents.
  4. 4Route on risk and ambiguity, not on how the request feels, and keep a review band where a second model or a person checks the answer.

The routing decision the threshold lives inside

Most teams frame the handoff as a single question: at what confidence do we send this to a human? That framing hides the larger decision. For each request you have three handlers competing for it, and the right move is the cheapest handler that clears your quality bar for that request. A small model handles the obvious majority. A large model handles the ambiguous middle. A person handles the cases where a wrong answer is expensive, the case needs authority a model does not have (a refund, a legal commitment, an account closure), or the request is genuinely outside what your models can do.

Routing research gives this a name. A router analyzes each input and selects a model from a pool, while a cascade tries the cheap model first and escalates only when the first answer looks insufficient; production systems often combine both the routing and cascading survey. The human is the last stage of that cascade, and the cutoff you are setting is the escalation boundary into it. If you tune it in isolation, you will tune it wrong, because the volume reaching the human depends on how well the small model and large model split the work above it.

The same logic governs alerting in mature operations. Google's SRE guidance is explicit that monitoring should exist to support a small set of decisions and that paging a human is a scarce resource to be spent deliberately the Google SRE monitoring chapter. A human review queue is a paging channel with a backlog. Treat its capacity as fixed and let routing decisions, not urgency, decide who ends up in it.

Pick the signal before you pick the cutoff

A cutoff is only as good as the score it slices. You need a signal that produces a number per request, computes before a handler is chosen, and separates the cases a cheap handler answers correctly from the cases it gets wrong. There are five families worth trying, and they fail in different ways.

SignalWhat it measuresStrong whenFails when
Model self-confidence (token probability)How sure the model is of its own outputThe model is well calibrated on your trafficThe model is confidently wrong on unfamiliar inputs
Agreement across samplesWhether repeated runs produce the same answerAnswers are terse and verifiableOutput is open-ended prose
Retrieval scoreHow well sources matched the questionAnswers are grounded in a document setThe question needs reasoning over sources
Classifier on request featuresWhether this looks like a case the cheap handler handlesYou have labeled history to train onTraffic drifts and labels go stale
Judge model scoreA stronger model grades the cheap answerYou want a second opinion before a personThe judge shares the cheap model's blind spots

Calibration matters more than raw confidence. Neural networks are often overconfident, so a score of 0.9 does not mean nine in ten correct, and accuracy can drop on new inputs while confidence stays high the Appen HITL guide. Before you trust any score, bucket your labeled sample by score and plot accuracy per bucket. If the 0.9 bucket is only 60 percent correct, the score is a weak separator and you need a different signal, or a judge, or both.

A judge model is often the highest-leverage addition. Use a stronger model to grade the cheap answer against a rubric and route on that grade rather than on the cheap model's self-report. This is the "AI-first, human correction" pattern: automation produces a draft, something checks it, and only the disagreements reach a person the Roboflow HITL patterns. When you need several model families behind one endpoint to build this chain, Quanta Inference gives you text, image, video, audio and embedding models through one OpenAI-compatible API key, priced in US dollars Quanta Inference.

Set the cutoff with a labeled sample and a cost model

Do not pick the threshold by feel. Pull a sample of past requests that a person has already resolved or graded, record the score your signal would have produced for each, and then simulate. The steps are mechanical:

  1. Collect 500 to 2,000 past requests with a label for whether the cheap handler's answer was acceptable.
  2. Compute the signal score for every request, as it would run in production, before any handler acts.
  3. Sort by score and, for each candidate cutoff, count how many requests fall above it (handled automatically) and how many fall below (escalated).
  4. For each cutoff, compute expected misroutes: the incorrect answers above the line plus the extra cost of sending correct answers below it.
  5. Convert both to dollars or minutes using your real unit costs, add them, and pick the minimum.

A worked example makes the trade-off concrete. Suppose 1,000 requests, a small model that costs 0.1 cents per call, and a person who costs 60 cents per review. A wrong automated answer on this task costs 2 dollars in rework and goodwill. Sweep the cutoff and you get a table like this:

CutoffAuto-handledCorrect above lineWrong above lineEscalatedTotal cost
0.509008465410060 + 16.40 + 108.00 = 184.40
0.707207061428060 + 1.10 + 168.00 = 229.10
0.85520518248060 + 0.10 + 288.00 = 348.10

The correct move is the 0.50 cutoff, because a person costs 600 times a model call and a mistake costs only 20 times one. Lower the cost of a mistake or raise the cost of a review and the optimum slides the other way. That sensitivity is the point: the threshold is an economic choice, not a safety preference. Rerun the sweep whenever review cost, mistake cost or traffic mix changes.

Two refinements tighten the result. First, add the large model as a middle stage and sweep two cutoffs at once: a lower bound below which the small model is not trusted, and an upper bound below which the large model is not trusted. Second, reserve a band at the top of the small model's range for spot checks, so you can detect drift in the score without routing the whole band to people.

Know when a person is the correct handler, not the fallback

Some requests should never be routed by score at all. A human is the correct first handler when the request needs authority a model cannot hold: approving a refund above a limit, signing off a medical or legal statement, or taking an irreversible action. The HITL literature is blunt on this: when agents can update records, send messages or trigger workflows, escalation paths must exist before the action happens the Databricks HITL overview.

Put these cases on a hard rule, not a threshold. A short allowlist of intents, value limits or regulated categories gets checked before scoring, and anything that matches goes to a person regardless of confidence. Regulation pushes in the same direction: Article 14 of the EU AI Act requires high-risk systems to be designed for effective human oversight, and Article 12 requires event logging the Appen HITL guide. A score cutoff will not satisfy an auditor who asks how oversight is guaranteed.

The distinction between human in the loop and human on the loop is useful here. In the loop means a person approves each routed item before it takes effect; on the loop means a person supervises aggregate behavior and can intervene by exception the Appen HITL guide. High-stakes, low-volume decisions belong in the loop. High-volume decisions with low individual stakes usually belong on the loop, with dashboards and a kill switch rather than per-item review.

Instrument the routing decision so you can see it fail

A threshold you cannot observe is a threshold you cannot maintain. Every routing decision should emit a trace with the score, the handler chosen, the reason, and the outcome. OpenTelemetry's trace model fits this well: a span is a unit of work with a parent, start and end times, attributes and events, and a trace ties the spans of one request together across services the OpenTelemetry traces guide. Your router span becomes the parent of the model call and the review task.

The GenAI semantic conventions standardize what to record: the model called, input and output token counts, and finish reasons, with prompt and completion content captured only when you opt in the OpenTelemetry GenAI observability post. Add your own attributes for the routing score, the candidate handlers, the chosen handler and the rule that fired. Attributes are the cheapest place to put this data, and the more you attach to the routing span, the easier it is to answer which requests went wrong and why the Honeycomb instrumentation guide.

Logs and traces play different roles. A log records one event in isolation; a trace reconstructs how one request moved through retrieval, model calls, tool calls and post-processing the Braintrust tracing guide. Routing failures are path problems, so traces are the primary tool and logs fill in step detail. Capture the score on the router span, and you can query "requests where score was above cutoff and the outcome was marked wrong" directly.

Track four numbers weekly: volume by handler, misroute rate above the cutoff, review backlog, and cost per resolved request. Volume by handler tells you whether the split is drifting. Misroute rate is the quality signal the cutoff was supposed to control. Backlog tells you when review capacity, not the threshold, is the binding constraint. Cost per resolved request is the number the whole exercise exists to reduce.

Handle the review band and the feedback loop

Where the score is ambiguous, neither a small model nor a person is clearly right, and a large model earns its cost. A request scored just below the human cutoff and just above the small model's range should go to the large model first, with a person called in only if the large model's judge score also falls short. This middle band is where most of your cost savings hide, because each request moved from person to large model frees review capacity without dropping the quality bar.

Feedback from reviews must feed back into the system, or the threshold decays. The defining feature of a real HITL system is that corrections flow into training data, evaluation sets or routing thresholds, so the model needs less help over time the Appen HITL guide. Practically, label every review outcome, add the graded cases to your evaluation set, and rerun the cutoff sweep on a schedule. If your misroute rate is climbing while review volume stays flat, the score has gone stale.

Rewriting a routing table as code keeps the rules auditable. A small configuration object that names the hard rules, the two cutoffs and the middle-band behavior is easier to review than logic scattered through the application:

routing = {
    "hard_to_human": ["refund_over_limit", "legal_commitment", "account_closure"],
    "small_model_max": 0.50,   # above this, small model answers
    "large_model_max": 0.82,   # above this, large model answers
    "judge_floor": 0.65,       # below this, escalate to a person
}

def route(request, score, judge_score=None):
    if request.intent in routing["hard_to_human"]:
        return "human"
    if score >= routing["large_model_max"]:
        return "small_model"
    if score >= routing["small_model_max"]:
        if judge_score is not None and judge_score >= routing["judge_floor"]:
            return "large_model"
        return "human"
    return "large_model"

The numbers in the example are placeholders; your sweep sets them. What matters is that the decision is explicit, emits a trace attribute, and can be changed without touching the model calls.

If the reviewer side of this loop is where your team is thin, a Quanta expert for your line of business can own the review rubric and the cutoff sweep with you, and the skill library behind every expert is installable into your coding agent if you want the work done in your own repository Quanta Skills. Build the evaluation set first; the right owner becomes obvious once you can see the misroute rate.

FAQ

FAQ

How many labeled examples do I need to set a cutoff?

A few hundred correctly graded requests are enough to see the shape of the trade-off, and 1,000 to 2,000 make the estimate stable around the optimum. The binding constraint is label quality, not count: if the review labels are noisy, the sweep will find a cutoff that fits the noise. Start small, plot the cost curve, and grow the set where the curve is flat.

Should I route on model confidence or a separate classifier?

Use model confidence only after you have checked calibration on your own traffic, because models are often overconfident and accuracy can fall on new inputs while confidence stays high the Appen HITL guide. A classifier trained on your labeled history often separates better, and a judge model scoring the cheap answer is usually stronger still. Try all three on the same sample and keep the one with the cleanest separation.

When should a request go straight to a person with no model attempt?

When it needs authority a model cannot hold, such as an above-limit refund, a legal commitment, or an irreversible action, or when a regulation requires per-item oversight the Databricks HITL overview. Put those on a hard rule that runs before scoring, so confidence never overrides the requirement. Everything else can start with a model.

How do I know the threshold has gone stale?

Watch the misroute rate above the cutoff and the review volume week over week. If misroutes climb while review volume is flat, the score no longer separates good from bad, usually because traffic shifted or the model changed. Recompute the score distribution on fresh labeled cases and rerun the sweep.

Does routing to a person need to block the response?

It depends on stakes and latency budget. In-the-loop review blocks the item until a person decides, which is right for high-stakes, low-volume work the Appen HITL guide. For high-volume work with low individual stakes, let the automated answer ship and put the case in a review queue, then use the corrections to tune the cutoff.

Sources

Sources

  1. Dynamic Model Routing and Cascading for Efficient LLM ...
  2. Chapter 6 - Monitoring Distributed Systems - Google SRE
  3. Human in the loop: HITL design for ML and AI agents
  4. Human-in-the-Loop (HITL) for High-Stakes AI
  5. What is Human-in-the-Loop (HITL)?
  6. Traces
  7. Inside the LLM Call: GenAI Observability with OpenTelemetry
  8. Span or Attribute in OpenTelemetry Custom Instrumentation
  9. Tracing vs logging for LLM apps: what's the difference and ...
About the author

About the author

Antonio Evans
Antonio Evans

Antonio Evans is the founder of Quanta Intelligence and a fractional CTO who builds HIPAA-ready AI systems for health and life-science companies. Before that he was technical co-founder of FriendsEAT for twenty years, CEO of Socialdraft, and a data engineer at IBM. Antonio lives with his dog Santino in Lisbon, Portugal.

All articles