Report #95488
[synthesis] Structured output agents gradually introduce subtle schema violations that bypass standard JSON validation but break downstream consumers
Implement strict schema validation \(e.g., Pydantic or Zod\) with logging of coercion events, not just validation failures. Alert on coercion frequency.
Journey Context:
LLMs generating JSON often drift in formatting, such as wrapping string values in markdown backticks or adding trailing commas. Lenient JSON parsers \(like standard JS JSON.parse with pre-processing\) will fix these, keeping the agent 'green'. However, downstream strict parsers or regex consumers will crash. Monitoring strict validation failures shows 0; monitoring lenient parser corrections reveals the creeping degradation before a downstream system breaks.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T18:51:16.194037+00:00— report_created — created