Why structure helps a language model
A prompt is just text, but the model reads structure as a signal. When you separate
your instructions, your context, and your data into clearly delimited blocks, the
model has an easier time working out what is a command and what is material to act
on. This is the single most valuable thing markdown does in a prompt. A wall of
unstructured text forces the model to infer boundaries; a prompt with a ## Task
header, a ## Context section, and a fenced code block makes those boundaries
explicit. The effect grows with prompt complexity — for a one-sentence question it is
irrelevant, but for a multi-part instruction with reference material it can be the
difference between a focused answer and a confused one.
The formatting that actually earns its tokens
Not all markdown is equally useful. The high-value elements are structural:
- Headers (
##) to label distinct sections — task, context, constraints, output format. - Numbered lists for sequential steps the model should follow in order.
- Bulleted lists for requirements or constraints that are unordered but distinct.
- Fenced code blocks (triple backticks) to wrap data, code, or text the model must treat as literal input rather than instructions.
The lower-value elements are decorative: bold and italic emphasis, headings used for style, horizontal rules. They do little for the model and mostly help you read your own prompt. There is no harm in them, but do not expect bold text to make the model “pay more attention” — that is a myth. Reserve your effort for the structure that genuinely disambiguates intent.
Before and after
Compare an unstructured prompt with a structured one. Unstructured: “Summarise this article in three bullets and also tell me the sentiment and here is the article it’s about a new product launch…” The model has to untangle three requests and find where the article begins. Structured:
## Task
1. Summarise the article in exactly three bullet points.
2. State the overall sentiment (positive / neutral / negative).
## Article
<article text here>
The second version reliably produces cleaner, more complete answers because each instruction is enumerated and the article is clearly fenced off as data. This pattern — task section, then a delimited data section — is the workhorse of structured prompting.
Practical rules and model-specific notes
Use headers to label sections, fenced blocks to isolate data, and lists to enumerate
requirements — that covers ninety percent of the benefit. Be consistent: pick one
delimiting convention per prompt rather than mixing styles. For Claude, Anthropic
recommends XML-style tags (<context>...</context>) because the model is specifically
trained on them, though markdown also works. For ChatGPT and Gemini, markdown
headers and triple-backtick blocks are the natural fit. Remember that markdown symbols
cost tokens, so for high-volume API workloads keep the structural delimiters and trim
the decoration. Finally, if you need a specific output format such as JSON or plain
text, state it explicitly — chat models default to markdown in their replies, and that
formatting can quietly break a parser expecting raw text.