Skip to content
Back to full roadmap
topicfoundation

Delimiters & XML Tags

XML tags (especially in Claude) are the most reliable way to separate context blocks.

1 hours1 resources1 prereqs

When instruction, examples, context, and output specs are clearly separated, the model doesn't confuse them.

Pattern:

<task>...</task>
<examples>
  <example>
    <input>...</input>
    <output>...</output>
  </example>
</examples>
<input>...</input>
<output_format>JSON: {...}</output_format>

Claude is specifically trained on this pattern. It also works on GPT/Gemini, where markdown headers may be sufficient.

Prerequisites

Resources(1)