Agentic patterns · 02 of 04
Agentic patterns: Confidence routing
Let a model built for fast decisions handle the cases it is sure about, and send only the uncertain ones to a large language model or a person.
The principle
Confidence routing
Many steps in a process are decisions from a known list: which team, how urgent, fraud or not. Sending each of those to a large language model works, but at volume it is slow and expensive, and the answers come without a reliable measure of how sure the model is.
Confidence routing splits the work. A decision model answers typed questions with probabilities in a single fast call. Above a threshold the process acts on the answer; in a middle band an LLM gives a second reading; below that a person decides. The thresholds become a business setting: you trade cost and speed against the share of cases that reach a person. The demo runs the same forty emails through three settings so you can see that trade move.
The first step has to be a model built for this job. A general-purpose LLM writes an answer; asked how sure it is, it produces another piece of text. A decision model such as TypeSafe’s Jev returns a probability for every option by design, in milliseconds and at a fraction of the cost, and that number is what the gate runs on. The LLM, Claude in the demo, comes in only where its reading adds something: the cases the decision model is unsure about.
codemodelagentperson
Also known as Routing (Anthropic) · Content-Based Router (Enterprise Integration Patterns) · Exclusive choice (Workflow Patterns, Van der Aalst) · Deterministic routing, as the alternative to handoff (Azure Architecture Center)
Where it applies
- Mailroom and inbox triage: route, prioritise and flag possible fraud
- Classifying documents before extraction: invoice, credit note, contract, complaint
- First-line screening in KYC or transaction monitoring, with people on the hard cases
- Any high-volume decision where most cases are routine
Where it does not
- Tasks that need writing, multi-step reasoning or tools
- Low volumes, where the savings do not cover the set-up
- Categories that change every week, so the model never settles
Fill the boxes
One shape, three ways to build it
The pattern exists with or without AI. The design decision is which boxes deserve a model, and what that costs in money, speed and auditability.
All code
Keyword and sender rules decide the route. They cost nothing and answer at once, and they miss any message phrased in a way nobody wrote a rule for.
Hybrid, as shown here
A decision model scores each item, code applies the thresholds, and only the doubtful items reach a large model or a person.
All agents
A large model reads every item and picks the route. It copes with odd cases and costs the most per item, and it gives you no dependable confidence figure to steer on.
See it work
Monday inbox flood
Monday, 09:00. Trapp, a made-up e-bike subscription, had its app down all Saturday and Sunday's renewals charged some riders twice. 40 emails are waiting. Each needs a team, an urgency and a scam check. JEV reads every email first and says how sure it is; Claude reads only the ones JEV hesitates on. The same answers run through the gate three times, cautious, balanced and bold.
These runs are simulated: scripted stand-ins play JEV and Claude, so answers, token counts and costs are illustrative. Real recorded runs follow once JEV access is in place.
Watch for. One JEV call answers three typed questions (team, urgency, scam) with probabilities, so confidence can drive a traffic light: route, ask Claude, or ask a person. Move the thresholds and watch cost, speed, mistakes and work for people move with them.
Building it
This demo runs on TypeSafe Jev
JEV (TypeSafe AI) is a 'System One' model built for fast decisions: it answers typed questions with probabilities in one call. A confidence gate decides whether that is enough, or Claude or a person should look. Other frameworks can carry the same pattern; this is when I would pick this one.
Reach for it when
- The answer is one of a known set: a team, a score, yes or no
- Volume is high and every call has to be fast and cheap
- You want a confidence number to decide when to escalate
Skip it when
- The task needs writing, multi-step reasoning or tools
- Your data must stay in the EU (hosted on the US West Coast for now)
- You need independent benchmarks before you commit (none yet)
- Framework
- TypeSafe Jev 1.13
- Licence
- Proprietary API (early access)
- Model
- jev-latest + claude-opus-5-5
- Watch time
- ~2 min
Advice
Questions I ask before using it
- What share of cases is routine today, and what does a wrong route cost?
- Who sets the thresholds, and how often do we revisit them?
- Are the confidence scores calibrated on our own data, and who checks that over time?
- Where is the model hosted, and does that meet our data residency rules?
Contact
Questions, ideas or a conversation?
I’m always glad to hear from people working on AI, product strategy, transformation or software.