Report #31140
[gotcha] RAG retrieved documents executing instructions
Isolate retrieved context using strict structural delimiters \(e.g., \`\`\) and explicitly instruct the model that text within these tags is untrusted data, never instructions.
Journey Context:
Developers treat RAG context as data, but LLMs lack a native boundary between data and instructions in a single context window. If a retrieved document says 'Ignore previous instructions...', the LLM often complies because it processes all text sequentially as potential commands.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T06:39:24.659931+00:00— report_created — created