Claude, built by Anthropic, has distinct strengths and quirks compared to other frontier models. It's particularly good at nuanced instruction-following, long document analysis, and careful reasoning — but it responds best to prompts written in specific ways.
What Makes Claude Different
Trained for instruction-following over raw task completion. Claude is trained with an emphasis on understanding what you actually want, not just what you literally said. This means it handles ambiguity better than most models — but it also means vague prompts lead to vague answers.
Responds exceptionally well to XML tags. Anthropic trained Claude with XML as a structuring convention. Tags like <context>, <instructions>, and <output_format> help Claude parse complex prompts cleanly. This is especially useful for multi-part instructions with multiple types of content.
Long context window with strong recall. Claude models handle very long documents (up to 200K tokens in Claude 3.5/3.7) with better mid-document recall than most models. This makes it well-suited for document analysis, long-form editing, and large codebase review.
Tendency toward caution. By default, Claude adds safety caveats and hedges where it's uncertain. For professional use cases, you often need to calibrate this via system prompts.
Core Prompting Patterns for Claude
Use XML Tags for Structure
For any prompt with multiple sections, XML tags reduce ambiguity significantly:
<context>
You are reviewing a research proposal for a neuroscience grant committee.
The proposal is for a 3-year study on working memory consolidation.
</context>
<instructions>
Evaluate this proposal on three dimensions: scientific rigor,
feasibility, and novelty. For each, give a score from 1-5 and a brief
justification. Then give an overall recommendation.
</instructions>
<proposal>
[paste proposal here]
</proposal>
<output_format>
## Scientific Rigor: [score]/5
[justification]
## Feasibility: [score]/5
[justification]
## Novelty: [score]/5
[justification]
## Recommendation
[decision + key reason]
</output_format>
The tags serve as named sections that Claude can refer back to as it generates each part of the response.
Write System Prompts That Explain the "Why"
Claude responds notably better when you explain the reasoning behind constraints, not just state them:
<!-- Less effective -->
<instructions>Always recommend consulting a doctor.</instructions>
<!-- More effective -->
<instructions>
Always recommend consulting a doctor for medical questions.
This is because our platform is used by patients who may act on advice
without professional review, and we want to ensure they have appropriate
oversight for any health decisions.
</instructions>
The explanation gives Claude the context to apply the constraint intelligently across edge cases.
Give Claude Permission to Be Direct
By default, Claude adds caveats, hedges, and considers multiple perspectives. If you want directness, ask for it:
You are an expert Python developer reviewing this code. Give me direct,
specific feedback. Don't hedge with "this could potentially be a problem" —
tell me what IS a problem and exactly how to fix it.
Or in a system prompt:
<style>
Be direct and opinionated. If something is wrong, say it's wrong.
If there's a clear best option, recommend it rather than listing pros
and cons of all options. I can handle direct feedback.
</style>
Use Multi-Turn Conversation Strategically
Claude maintains context effectively across long conversations. For complex tasks, breaking them into turns often produces better results than a single massive prompt:
Turn 1: "Here's my business model. Analyze it and identify the three
biggest risks."
Turn 2: "For risk #2 [competitive saturation], what are the three most
viable mitigation strategies for a bootstrapped startup?"
Turn 3: "Draft a 1-page risk mitigation plan for the board covering
what we discussed."
Each turn builds on the previous analysis rather than asking Claude to do everything at once.
Extended Thinking
Extended thinking (available on Claude Opus 4.6 and Claude 3.7 Sonnet via the API) gives Claude a hidden reasoning scratchpad before generating the visible response.
import anthropic
client = anthropic.Anthropic()
response = client.messages.create(
model="claude-opus-4-6",
max_tokens=16000,
thinking={
"type": "enabled",
"budget_tokens": 10000 # How much internal thinking to allow
},
messages=[{
"role": "user",
"content": "Design the database schema for a multi-tenant SaaS application..."
}]
)
# The response includes both thinking blocks and text blocks
for block in response.content:
if block.type == "thinking":
print("Claude's reasoning:", block.thinking)
elif block.type == "text":
print("Response:", block.text)
When to use extended thinking:
- Multi-step math or logic problems
- Complex code architecture design
- Legal or contract analysis requiring precise reasoning
- Any task where you're getting inconsistent results from standard Claude
When extended thinking adds little:
- Simple factual questions
- Creative writing
- Basic summarization
- Tasks Claude already handles well consistently
Budget tokens: Higher budget = more thorough reasoning = higher cost and latency. Match to task complexity. For hard math problems, 15,000+ tokens. For moderately complex tasks, 5,000–10,000.
System Prompt Best Practices
The Minimal Effective System Prompt
A focused 200-token system prompt often outperforms a sprawling 2,000-token one. Every instruction you add is one more thing Claude has to track and potentially conflict with.
Start with the minimum:
<persona>
You are a senior software engineer specializing in Python and system design.
</persona>
<constraints>
- Write production-ready code, not tutorial snippets
- If a requirement is ambiguous, ask before assuming
- Don't add complexity beyond what was asked
</constraints>
Then add instructions only when the output consistently fails in a specific way.
The Claude Cookbook (Proven Patterns)
| Goal | Technique |
|---|---|
| Prevent AI-sounding output | "Write in a direct, professional tone without filler phrases" |
| Stop over-hedging | "Give a direct answer; I'll ask if I need qualifications" |
| Get specific code | "Write complete, working code — no # TODO or placeholder comments" |
| Improve research quality | "Distinguish between: established consensus, emerging evidence, and your inference" |
| Control length | "Be concise. If I want elaboration, I'll ask." |
| Prevent over-engineering | "Solve the problem stated, not a hypothetical harder version" |
Claude Model Versions
| Model | Context | Strengths | Best for |
|---|---|---|---|
| Claude Opus 4.6 | 200K tokens | Highest capability, extended thinking | Complex reasoning, architecture, analysis |
| Claude Sonnet 4.6 | 200K tokens | Best speed/quality balance | Most production tasks |
| Claude Haiku 4.5 | 200K tokens | Fastest, cheapest | High-volume, simple tasks |
| Claude 3.7 Sonnet | 200K tokens | Extended thinking, strong coding | Code generation, careful reasoning |
| Claude 3.5 Sonnet | 200K tokens | Cost-efficient | Production workloads |
Rule of thumb: Start with Claude Sonnet 4.6 for most tasks. Move up to Opus 4.6 with extended thinking for tasks where Sonnet gives inconsistent results. Use Haiku 4.5 for high-volume, low-complexity workloads where cost matters.
Common Mistakes With Claude
Being too polite in system prompts. "Claude, please try to be concise if you can" is weaker than "Be concise. Omit preamble and filler." Claude doesn't need diplomatic phrasing — it needs clear instructions.
Not explaining constraints. If you tell Claude not to do something, say why. It helps Claude apply the constraint to edge cases you didn't anticipate.
Fighting Claude's safety defaults with tricks. This wastes time and often produces worse results. Instead, give Claude legitimate context: who you are, what you're building, why you need a specific type of response. Honest instructions work better than jailbreak attempts.
Using one massive prompt when multiple turns would work better. For complex analysis tasks, a conversation often produces better results than a single 10,000-token prompt.
Not testing system prompt length. If you have a long system prompt, try halving it and see if the behavior changes meaningfully. Often, half the instructions do 95% of the work.