XML Envelope Format
The most common envelope format (~35%, ~18 tools) in the corpus. Instructions are wrapped in XML-style tags, providing hierarchical structure that LLMs parse well due to training on HTML/XML markup.
Structure (confidence: high)
<system>
<role>You are an expert...</role>
<tools>
<tool name="search">...</tool>
</tools>
<rules>
<rule>Never summarize...</rule>
</rules>
</system>Tag names serve as semantic anchors that improve instruction following.
Variants (confidence: high)
- Narrow XML (Anthropic, Cline): 3-5 top-level tags. Structured
<tool>blocks. - Wide XML (Manus Modules): 15+
<module>blocks, extremely verbose. - Hybrid XML-Markdown (Cluely, CodeBuddy): XML envelope with markdown inside tags.
- Minimal XML (Perplexity, Notion AI): 2-3 XML tags, rest in markdown.
Format Selection Trade-offs (confidence: high)
| Format | Token Efficiency | LLM Compliance | Human Editability | Machine Parseability |
|---|---|---|---|---|
| XML Envelope | Medium | High | Medium | High |
| Markdown Headers | High | High | High | Low |
| YAML Config | High | Low | Medium | High |
| JSON-Embedded | Medium | Medium | Low | High |
Implications: XML dominates because it optimizes for the LLM’s parsing ability — the hierarchical structure and semantic tag names improve instruction following. The choice of envelope format reflects a tool’s priority between LLM compliance and human readability. XML envelopes are preferred for agentic tools that need reliable behavior; markdown dominates for developer-facing tools where humans will read and edit prompts directly.
See also: markdown-header-format, xml-vs-markdown-envelopes, format-interoperability
Sources
- [raw/prompts/articles/taxonomy-synthesis-2026-07-16.md]