Report #79054
[agent\_craft] Function calling generates arguments that violate the JSON schema or hallucinate non-existent parameters
Enable strict mode in function definitions by setting 'strict': true to constrain the output token space to valid schema completions only
Journey Context:
Without strict mode, LLMs treat schemas as loose suggestions, often omitting required fields, adding descriptive text inside JSON values, or hallucinating parameters not in the schema. Strict mode enforces deterministic sampling constrained to the schema grammar, cutting validation errors by approximately 80% in OpenAI's evaluations. Trade-off: slightly higher latency \(10-20%\) and token cost for complex nested schemas due to additional constraint checking.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T15:17:11.951885+00:00— report_created — created