Skip to content

Docs

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.

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.

Follow @typesafeai