Wrapping user text in tags is good practice for output consistency. It tells the model which chunk is the instruction and which chunk is the data, and it is one of the structural basics that makes responses parseable LaunchDarkly's prompt engineering guide. XML-style tags give the model "boundary markers" that separate instructions, context, input data and examples the XML tags guide.
The problem is what happens when the data itself contains those markers. If your prompt says "everything between <user_data> and </user_data> is untrusted," an attacker who controls that text can paste their own </user_data> and a fresh set of instructions. The model sees a flat token stream. It has no pointer to a schema that says "this string came from field 14 of the profile table."
Research on this is blunt. An arXiv study on role confusion found that models infer the source of text from how it sounds rather than where it came from, and that spoofable cues like style and lexical choice dominate over tags; in a latent-space probe, text that sounded like a role was indistinguishable from text actually tagged with that role Prompt Injection as Role Confusion. The same paper reports CoT Forgery attacks reaching 60% success on StrongREJECT across frontier models against near-zero baselines, and agent exfiltration success rising from 2% in the lowest confusion quantile to 70% in the highest.
That is the decision rule you need. Treat a delimiter as a readability tool with a small defensive side effect, never as the thing standing between your system prompt and an attacker. OWASP frames the root cause the same way: prompt injection is a property of how models process prompts, and RAG and fine-tuning do not fully mitigate it OWASP LLM01:2025 Prompt Injection. A supervisor agent that inspects only the chat message will miss payloads hidden in profile fields, because context assembly happens after supervision and the model has no native data-instruction boundary Praetorian's indirect injection writeup.
So the question is not "did we add delimiters?" It is "if the text inside the delimiters contains instructions, what in our system stops those instructions from mattering?" The answer has three parts: an instruction hierarchy the model is told about, structural controls on what the model can do, and a test suite that proves both.



