9 Ways to Get Better Answers From Claude: A Prompting Guide
Same model, different prompt, completely different result. Based on Anthropic's own guidance: giving Claude context, XML tags, examples and room to think, with before/after examples.

Contents 12
Two people ask the same Claude model for the same job on the same day. One gets a generic answer; the other gets something they can use right away. The difference isn't the model, it's the question. Prompting isn't magic; it's the same skill as giving a good brief to a good colleague.
In this post we turned the advice in Anthropic's own prompt engineering documentation into a practical guide, with a before/after example for each technique.
In short:
- Think of Claude as a brilliant new employee on their first day who knows nothing about your company: give context.
- Say what to do rather than what not to do, and explain the "why" behind rules.
- Show the format you want with 3-5 examples, and separate different kinds of content with XML tags.
- Give Claude room to think on complex work, and break big jobs into steps.
1. Be clear and direct
Anthropic suggests a simple test: show your prompt to a colleague with no context on the task. If they'd be confused about what to do, Claude will probably be guessing too.
Current Claude models follow instructions very precisely. That's great, but it has a consequence: they won't do what you didn't ask for. If you want an ambitious output, say so explicitly.
Before:
Design a sales report dashboard.
After:
Design a sales report dashboard for the managers of a small
e-commerce company. Include daily revenue, the top 10 products
and the return rate. Add as many useful interactions as possible;
don't stop at a basic skeleton, make it feel like a finished product.
2. Give context and explain why
When Claude knows the reason behind a rule, it follows the spirit of the rule, not just the letter, and generalizes to similar cases.
Before:
Never use ellipses.
After:
Your response will be read aloud by a text-to-speech engine.
Don't use ellipses, because the engine can't pronounce them.
With the second version Claude doesn't just avoid ellipses; it also cuts down on tables, emojis and abbreviations that don't work when read aloud, because it understands the real goal.
Saying who the output is for, where it'll be used and what a good result looks like works the same way.
3. Say what to do, not what not to do
"Write in flowing paragraphs" works better than "don't use markdown". Negative instructions draw attention to exactly what you want to avoid. Describe the behavior you want in positive terms.
One more tip: your prompt's style shapes the answer's style. A prompt full of bullets and headings tends to get a response like that. If you want flowing prose, write the prompt in prose.
4. Show, with examples
The most reliable way to describe a format, tone or structure is to show it. Anthropic recommends 3-5 diverse examples. They should resemble your real use case and differ enough from each other; otherwise Claude may copy accidental details too.
Tag customer reviews with a single word.
<examples>
<example>
Review: Shipping took two days, packaging was great.
Tag: delivery
</example>
<example>
Review: The size chart is wrong, M fits like S.
Tag: product
</example>
<example>
Review: I called three times about a return, nobody answered.
Tag: support
</example>
</examples>
Review: Nice product but the box arrived crushed.
Tag:
5. Structure with XML tags
When a prompt mixes instructions, context, examples and documents, wrapping them in XML tags keeps Claude from confusing one for another. Use meaningful names like <contract>, <instructions> and <examples>; consistency is what matters. You can refer to tags directly: "List the penalty clauses in <contract>."
The same works for output: "Put your analysis in <analysis> tags and the conclusion in <conclusion> tags." That also makes the answer easy to parse in code.
6. Give it a role
Setting a role in the system prompt noticeably changes the focus and depth of the answer. Instead of a generic "you are a helpful assistant", give a role specific to the job:
You are an accountant with 15 years of experience working with
small businesses. The person you're talking to doesn't know
accounting; whenever you use a technical term, explain it in
plain language right away.
The role shapes which details Claude cares about and which risks it notices.
7. Give it room to think
For multi-step reasoning, math, analysis or complex decisions, letting Claude think before answering improves the result. With current Claude models the most direct way is to turn on extended thinking. If you're not using it, you can ask for it in the prompt:
Before answering, think step by step inside <thinking> tags:
first list the given facts, then compare possible approaches.
Give your final recommendation inside <answer> tags.
An interesting observation from Anthropic: a general "think carefully" instruction often works better than a prescriptive step-by-step recipe. Instead of micromanaging how the model thinks, tell it what to care about.
8. Order long documents correctly
When you give Claude a long contract, report or several documents, placement matters. Anthropic's advice: put long documents at the top of the prompt and your question and instructions at the end. In Anthropic's tests, a question at the end noticeably improved response quality, especially with complex, multi-document inputs.
If there are several documents, tag each with metadata like source and date. Then ask Claude to find relevant quotes first and answer based on them:
<documents>
<document source="2025_annual_report.pdf">...</document>
<document source="2026_q2_report.pdf">...</document>
</documents>
First write the quotes about profit margin from both reports
inside <quotes>. Then, based only on those quotes, explain why
the margin fell.
This also reduces the risk of made-up facts: Claude's answer is tied to evidence.
9. Chain big jobs
Instead of one giant prompt like "research the market, analyze competitors, propose a strategy and build a deck", split the work into stages. Each step's output feeds the next. That way each step gets Claude's full attention, and if one step goes wrong you only fix that step.
Adding a review step at the end also helps: "Review the report above as an editor; flag numbers that may be wrong and claims without support."
Quick checklist
Before sending an important prompt, ask yourself:
| Question | If missing |
|---|---|
| Who is it for, and why? | Add context |
| What does a good output look like? | Describe format and scope |
| Is the reason behind each rule clear? | Write the reason |
| Is the format critical? | Add 3-5 examples |
| Are different kinds of content mixed? | Separate with XML tags |
| Is the task multi-step? | Give room to think or chain it |
Frequently asked questions
Should I write to Claude in English or my own language?
Claude understands many languages well and answers in them. If you're producing content in a given language, writing the prompt in that language usually gives better consistency in tone and terminology.
How long should a prompt be?
As long as it needs to be. Length isn't the problem; missing information is. A long prompt that carries context, purpose and expectations always beats a vague short one. Cut needless repetition, though.
Do capital letters and "VERY IMPORTANT" help?
They were used to grab attention with older models. Current Claude models are already very responsive to instructions; heavy emphasis can make them over-apply a rule. Plain language with a reason works better.
Do these techniques apply to Claude Code?
Yes. Context, a definition of done and boundaries matter just as much for tasks you give Claude Code. For examples from a real project, see our Claude Code guide.
Prompting is a skill that directly determines the value you get from AI. If you want a Claude-based assistant, document analysis system or automation built for your company, reach us through our enterprise software development page.


