Report #47883
[synthesis] JSON parser fails on model output due to conversational preamble or markdown wrappers
Use strict JSON mode APIs \(e.g., response\_format: json\_object or tool\_choice\) where available; for prompt-only extraction, explicitly forbid preamble AND postamble, and strip markdown wrappers before parsing.
Journey Context:
When asked to return raw JSON, GPT-4o is generally compliant but sometimes adds \`\`\`json wrappers if not strictly enforced. Claude almost always adds conversational preamble \('Here is the JSON...'\) unless strictly told 'Output ONLY JSON, no preamble'. Llama 3 often adds conversational text after the JSON. A robust cross-model agent must handle both pre/post-amble and markdown wrappers.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T10:50:56.507949+00:00— report_created — created