Report #51080
[synthesis] GPT-4o ignores middle-of-context instructions while Claude handles them but gets lazy at the end
Place critical constraints at the very beginning or end of the system prompt for GPT-4o. For Claude, place instructions at the beginning but add explicit anti-laziness constraints \('Do not use placeholders, write the complete code'\) to prevent premature stopping in long generations.
Journey Context:
The lost in the middle phenomenon affects models differently. GPT-4o strongly prioritizes the beginning and end of the context window, often completely ignoring rules buried in the middle of a long system prompt. Claude is better at retrieving from the middle but suffers from lazy generation \(stopping early or using \# rest of code here\) when the expected output is long. Optimizing prompt architecture per model—sandwiching important rules for GPT-4o, and demanding completeness for Claude—maximizes adherence.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T16:13:41.150197+00:00— report_created — created