type frameworkowner Thomas Cherickalcurator Thomas Cherickalupdated 2026-11-15
XML-Structured
What It Is
Separates instructions, context, data and output format with XML tags. Recommended in Anthropic's prompt engineering documentation for Claude because tags make long prompts unambiguous and parseable.
When to Use It
Use for any long or document-heavy prompt, and as the outer wrapper for the other frameworks. Put long documents first and the question last.
Blank Template
<documents>{{long material first}}</documents>
<role>{{persona}}</role>
<task>{{what to do}}</task>
<constraints>{{rules}}</constraints>
<output_format>{{shape, tags for parsing}}</output_format>
Five Sample Prompts for Gen AI Professionals
XML-01 - Contract risk scan
| id |
role |
version |
status |
owner |
| XML-01 |
Gen AI consultant |
0.1.0 |
seed |
Thomas Cherickal |
<documents><contract>{{contract}}</contract></documents>
<role>Commercial analyst, not a lawyer.</role>
<task>List clauses that create AI-specific risk: data use, IP, liability, model changes.</task>
<constraints>Quote the clause number only, not full text. Flag for legal review, do not advise.</constraints>
<output_format><risks><risk clause="" severity="" reason=""/></risks></output_format>
XML-02 - Multi-doc synthesis
| id |
role |
version |
status |
owner |
| XML-02 |
RAG engineer |
0.1.0 |
seed |
Thomas Cherickal |
<documents>{{doc_1}}{{doc_2}}{{doc_3}}</documents>
<task>Answer {{question}} using only these documents.</task>
<constraints>Cite doc and paragraph for every claim. Say "not found" if unsupported.</constraints>
<output_format><answer/><citations/></output_format>
XML-03 - System prompt for an agent
| id |
role |
version |
status |
owner |
| XML-03 |
Gen AI engineer |
0.1.0 |
seed |
Thomas Cherickal |
<role>You write production system prompts.</role>
<task>Write a system prompt for an agent that {{job}} for {{users}}.</task>
<constraints>Include scope, tools policy, escalation, refusal style, output format. Under 500 words.</constraints>
<output_format><system_prompt/><test_cases>5 adversarial user messages</test_cases></output_format>
XML-04 - Full-stack feature spec
| id |
role |
version |
status |
owner |
| XML-04 |
Full-stack engineer |
0.1.0 |
seed |
Thomas Cherickal |
<documents><prd>{{prd}}</prd><schema>{{db_schema}}</schema></documents>
<task>Write a technical spec for the feature.</task>
<constraints>Cover API contract, DB changes, UI states, tests, rollout.</constraints>
<output_format>Markdown with H2 per section.</output_format>
XML-05 - PWA audit
| id |
role |
version |
status |
owner |
| XML-05 |
PWA engineer |
0.1.0 |
seed |
Thomas Cherickal |
<documents><manifest>{{manifest.json}}</manifest><sw>{{service-worker.js}}</sw></documents>
<task>Audit installability, offline behaviour and caching.</task>
<constraints>Plain HTML, CSS, JS only. No frameworks.</constraints>
<output_format><findings/><fixes>code diffs</fixes></output_format>
Links