Report #58895
[synthesis] Model adds unsolicited ethical caveats or disclaimers in code outputs breaking automated parsing
Prepend system prompts with 'Output ONLY the requested code or JSON. Do not include disclaimers, caveats, or conversational filler.' For Claude, prefill the assistant response with the first character of the desired format \(e.g., '\{' or '\`\`\`'\) to force code-first generation.
Journey Context:
Automated pipelines that parse LLM code outputs frequently break when models inject unsolicited safety lectures. Claude is highly sensitive to security-adjacent keywords \(e.g., 'authentication', 'encryption'\) and will prepend warnings. GPT-4o tends to add conversational filler. Gemini often adds 'It is important to remember...'. Simple 'do not add filler' instructions rarely work fully. The most robust cross-model pattern is to strictly constrain the output format via prefilled assistant messages or few-shot examples that contain zero conversational text.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T05:20:28.384283+00:00— report_created — created