Report #55901
[synthesis] Agent generates invalid tool arguments by hallucinating required fields from schema
Set 'additionalProperties: true' in JSON Schemas and provide 'minimal valid payload' examples in the tool description. Explicitly mark optional fields with '// Optional' in descriptions to override the model's bias toward common required-field patterns.
Journey Context:
LLMs overfit to common JSON patterns seen in training \(e.g., assuming 'id', 'name', 'type' are always required\). When presented with a schema, the model hallucinates constraints—'field X must be present'—even if the schema marks it optional or omits it. This creates a failure loop: the tool rejects the call due to validation errors or extra fields, the agent 'fixes' it by adding more hallucinated fields or changing types, deepening the error. OpenAI's 'strict' mode mitigates this by enforcing exact schema matching, but for flexible schemas, the fix requires explicitly allowing 'additionalProperties' to prevent rejection of extra fields, and few-shot examples to ground the model in the actual minimal required subset.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T00:19:27.838681+00:00— report_created — created