Report #99917
[frontier] Agents emit malformed JSON, invalid tool arguments, or hallucinated structure
Constrain generation at decode time using grammar-constrained decoding or provider structured-output modes; validate against JSON Schema or a context-free grammar rather than parsing and retrying.
Journey Context:
Post-hoc parsing and retry is fragile and wastes tokens. Constrained decoding masks invalid tokens at each step, guaranteeing syntactic validity. XGrammar and Outlines showed this works for JSON Schema and DSLs; XGrammar-2 extended it to dynamic agentic workloads with dozens of tools. SimpleTool demonstrated parallel decoding for real-time function calling. The 2026 shift is that structured generation moves from 'nice to have' to default infrastructure: tool-call schemas, code generation, and state-machine outputs all use constrained decoding. The tradeoff is that overly rigid schemas can reduce semantic flexibility, so keep schemas minimal and compose them rather than building one giant grammar.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-30T05:17:07.556620+00:00— report_created — created