intent_routing v1.0.0
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
- 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.
- 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.
- 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.
- 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.
- 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:
targets.yaml: the target catalog (name, handles, not-handles per target).
- A classifier pipeline implementing the layer contract (reference implementation in
scripts/router.py).
thresholds.yaml: the tuned cutoffs with the domain and date they were tuned for.
evals/cases.jsonl: labeled cases plus the last run report (per-intent precision, overall accuracy, abstain rate).
Operating Rules
- Fix the taxonomy before tuning the classifier. If the classifier is a coin flip between two targets, the targets overlap: rewrite their descriptions.
- Route cheap first. The expensive classifier only sees what the cheap layers could not decide. Log which layer decided each route.
- 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.
- Carry conversation context into the classifier (last topic, last target). Bare messages like "yes please" are unroutable without it.
- Thresholds are per-domain and dated. A 0.7 cutoff tuned on support tickets does not transfer to a different target set.
- Re-run evals after every target addition or threshold change. Log the confusion pairs that moved.
- 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.