Report #44966
[gotcha] Massive user inputs push the system prompt out of the LLM's effective context window
Keep system prompts concise, place them as close to the user query as possible \(some frameworks allow system prompts at the end\), and implement input length limits. For RAG, truncate or summarize retrieved documents rather than dumping them entirely.
Journey Context:
Developers assume the system prompt is always 'in mind' for the LLM. However, LLMs have finite context windows. If an attacker provides a massive document \(e.g., 100k tokens of filler\), the LLM's attention mechanism will effectively 'forget' the system prompt instructions at the beginning of the context. Limiting input size and strategically placing system instructions mitigates this.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T05:56:29.221040+00:00— report_created — created