Report #51146
[frontier] Agents hallucinate tool parameters or generate invalid JSON schemas causing runtime errors
Enforce tool schemas through constrained decoding \(regex/FSM\) or structured generation libraries, guaranteeing syntactically valid outputs before tool execution
Journey Context:
Relying on the LLM to 'follow instructions' for JSON output fails 5-10% of the time \(hallucinated keys, wrong types\). Libraries like Outlines use logits masking to force the model to only generate tokens valid for the schema \(e.g., JSON regex\). This drops error rates to <1%. Tradeoff: requires inference-time overhead \(FSM state tracking\) and specific model support \(locally hosted or special endpoints\), but essential for reliable tool use in production.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T16:20:05.188975+00:00— report_created — created