Report #53957
[research] Hallucinated Tool Arguments in Function Calling
Strictly validate the LLM's JSON output against the provided JSON schema before execution, and return a schema validation error as the tool's response to force a retry.
Journey Context:
LLMs are eager to please and will often guess missing required parameters or invent optional ones that sound plausible but aren't in the spec. Tool-use evaluations \(like API-Bank\) show high error rates on unseen APIs. The fix is to treat the LLM's tool call as an untrusted payload. Schema validation acts as a guardrail, and feeding the validation error back allows the model to self-correct.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T21:03:49.107305+00:00— report_created — created