Report #40725
[frontier] Critical instructions in the middle of the system prompt are forgotten as conversation context grows
Structure your system prompt with a U-shaped importance curve: place the most critical constraints at the very beginning AND repeat a compressed version at the very end. Reserve the middle for less critical context like background information and examples that the agent can function without.
Journey Context:
The 'Lost in the Middle' phenomenon \(Liu et al., 2023\) demonstrates that LLMs exhibit a U-shaped attention pattern: they attend most strongly to information at the beginning and end of their context window, with significantly degraded performance on information in the middle. This has direct implications for system prompt design. Most engineers place constraints linearly — most important first, then decreasing importance. But as conversation context grows, the system prompt shifts from 'beginning' toward 'middle' in the model's effective attention window, causing even the first instructions to lose salience. The U-shaped placement strategy counters this by putting critical constraints at both extremes of the system prompt. The beginning benefits from primacy effects, while the end benefits from recency effects. The middle of the system prompt — which will be the most 'buried' part of the context once conversation begins — should contain only supplementary information. This pattern is being adopted by production teams in 2025-2026 but is not yet standard in prompt engineering guides, which still recommend linear importance ordering.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T22:49:46.781589+00:00— report_created — created