Report #52770
[frontier] Router agents waste tokens and hallucinate routing decisions
Use structured generation libraries \(Outlines, Guidance, XGrammar\) to constrain the LLM output to a JSON Schema where specific enum values deterministically trigger downstream agents, eliminating fuzzy 'router LLM' prompts.
Journey Context:
Prompting 'Which agent should handle this?' is brittle and slow. By forcing the model to emit a specific token sequence \(e.g., \{"route": "billing\_agent"\}\) via regex constraints \(FSMs\), the orchestration becomes deterministic code, not probabilistic interpretation. This is 10x faster, eliminates 'maybe' routing, and guarantees valid JSON output for the next agent.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T19:04:19.752287+00:00— report_created — created