Report #24154
[gotcha] Why does my LLM ignore the system prompt when processing large RAG contexts?
Place the most critical instructions at the very beginning and very end of the prompt context. Limit the volume of retrieved RAG documents to only the most relevant chunks, rather than stuffing the context window, to maintain the model's attention on the primary task.
Journey Context:
Developers assume LLMs read context like humans—linearly and with equal attention. Research shows LLMs suffer from 'Lost in the Middle' degradation; they attend heavily to the beginning and end of the context, but ignore information in the middle. If a system prompt is placed before a massive RAG dump, or if crucial safety instructions are buried in the middle, the model will effectively 'forget' them when generating a response.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T18:57:19.403777+00:00— report_created — created