Docs
OfficialJev Practices & Patterns
Pattern: Intent Routing
Classify intent with a Choice and complexity with a Score, then send each branch to deterministic code, a specialist model, or a person, with a 0.5 intent-confidence floor.
- Format
- Docs
- Reading time
- 2 min
- Published by
- TypeSafe AI
- Last verified
- Sep 2026
Highlights
- One request asks Choice intent over order status, product questions, returns, and complaints, plus Score complexity.
- Intent confidence below 0.5 routes to a human agent.
- order_status goes to deterministic code with no LLM involved.
- Complaints escalate when complexity exceeds level 1 or its confidence falls below 0.5.
Quickstart
python
if intent.confidence < 0.5:
return route_to_human_agent(ticket_id)
if intent.choice == "order_status":
handle_order_status(ticket_id)
elif intent.choice == "product_question":
handle_with_llm(ticket_id, PRODUCT_SPECIALIST)
elif intent.choice == "return_exchange":
handle_with_llm(ticket_id, RETURNS_SPECIALIST)Watch out
Route on the pair of answer and confidence, not either alone, or confidently-misrouted tickets slip past review.
Questions about this entry
Short answers drawn from the linked project or page.
When intent confidence falls below 0.5, regardless of the answer. Complaints escalate as well when complexity exceeds level 1 or their confidence drops below 0.5, so both the answer and the confidence drive the branch.
No. order_status goes to deterministic code with no LLM involved, while product questions and returns route to specialist models. The point of the pattern is that the model makes the routing decision; handling stays wherever it belongs.
order_status, product_question, return_exchange, and complaint, chosen with a Choice question; a separate Score rates the ticket's complexity on an ordered scale.
It checks the complexity Score: if complexity.score is above 1, or complexity confidence is below 0.5, the ticket goes to a human; otherwise it goes to the complaint-resolution model.
TypeSafe is described as a fast, cheap classifier sitting in front of deterministic code, specialist LLMs, and humans, so the expensive resources are invoked only for requests that actually need them.
An intent Choice and a complexity Score, both evaluated in the same single call against the same ticket state.
It assumes you understand the TypeSafe primitives and how confidence works, and the page says to read those first because it routes on both the answer and its confidence.
Reactions & coverage
Posts, threads, and videos about this entry from around the web.
Facebook: Intake Router keeps diagnosis out of the answer space at the front desk.
FacebookClinicnotes
X: OpenRouter Decision Model Rankings
X: herdr + jev, an agent router
X: A group chat bot with decision room routing
From the Jev guides
Original write-ups on what this entry is for.
From the Jev AI model community
Posts from builders shipping with Jev right now.