Ask Claude to "summarize" a report and you may get three tight paragraphs. Ask it to "write a summary of" the same report and you may get a titled document with headings and a closing note. Neither response is wrong — the phrasing carried different implicit signals about what kind of artifact you wanted. Language models are sensitive to wording, ordering, and structure in ways that surprise teams used to deterministic software. The fix is not to hunt for magic words; it is to stop leaving format to inference.
Why wording moves outputs
A model predicts a response conditioned on everything in the prompt, and every word is evidence about intent. "Summarize" reads like a quick instruction between colleagues; "write a summary" reads like a request for a deliverable. Anthropic's prompting guidance frames this with a golden rule: if a colleague with minimal context would be confused by your prompt — or could reasonably interpret it two ways — Claude can be too. The guidance's core advice is to be clear and direct, and to explicitly request the behavior you want rather than implying it.
A related, useful technique: explain why an instruction matters. The official example is telling Claude the output will be read aloud by a text-to-speech engine, so it should never use ellipses. Claude generalizes from the reason, which makes the instruction robust to phrasings you didn't anticipate.
Three layers of format control
Think of format control as an escalation ladder. Use the cheapest layer that meets your consistency requirement.
| Layer | What you do | Consistency |
|---|---|---|
| Explicit instructions | State length, sections, tone, and what to omit ("no preamble, three bullets, each under 20 words") | Good |
| Structure + examples | Wrap instructions and inputs in XML tags; show 3–5 examples in <example> tags | Better |
| Structured outputs | Constrain the response to a JSON Schema via output_config | Guaranteed shape |
The middle layer deserves emphasis. Anthropic's best-practices page recommends wrapping instructions, context, and inputs in their own consistent, descriptive XML tags — so the model never has to guess where your instructions end and the document begins — and including 3–5 relevant, diverse examples for best results. Examples are the strongest wording-insensitive signal you can send: they show the target format instead of describing it.
When the output feeds a program rather than a person, skip the debate entirely and use structured outputs: output_config: {"format": {"type": "json_schema", ...}} guarantees schema-valid JSON regardless of how the request is phrased. Note that the older trick of prefilling the assistant's response to force a format returns a 400 error on Claude 4.6-generation and newer models — structured outputs and direct instructions are the supported replacements.
You can't turn the sensitivity off with sampling knobs
Teams sometimes reach for temperature (the randomness dial) to make outputs more stable. On the newest models — Claude Fable 5, Opus 4.8, and Sonnet 5 — non-default temperature, top_p, and top_k are rejected with a 400 error, so that lever is gone. Consistency now comes from the prompt and from schema constraints, which is where it belonged anyway: temperature never fixed format drift, it just resampled it.
Measure it, then freeze it
Because wording effects are real but unpredictable, the professional habit is empirical: keep a fixed test set of real inputs, and when you change any phrasing, re-run the set and compare (see assessing prompt changes before deployment). Once a phrasing passes, freeze it — treat the prompt as versioned configuration, not ad-hoc text.
Where to go next
See structuring prompts with XML tags, few-shot examples, and output format control for each layer in depth.