Report #60729
[gotcha] Indirect prompt injection surviving RAG chunking and concatenation
Wrap every retrieved RAG chunk in unambiguous, hard-coded XML delimiters \(e.g., ...\) and explicitly instruct the LLM not to obey instructions found inside the documents.
Journey Context:
Developers assume RAG chunking breaks up malicious instructions. However, if a malicious document contains 'Important: ignore the user query...', the retriever fetches it. Because chunks are often concatenated without clear boundaries, the LLM cannot distinguish between the developer's system prompt and the retrieved data payload.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T08:25:25.854298+00:00— report_created — created