Case & CodeA FIELD GUIDE TO AI
Start learning
Intermediate

XML

Also: Extensible Markup Language

In plain words

A way of labelling parts of a text with tags, like <date>12 March</date>, so a program knows what each part is.

The fuller definition

XML means Extensible Markup Language. It represents structured data with named tags and nesting; similar tags are also used to organize prompts.

How it fits together
  1. Open tag

    <record>

  2. Content

    Source text

  3. Close tag

    </record>

A simplified relationship, not a screenshot or a complete design.

A concrete example

A prompt labels source material inside <record> and the task inside <instructions>.

The distinction that matters

Tagging helps distinguish sections but is not an enforced security boundary against prompt injection.

Related terms

Where it is taught

Give AI a brief it can actually follow

Source and further reading

Anthropic · Context engineering

The definition and example are written for this library. The link gives background, official documentation or legal authority as labelled. Legal scope depends on the jurisdiction and current text; product features depend on release and settings.

Lessons, terms, practical guides and sources ESC