Why XML Tags Are So Fundamental to Claude

And What That Tells Us About Language

Part 4 of 5 in Delimiters in Languages

The tour de force of Claude is to have made XML tags first-class citizens. This assertion may seem provocative, but I believe there is something fundamental at play here.

I recommend reading the first article of this series to understand the implication of categorizing XML tags as delimiters in this context.

What Anthropic Recommends

The Claude API Docs provide practical prompting best practices, designed for developers by outlining specific instructions and clear formatting rules. They return several times to one piece of advice, which contrasts with the rest of the guide: for the newest models, one of the oldest notations of the web:

Two excerpts from Anthropic’s documentation separated by a torn paper divider marking omitted content. The first recommends XML tags for prompt structure; the second recommends XML format indicators and shows a sample prompt enclosed in an XML tag.

Excerpts from Anthropic’s documentation as it appeared on March 1, 2026.

This is not a minor tip: one user reports that structuring prompts with XML can be a transformative experience: “Here’s the simple trick. Instead of just asking Claude stuff like normal, you put your request in special [XML] tags. . . . That’s literally it. And the results are so much better.”

And not only does Claude leverage XML tags in user prompts, but its framework specifically incorporates them as key elements: “Anthropic heavily uses XML tags in their prompts.” The system prompts that Anthropic publishes for its own applications show it: they are divided into sections such as <tone_and_formatting> and <user_wellbeing>.

This is, admittedly, a subjective reading, but I believe the repurposing of XML, a technology dating back to 1998, is something Claude’s makers saw first and said most explicitly: it turns a model into something closer to a genuine language interpreter.

Delimiters: First-Order and Second-Order Expressions

My own research (as a hobbyist) has led me to postulate the existence of a principle I find in every language I have looked at, whether human or artificial. I have observed this principle at work in diverse contexts: programming languages, bacterial DNA sequences, Homeric verses, and now, seemingly, with Claude. This principle centers on the necessity for any language (regardless of its form) to possess a mechanism for signaling the transition from first-order to second-order expressions. I contend that such a mechanism is fundamentally required for information transfer between any two entities; without it, meaningful communication becomes ambiguous.

These transitions are typically indicated by markers or delimiters. In contemporary English, quotation marks serve this purpose. They delineate the shift from direct statement to reported speech, metaphor, or quoted material. These markers operate in pairs: one initiates the transition from first-order to second-order expression, while the other signals a return to the original level of discourse. Furthermore, this nesting can be deeply embedded; we can move from order n to order n+1, then to n+2, and so on, creating complex layers of meaning.

The “Yo Claude” Example

To illustrate how these distinctions play out in practice, consider an observation from Anthropic’s prompt engineering tutorial, shown here in its Bedrock edition. It serves as a concrete demonstration of how crucial clear delimiters are for ensuring Claude accurately interprets and executes complex prompts:

Excerpt from the tutorial notebook: a prompt template puts an email variable right after the words Yo Claude, with no separation, so Claude takes the greeting for part of the email. The fix it recommends: wrap the input in XML tags.

“Here, Claude thinks ‘Yo Claude’ is part of the email it’s supposed to rewrite!” is a remarkably revealing statement. “Yo Claude” is a first-order expression (the user interacting with Claude), the content of the email is a second-order expression (the email the user will address to someone else). And they use XML tags because they need to delimit, they need to enclose the higher-order expression, like we do, in English, when we quote someone using quotation marks (like at the beginning of this paragraph); like Homer did when making heroes talk using formulaic delimiters in Ancient Greek; like bacterial DNA does to store recognition sequences.

A skeptic will ask what happens if the email itself contains </email>. Nothing stops the tag from closing early: tags in a prompt have no escaping, and they are a strong hint to the model, not a security boundary (see what happens when a delimiter shows up in plain text).

Why It Need Not Be XML

In truth, it does not matter that these tags are XML. The tags could have been anything else: brackets, Markdown headings, names of Anthropic’s own invention. (They are not the special tokens of a previous article, such as <|begin_of_text|>: those frame the conversation itself, and Claude has its own; XML tags are ordinary text typed inside a message.) What matters is what these tags represent. Anthropic says as much in the same tutorial: Claude “was trained specifically to recognize XML tags as a prompt organizing mechanism,” yet, outside of function calling, “there are no special sauce XML tags that Claude has been trained on.” What Claude’s creators did first, and said most explicitly, was to make their model “aware” of the concept of delimiters, which, at least in my view, is so crucial to the effective processing and communication of information. And it is precisely this capacity that makes Claude so effective at interpreting layered meaning.