Report #84260
[synthesis] Strict output parsers break when model adds unsolicited safety caveats outside the expected format
For Claude, add 'Output ONLY the requested format with zero conversational filler' to the system prompt. For GPT-4o, use JSON mode or strict structured outputs. Always parse using regex or JSON path to extract the target block, ignoring surrounding text.
Journey Context:
Claude 3.5 Sonnet is heavily fine-tuned to add helpful context \(e.g., 'Note: This code lacks error handling'\), which breaks parsers expecting pure code or JSON. GPT-4o is more concise but can add conversational wrappers. Trying to prompt away this behavior entirely is fragile; the robust approach is combining strict output modes \(where available\) with resilient parsing that ignores non-target text.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T00:01:35.840956+00:00— report_created — created