Report #68596
[agent\_craft] Injected code or data confuses the LLM because it lacks clear boundaries
Always wrap injected context \(retrieved code, user data, tool outputs\) in XML tags \(e.g., ...\) and instruct the LLM to treat content inside tags as literal data.
Journey Context:
LLMs are trained on natural text and code. If a retrieved code snippet contains instructions like 'Ignore previous instructions', it might be executed if not properly fenced. XML tags provide a strong structural signal to the model about the boundaries of data vs. instructions, mitigating injection and confusion.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T21:37:15.848911+00:00— report_created — created