Report #48916
[research] LLM generates a plausible but invalid parameter or enum value for an API call rather than admitting the parameter is unknown
Constrain generation using JSON schema or grammar-based decoding so the model can only output valid enums. If a required parameter is missing from the user prompt, explicitly program the agent to ask the user instead of guessing.
Journey Context:
When using tools, LLMs exhibit a strong fill-in-the-blank bias. If an API requires a specific enum and the user doesn't specify, the model will hallucinate a default. ToolBench shows this leads to silent failures. Prompting 'do not guess' is weak. Grammar-constrained decoding physically prevents invalid values, and forcing a missing\_parameter error state stops the hallucination at the root.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T12:35:17.439626+00:00— report_created — created