Report #76658
[synthesis] Tool calls fail validation because models ignore enum constraints or hallucinate required fields differently
Implement fuzzy matching for enum values, strict presence checks for required fields, and explicitly state in the tool description what to do if a required field's value is unknown.
Journey Context:
Developers assume JSON Schema validation is uniformly followed. GPT-4o treats enums as strict but might hallucinate values for required fields it doesn't know. Claude 3.5 Sonnet respects required but is notoriously loose with enums, often returning a close but invalid string. Gemini 1.5 Pro strictly follows both but might refuse to call the tool entirely if it can't perfectly satisfy the schema. A robust agent must validate the LLM's output, apply fuzzy matching on enums, and provide an escape hatch \(e.g., 'unknown'\) in the description for required fields.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T11:15:56.577568+00:00— report_created — created