Opus 4.6 responds differently to prompts than Sonnet or Haiku. Its deeper reasoning capabilities mean it benefits from different techniques — and some patterns that work well with smaller models actually reduce quality with Opus.
The Opus Prompting Mindset
Opus 4.6 is like a senior expert. You do not need to micromanage it:
❌ Bad: "Think step by step. First, identify the variables.
Then, trace each variable through the code.
Then, check for null references..."
✅ Good: "Find all potential null reference bugs in this code.
Explain the root cause and fix for each."
The model’s adaptive thinking handles the reasoning steps internally. Over-specifying the process actually constrains the model and reduces output quality.
System Prompts That Work
A well-crafted system prompt sets the entire conversation on the right trajectory:
system_prompt = """You are a principal software architect with 20 years of
experience in distributed systems. You review code with the mindset of
someone who has debugged production outages at 3 AM.
When analyzing code:
- Prioritize correctness over style
- Flag race conditions, resource leaks, and error handling gaps
- If you find nothing critical, say so — do not invent issues
- Provide concrete fixes, not abstract advice
When uncertain, state your confidence level explicitly."""
System Prompt Principles for Opus 4.6
- Define expertise, not process. Tell the model who it is, not how to think.
- Set quality standards. Opus will meet them. Sonnet might not.
- Include anti-patterns. “Do not invent issues” prevents hallucinated problems.
- Request calibrated confidence. Opus 4.6 has better calibration than previous models.
Structured Output Patterns
Opus 4.6 introduces new structured output requirements. Use them:
response = client.messages.create(
model="claude-opus-4-6-20260205",
max_tokens=4096,
system="Respond with valid JSON only. No markdown wrapping.",
messages=[{
"role": "user",
"content": """Analyze this function for bugs. Return JSON:
{
"bugs": [{"line": int, "severity": "critical|high|medium|low",
"description": str, "fix": str}],
"overall_quality": "good|acceptable|poor",
"confidence": float // 0.0-1.0
}
```python
def transfer(from_account, to_account, amount):
if from_account.balance >= amount:
from_account.balance -= amount
to_account.balance += amount
return True
return False
```"""
}]
)
Multi-Turn Conversation Patterns
Opus 4.6 excels at multi-turn conversations where each message builds on previous context:
messages = [
{"role": "user", "content": "Here is our database schema: [schema]. "
"Identify the three most critical performance bottlenecks."},
]
# First response identifies bottlenecks
messages.append({"role": "assistant", "content": response.content[0].text})
messages.append({"role": "user", "content": "For bottleneck #1, design a "
"migration plan that can be executed with zero downtime. "
"Include rollback steps."})
# Second response provides migration plan with full schema context
What Not to Do
Patterns that reduce Opus 4.6 quality:
| Anti-Pattern | Why It Hurts | Better Approach |
|---|---|---|
| Chain-of-thought prompting | Constrains adaptive thinking | State the goal, let the model reason |
| Few-shot examples for simple tasks | Wastes context on patterns Opus already knows | Use few-shot only for novel output formats |
| ”Be concise” for analysis tasks | Cuts off valuable reasoning | Specify output format instead |
| Role-playing fictional characters | Misaligns the model’s expertise | Use professional role definitions |
| Repeating instructions | Wastes tokens, confuses priority | State instructions once, clearly |
Temperature and Top-P for Opus
# Factual analysis — deterministic
response = client.messages.create(
model="claude-opus-4-6-20260205",
max_tokens=4096,
temperature=0.0, # Most deterministic
messages=[...]
)
# Creative writing — varied
response = client.messages.create(
model="claude-opus-4-6-20260205",
max_tokens=4096,
temperature=0.7, # More creative variation
messages=[...]
)
General guidance:
- Code analysis, debugging, security review:
temperature=0.0 - General technical work:
temperature=0.2–0.3 - Creative content, brainstorming:
temperature=0.6–0.8 - Never use
temperature=1.0with Opus — the model is already creative enough
You now have the prompting foundation. In the next module, we dive deep into Opus 4.6’s architecture and how to select the right model for every task.