Guide / Routing
Route requests through allowed actions
Build a support router, inspect confidence, and send uncertain decisions to a required fallback.Define routes with representative examples
Pythonpython
payload = {
"input": {
"message": "My card shows two charges for invoice 2048.",
"examples": [
{"message": "Charged twice", "expected": "billing"},
{"message": "Cannot sign in", "expected": "account"},
{"message": "SDK returns 500", "expected": "technical"},
],
},
"candidates": [
{"id": "billing", "description": "Payments, invoices, and refunds"},
{"id": "account", "description": "Login, access, and permissions"},
{"id": "technical", "description": "Errors, outages, and integrations"},
],
"fallback": {"id": "human_review", "description": "Unclear or out of scope"},
}Act only on declared IDs
- Map candidate IDs to local handlers.
- Use fallback when out_of_distribution is true or confidence is below your evaluated threshold.
- Treat the plan as input to application policy, not authorization for a side effect.