Most prompts are either too loose or too rigid.
Markdown
Plain text leaves AI (and sometimes humans too to be honest) guessing how the logic actually works. This results in what people love to label as 'non-deterministic' – but I think most of the variation they're seeing is actually a clarity problem:## Laundry
Do the darks first. If the weather is good, hang outside,
otherwise use the tumble dryer. Towels go on a hot wash.
Delicates should be done separately on a cool cycle.
Check pockets before loading.
Readable. But "do the darks first" for example. Before what? Is the pocket check before loading darks specifically? Or before everything? Is "delicates separately" a separate load? Or a separate machine? Humans fill in the gaps. An LLM might not.
XML
Full XML on the other hand reads... Well... It doesn't read to most of us anyway... Looks like something nobody wants to touch. Miserable to read or edit:<task name="laundry">
<rule type="pre-check">Check all pockets before loading any wash</rule>
<step order="1">
<load type="darks" cycle="normal" temp="cold"/>
<dry method="outdoor" condition="weather=good"/>
<dry method="tumble" condition="weather!=good"/>
</step>
<step order="2">
<load type="towels" cycle="normal" temp="hot"/>
</step>
<step order="3">
<load type="delicates" cycle="gentle" temp="cool" separate="true"/>
</step>
</task>
The sweet spot
A combination of both – markdown for most of it, XML for the unambiguous machine logic. Clear AND readable:## Laundry
Work through loads in this order: darks, towels, delicates.
<rules>
- Check all pockets before loading any wash.
- Delicates always get their own separate load.
</rules>
<if condition="weather is good">Hang dry outside.</if>
<if condition="weather is bad">Use the tumble dryer.</if>
| Load | Cycle | Temp |
|-----------|--------|------|
| Darks | Normal | Cold |
| Towels | Normal | Hot |
| Delicates | Gentle | Cool |
Same information. The narrative is still markdown – you can skim it and know what's happening. But the bits that need to be unambiguous – the rules, conditions, structured data etc – get just enough XML to remove guesswork.
The principle
- Use XML where logic lives: conditions, rules, structured lookups, parallel/sequential flow.
- Use markdown where meaning lives: descriptions, templates, step narratives.
- ...and get your LLM to do it for you!