Structure for precision – Markdown, XML, and hierarchy
📄 Section 3: Structure for precision – Markdown, XML, and hierarchy
Section titled “📄 Section 3: Structure for precision – Markdown, XML, and hierarchy”🎯 Learning objectives
- Use Markdown for readable structure in longer system prompts
- Understand XML-style tags as delimiters
- Use hierarchy and emphasis without creating a wall of rules the model ignores anyway
Markdown in system prompts
Models have seen massive amounts of Markdown in training. Structure with #, ##, lists, and bold makes sections easier to follow.
Without structure: one long run of sentences about HR policy.
With structure: headings for Role / Behavior / Constraints where the last point is bold if it’s critical.
Hierarchy, uppercase, and the right level of detail
Hierarchy: overarching principles first, then details that follow from them.
Uppercase: e.g. CRITICAL: for a single rule – use sparingly.
Too vague: “Help with HR questions.”
Too granular: long if-then matrices for every conceivable edge case – the model still misses edge cases.
Just right: clear principles + how uncertainty and escalation are handled + format.
🖊 Try it yourself
Section titled “🖊 Try it yourself”Take an existing prompt and restructure it with Markdown or tags. Compare responses to the same three test questions.
Summary
Section titled “Summary”- Structure helps the model navigate long instructions.
- Tags can isolate context, task, and format.
- Balance beats both vagueness and micro-management.
Test your knowledge
2 questions · 100% correct to pass · Review your answers when done