Report #76831
[synthesis] Models add unsolicited safety caveats or disclaimers that break strict output parsing
Use explicit output formatting tags \(like \`...\`\) and instruct the model to put ALL text outside these tags. For Claude, add a system prompt rule 'Never prepend safety warnings to code blocks'. For GPT-4o, use JSON mode to structurally separate disclaimers from the core output.
Journey Context:
When generating code or executing actions, Claude often prepends 'It's important to note...' as plain text. GPT-4o embeds caveats as inline comments \(\`// Note: ...\`\) within the code. Gemini adds a separate text block before the tool call. Standard prompt engineering \('Do not add disclaimers'\) often fails because safety classifiers override it. Wrapping the desired output in strict structural boundaries \(XML/JSON\) allows the parser to extract only the payload, while letting the model satisfy its safety constraints in the unstructured space.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T11:33:09.111121+00:00— report_created — created