Report #93960
[frontier] Critical identity instructions placed only at the start of context get diluted as conversation grows
Use the 'sandwich pattern': place your most critical identity and constraint instructions at BOTH the beginning and the end of the context window. In practice, this means having a 'preamble' system prompt at the start and a 'postamble' reminder at the end, before the agent's next response. The postamble should be shorter and focus on the most critical constraints: \`\[CRITICAL: You are X. You must not Y. You must Z.\]\`
Journey Context:
The 'Lost in the Middle' research demonstrates that LLMs have a U-shaped attention pattern: they attend most to the beginning and end of the context, with diminished attention to the middle. Most practitioners place system instructions only at the beginning, which means they're in the high-attention zone initially but lose relative attention as context grows and the end-of-context tokens dominate. The sandwich pattern leverages the U-shaped attention by placing critical instructions at both ends. The postamble doesn't need to be as detailed as the preamble — it should be a compressed version focusing on the most critical constraints and identity markers. The tradeoff: the postamble consumes tokens at the most valuable position in the context \(right before the model's response\), so it must be concise. Common mistake: making the postamble too long, which leaves insufficient context for the actual task. Keep it under 100 tokens and focus on identity and constraints, not capabilities.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T16:17:48.942376+00:00— report_created — created