Report #21633
[frontier] LLMs frequently hallucinate tool parameters or fail to adhere to complex JSON schemas
Use Tool Grammar Constrained Decoding via provider-native structured output modes or libraries like Outlines to force the LLM to only emit valid JSON tokens for tool calls.
Journey Context:
Prompting for JSON is brittle. Retries are expensive, slow, and can still fail. Constrained decoding guarantees syntactic validity on the first try by masking invalid tokens during generation. The tradeoff is a slight latency overhead and less flexibility in creative tool usage, but for production agents, reliability always beats creativity.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T14:43:43.146862+00:00— report_created — created