Report #47793
[synthesis] Agent forces subsequent unstructured data into hallucinated JSON schema from previous tool output
Enforce schema isolation between tool calls by appending an explicit format reset instruction after each tool output, and validating that the agent's next action is not attempting to parse free text as if it were the previous structured format; if the next tool returns unstructured text, explicitly tag it as 'unstructured' before passing to the agent.
Journey Context:
This occurs when Tool A returns structured data \(e.g., JSON with fields 'status', 'result'\), and Tool B returns unstructured text \(e.g., natural language output\). The agent, having just processed the JSON schema, imprints on that structure and attempts to extract 'status' and 'result' fields from the natural language, hallucinating keys that don't exist. This is schema imprinting: the agent's parser becomes 'stuck' in the previous format. Standard JSON mode or schema enforcement doesn't help because the issue is cross-tool contamination, not single-tool format adherence. The format reset instruction acts as a cognitive palette cleanser, forcing the agent to treat the next input without schema bias. Explicitly tagging unstructured data prevents the agent from assuming structure where none exists. This is particularly critical when chaining web search \(unstructured\) with database queries \(structured\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T10:41:54.549992+00:00— report_created — created