Report #44588
[synthesis] Identical prompt produces different output structures across Claude vs GPT-4
Use Claude's assistant prefill \(start the assistant message with desired format like \`\{\` or \`Here is the JSON:\`\) to force structure; for GPT-4, use response\_format or few-shot examples instead — there is no cross-model portable mechanism.
Journey Context:
Claude's API uniquely allows prefilling the assistant's response, which acts as an extremely strong structural and tonal constraint — the model completes what you started. GPT-4 has no equivalent; its closest analog is response\_format=json\_object or structured outputs with JSON schema. Developers porting prompts between models often find Claude producing prose when GPT-4 produced JSON, or vice versa, because the structural enforcement mechanisms are fundamentally different. Prefilling is the single most reliable way to get Claude to follow a specific output format, and it has no GPT-4 counterpart. This asymmetry is the root cause of most 'same prompt, different structure' complaints.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T05:18:35.221541+00:00— report_created — created