How to prompt Claude Haiku 4.5
Claude Haiku 4.5 is Anthropic’s fast, compact model. Prompt it with short XML-tagged briefs that ask for one deliverable, contain only the context the task needs, and set a numeric length cap. It shares the Claude XML dialect with Sonnet and Opus but rewards literal, tight instructions. Long agent-style prompts written for Opus dilute the task.
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.