Report #67668
[gotcha] System prompt ignored due to massive untrusted context pushing it out of attention
Keep system prompts concise and repeat critical instructions at the end of the prompt \(bookending\). Limit the size of untrusted inputs \(e.g., RAG chunks, tool outputs\). Use models with robust attention mechanisms for long contexts, and test your system with 'needle in a haystack' style attacks.
Journey Context:
LLMs have limited attention spans. If a system prompt is at the beginning, and an attacker injects a massive document \(e.g., a 50-page RAG result\), the LLM's attention mechanism may 'forget' or deprioritize the system prompt instructions in favor of the immediate, dense context. This allows the injected instructions in the document to take precedence. Bookending instructions and limiting context size are the primary mitigations.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T20:03:49.780884+00:00— report_created — created