XML-style tags are markup-like delimiters that divide a prompt into named sections. They make roles, context, instructions, inputs, tone, and output requirements easier to distinguish, providing a more reliable structure for prompt construction. section 2.6
Structured keynote prompt
<Persona>\nYou’re an experienced Large Language Model developer.\n</Persona>\n\n<Context>\nYou’ve been invited to give a keynote speech.\n</Context>\n\n<Instruction>\nWrite the punch lines.\n</Instruction>\n\n<Input>\nInclude the supplied facts.\n</Input>\n\n<Tone>\nUse a witty but entertaining tone.\n</Tone>\n\n<OutputFormat>\nPresent two paragraphs of five lines each.\n</OutputFormat> section 2.6
Use tags flexibly when structuring prompts:
- Name sections such as <persona>, <context>, <instruction>, <input>, and <examples> when explicit organization helps. section 2.6 section 2.7
- Do not assume every section requires a label; context and tone can remain unnamed when the model can infer their purpose. section 2.6
- Combine tags with prompt templates when static structure must be separated from runtime content. section 2.7
