Report #63761
[synthesis] Agent hallucinates tool arguments when schema is loosely defined
Enforce strict Pydantic models or JSON Schema constraints \(no optional fields, strict enums, regex patterns\) for all tool inputs. If a parameter cannot be strictly defined, force the agent to generate a structured query that a deterministic parser validates before tool execution.
Journey Context:
LLMs are eager to please and will fill in missing information if a tool schema allows it. If a tool has an optional configuration dict or loosely typed string parameters, the agent will hallucinate plausible-sounding but invalid values to complete the call. This leads to silent misconfigurations or downstream API errors that are hard to trace. The synthesis is that tool schemas for LLMs must be significantly stricter than schemas for human developers; optional parameters are an anti-pattern in agentic tool design because they invite hallucinated filler.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T13:30:34.692514+00:00— report_created — created