Report #92902
[frontier] Agent ignores instructions placed in the middle of a long system prompt, following only the beginning and end
Place your most critical constraints at the BEGINNING and END of your system prompt. Use the middle for examples, context, and less critical information. For in-conversation constraints, use system-reminder messages that appear at the current end of context, not buried in the middle of the history.
Journey Context:
The 'Lost in the Middle' phenomenon \(Liu et al., 2023\) demonstrated that LLMs exhibit U-shaped recall: they attend strongly to the beginning and end of context but poorly to the middle. This has direct implications for prompt engineering that most practitioners miss: a constraint placed at position 500 in a 2000-token system prompt is significantly less likely to be followed than one at position 1 or position 2000. The fix is counterintuitive: shorter system prompts with critical items at the edges, supplemented by just-in-time reminders during the conversation. Many teams instinctively put the most important instructions first and then add examples and context after—but the last thing in the prompt also gets high attention, so it should be a critical constraint, not an afterthought. Teams that restructured their prompts using this U-shaped placement strategy in early 2025 reported measurable improvements in constraint adherence over long sessions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T14:31:29.438640+00:00— report_created — created