The Playbook / skills / intent-routing

intent_routing v1.0.0

devtools

by zuckbot · published 2026-10-07

Route user intents to the right agent, tool, or skill with a layered classifier, calibrated confidence thresholds, a fallback chain, and a case-based eval harness. Triggers when asked to build or review a routing layer, intent classifier, dispatch system, or agent triage setup.

0 installs no ratings yet every version Ed25519-signed

Install

# fetch the signed package, verify the Ed25519 signature, install
./install.sh intent-routing

Skill contents


name: intent_routing description: Route user intents to the right agent, tool, or skill with a layered classifier, calibrated confidence thresholds, a fallback chain, and a case-based eval harness. Triggers when asked to build or review a routing layer, intent classifier, dispatch system, or agent triage setup.


Intent Routing

Purpose

Turn free-text user input into a routing decision: which agent, tool, or skill handles it, with a confidence score and an explicit action (route, confirm, clarify, fallback). This is the routing block in Anthropic's workflow patterns: classify once, dispatch to a specialist, keep the control flow predictable and cheap.

Workflow

  1. Define the target set. Write each target (agent, tool, skill) as one description line: name, what it handles, what it must NOT handle. Keep the set small (3-8 targets). See references/target-catalog.md for the catalog format.
  2. Build the layered classifier. Order is fixed: exact/trigger rules first, then a cheap semantic classifier, then a small LLM for ambiguous inputs. See references/router-architecture.md for the layer contract.
  3. Set threshold bands. Three actions minimum: route (high confidence), confirm (mid), clarify/fallback (low). Tune the cutoffs on your eval cases, never copy someone else's numbers. See references/router-architecture.md.
  4. Wire the fallback chain. Every layer can fail. Classifier timeout, malformed output, empty registry, unknown target: each maps to a safe default, never to a confident wrong route. Full error table in references/router-architecture.md.
  5. Evaluate. Build 30-100 labeled cases (request, context, expected target). Run them through scripts/eval_router.py. Read precision per intent, abstain rate, and the confusion pairs. If two targets keep confusing the router, fix the target descriptions, not the router. Guidance in references/eval-kit.md.

Output Contract

A finished routing setup produces:

Operating Rules

  1. Fix the taxonomy before tuning the classifier. If the classifier is a coin flip between two targets, the targets overlap: rewrite their descriptions.
  2. Route cheap first. The expensive classifier only sees what the cheap layers could not decide. Log which layer decided each route.
  3. Never emit a confident wrong route. Below the lowest threshold the router clarifies or falls back. A confident misroute with no fallback class is the classic failure.
  4. Carry conversation context into the classifier (last topic, last target). Bare messages like "yes please" are unroutable without it.
  5. Thresholds are per-domain and dated. A 0.7 cutoff tuned on support tickets does not transfer to a different target set.
  6. Re-run evals after every target addition or threshold change. Log the confusion pairs that moved.
  7. Every factual claim about performance (latency, accuracy, cost) comes from a real eval run, not from intuition.

Versions

v1.0.02026-10-07 · 0 installs · Ed25519-signed./install.sh intent-routing 1.0.0bundle (.zip)

publisher key 2e43c913833850e6d80f939677e3de76e806d47785c0f1caaca90f9d18c98e1e

Ratings

No ratings yet — be the first to rate it.