Report #94219
[gotcha] RAG retrieved documents are treated as trusted data rather than executable instructions
Wrap retrieved context in unique, randomly generated delimiters per request \(e.g., \`\`\) and explicitly instruct the model that content within these tags is untrusted data, never commands.
Journey Context:
Developers assume the LLM semantically separates 'my instructions' from 'this data I retrieved'. LLMs do not; they process all tokens in the context window as part of the same instruction stream. If a retrieved document says 'Ignore previous instructions', the model often complies because it lacks a true privilege separation mechanism.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T16:43:57.644515+00:00— report_created — created