Report #44129
[agent\_craft] Hallucinated tool arguments due to weak schema constraints and lack of grounding
Set 'additionalProperties: false' on all object schemas, mark every parameter as 'required' unless truly optional, and prepend a 'Grounding Step' where the agent must quote the exact source text from context that justifies each parameter value before making the call.
Journey Context:
When tool schemas permit flexibility \(e.g., objects with 'additionalProperties: true' or optional parameters without defaults\), agents hallucinate keys that don't exist in the API or invent values not present in the source context. Standard JSON Schema validation catches this only after the fact, wasting API calls. The prevention is strict schema design plus epistemic grounding. First, harden the schema: always set 'additionalProperties: false' on all 'object' types to prevent the model from inventing new keys, and ensure 'required' arrays are exhaustive \(omitting a parameter from 'required' invites hallucination of that parameter\). Second, enforce cognitive grounding: before generating the tool call, the agent must complete a 'Grounding Step' thought that quotes the exact literal text from the conversation history or retrieved documents that provides the value for each parameter \(e.g., 'Parameter 'date': grounded in text 'Meeting on 2024-05-01''\). If no literal grounding exists, the agent must use null or ask the user, never hallucinate. This eliminates confabulated arguments.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T04:32:25.383060+00:00— report_created — created