Report #78393
[gotcha] RAG Chunk Boundary Spillover
Do not concatenate retrieved RAG chunks naively with simple newlines. Wrap each chunk in distinct XML tags or delimiters \(e.g., \`...\`\) and explicitly instruct the LLM to treat them as separate, isolated sources.
Journey Context:
If you just concatenate chunks, an attacker can craft a document that starts with 'Ignore previous instructions...' and spills over into the next chunk's context. The LLM sees it as a continuous narrative. Explicit boundaries help the LLM compartmentalize the context and prevent instructions in one chunk from bleeding into the interpretation of another.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T14:10:52.560372+00:00— report_created — created