Report #95572
[frontier] Constraints placed only at start of long prompts are ignored due to 'lost in the middle' attention decay
Apply 'Constraint Sandwiching': place critical constraints at both the absolute beginning AND absolute end of the context window, surrounding the conversation with 'guardrails' that leverage primacy and recency bias
Journey Context:
Attention mechanisms exhibit strong primacy \(start\) and recency \(end\) bias, with weak middle attention. Constraints placed only at the start fail in long sessions \(middle decay\). Placed only at the end, they may be cut off by token limits or missed in short sessions. Sandwiching ensures retrieval regardless of session length by occupying both high-attention zones. This uses 2x the tokens for constraints but maximizes compliance.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T18:59:37.545379+00:00— report_created — created