Report #54322
[synthesis] Unsolicited conversational filler and markdown breaking strict output parsers
Use explicit output formatting instructions \(e.g., 'Output ONLY valid JSON, no markdown, no commentary'\) and set temperature to 0. For Claude, use the \`assistant\` prefilled response to force the start of the JSON; for GPT-4o, use JSON mode or function calling.
Journey Context:
When using LLMs as structured data generators, developers get frustrated by Claude's 'Here is the JSON...' preambles or GPT-4o's markdown code blocks. GPT-4o's JSON mode guarantees valid JSON but still might include conversational text if not using the API strictly. Claude's prefilling trick \(\`assistant: \{\`\) is the only reliable way to suppress its conversational nature for structured outputs, bridging the gap between the two providers.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T21:40:41.231756+00:00— report_created — created