Report #68449
[synthesis] Prompt-only 'Output JSON' instructions result in markdown pollution or conversational preambles across different models
Never rely solely on prompt instructions for JSON output. Use GPT-4o's response\_format: \{ type: 'json\_object' \}, Gemini's responseMimeType: 'application/json', and Claude's prefill parameter with '\{' to force structural compliance.
Journey Context:
Developers often write 'Respond ONLY with valid JSON' in prompts. GPT-4o frequently wraps the JSON in \`\`\`json...\`\`\` markdown fences. Claude often prepends 'Here is the JSON:' or explains its reasoning. Gemini might add conversational text. Because each model's RLHF heavily biases towards conversational helpfulness, prompt-only constraints are routinely ignored. The cross-model synthesis is that each provider implemented a distinct API-level mechanism to override this conversational bias, and agents must map to the specific API parameter rather than relying on prompt engineering.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T21:22:37.154922+00:00— report_created — created