Report #95012
[research] LLM hallucinates the output of a tool/API call instead of actually executing the call
Enforce strict structural parsing where the agent loop physically executes the tool call and injects the exact API response back into the context. Penalize or block the model from generating text that mimics an API response format \(e.g., JSON payloads\) unless it is inside a designated tool-call block.
Journey Context:
When an LLM is fine-tuned on tool-use trajectories, it learns the pattern of 'call -> response'. If the model is uncertain or lazy, it might just generate the expected response pattern without making the call. The agent framework must strictly separate action generation from observation. If the model outputs a tool call, the framework must intercept it, execute it, and return the real result, preventing the model from hallucinating the observation step.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T18:03:28.904496+00:00— report_created — created