How to prompt Claude Haiku 4.5
Prompt Claude Haiku 4.5 with a short XML brief that asks for one deliverable and keeps instructions, context, and any example in separate tags. Anthropic’s prompting notes say XML tags reduce mix-ups when a prompt contains instructions, context, examples, and inputs. They also say to put long documents at the top and the query below them, and to wrap examples so they are not read as the task. A role can be a single sentence. Haiku does not need a longer version of that advice. It needs less of it.
A Haiku prompt goes wrong when it is an Opus brief with the model name swapped, or when the example and the job share a paragraph. One imperative, the facts, a numeric length, and the output shape are enough for an ordinary task. Nest tags only when something is actually inside something else, which is the hierarchy case Anthropic describes, not a default.
The prompt structure
Use the same tags as the larger Claude models, and keep each one short:
<context>
A customer asked whether the Pro plan includes SSO. SSO is only
available on the Business plan and above.
</context>
<task>
Write the reply to the customer.
</task>
<constraints>
Maximum 80 words. Friendly and direct, no upsell language.
</constraints>
<output_format>
Plain-text email body without a greeting line.
</output_format>
Tags matter more on a small model than on a large one. Haiku is more likely to misread a long paragraph that blends instructions with pasted text, and tags keep the two apart. Nest tags only when the content really is hierarchical.
One job per prompt
Haiku doesn’t need a research programme. If you want an email shortened, ask for exactly that. Don’t add stakeholder analysis, alternative versions or a multi-phase plan.
- Ask for one clear deliverable instead of several optional tracks.
- Keep any role to a single line, or leave it out.
- Leave out audience descriptions unless the audience really changes the answer.
- Skip “think step by step” and self-review sections for everyday tasks.
Put out-of-scope boundaries in <constraints> as a positive rule, e.g. “work only with the pasted email”.
Use numbers for length
Haiku can still ramble when length is left open. “Be concise” is weaker than a concrete cap such as “max 80 words”, “three bullets” or “no preamble”. Pair the cap with the output shape, so the model knows both how much to write and in what form.
Ground it without freezing it
A blanket “do not infer anything” can make small models refuse simple deductions from your own text. Instead, tell Haiku to use only the facts you supplied and to mark anything missing as [detail TBD].
What goes in each tag
<instructions>— an optional one-line role.<context>— the facts: product, audience, dates, pasted material.<task>— one imperative verb and its object: “Summarise”, “Fix”, “Write”.<constraints>— length, tone, scope, what must stay unchanged.<output_format>— headings, table columns, language.<success_criteria>— only for demanding tasks; two or three checkable items.
Why Haiku prompts go wrong
- Opus-length briefs. They waste tokens and bury the task.
- Untagged mixes of instructions and examples. Haiku can treat the example as the job.
- No output shape. You get a chatty essay.
- Invented details (file paths, audiences) that the model then treats as fact.
When does a Haiku prompt stop being one task?
Instructions and the pasted text share a paragraph. Anthropic’s reason for XML is that mix. If the email you want rewritten is not inside <context>, Haiku can treat a sentence in that email as the job. Tags are how the two stay apart. They are not decoration.
The query sits above a long paste. The same best-practices page says to put longform data at the top and the query, instructions, and examples below it. A short Haiku brief that still includes a long thread should follow that order: thread first, “reply to the last message” last.
An example is not wrapped. Examples are documented as a way to steer format, and they are supposed to be wrapped so they stay distinct from instructions. An untagged sample email becomes a second task. For a one-off reply, skip the example entirely.
Several deliverables in one ask. A short model still receives the whole prompt. “Draft the email, then the stakeholder note, then three subject lines” is three jobs. Ask for the one you will send.
Haiku still shares Claude’s tag names with Sonnet and Opus. What it does not share is how much brief those tags should hold. Cut <context> until every remaining line would change the reply if you deleted it. Put a numeric cap in <constraints>. “Be concise” does not name a length. Leave <success_criteria> off unless “done” is a check you could apply without rereading the whole answer.
What does the same rough prompt look like for Claude Haiku 4.5?
Same draft. One deliverable. No extra facts.
write a blog post announcing our windows app is moving from 1000 one-off credits to a flat 13.99 a month plan, about 600 words, its for people already using it, dont be hypey
<context>
Windows app. Readers already use it.
Old: 1,000 one-off credits. New: a flat 13.99 a month.
</context>
<task>
Write the announcement post.
</task>
<constraints>
About 600 words. No hype adjectives. Name both prices.
</constraints>
<output_format>
Prose. One post. No outline first.
</output_format>