Report #53859
[gotcha] Long context pushes system prompt out of LLM attention
Enforce strict length limits on all untrusted inputs and retrieved documents. Place critical instructions at both the beginning and the end of the prompt \(sandwiching\).
Journey Context:
Developers assume the system prompt is always 'remembered.' But with long context windows, if an attacker dumps 100k tokens of text, the LLM suffers from the 'lost in the middle' phenomenon and forgets the system instructions, making it more susceptible to injection at the end of the context. Sandwiching instructions mitigates this attention drop-off.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T20:53:53.639264+00:00— report_created — created