Every Claude user has had the experience of asking the same question twice — once getting something mediocre, once getting something excellent — and not being entirely sure what changed. The answer, almost always, is the prompt structure.
Prompt engineering is not a mystical art. It is a learnable set of techniques that consistently produce better results by giving the model more of what it needs to perform well. For Claude specifically, several techniques work distinctively well — and a few common prompting habits that work reasonably on other models produce worse results on Claude.
This masterclass covers the complete set of prompting techniques that produce the best results from Claude: the PACT framework in depth, role assignment, chain-of-thought reasoning, few-shot learning, XML structure for complex prompts, negative constraints, prompt chaining, and the specific patterns that are unique to Claude’s training and personality.
By the end of this guide, you will not just know a list of techniques — you will understand why each technique works, which tasks it applies to, and how to combine them for different use cases.
🔗 This is Post #10 in the Claude Unlocked series. The techniques here build on the PACT framework introduced in Claude AI Masterclass. They are directly applicable to Claude Projects instructions, API system prompts, and everyday claude.ai use. For writing-specific prompting, see Claude for Writing. For coding-specific techniques, see Claude for Coding.
Why Claude Responds to Prompts Differently
Before techniques, understanding what makes Claude respond the way it does explains why certain prompting approaches work better on Claude than on other models.
Claude is trained toward honest uncertainty: Claude is specifically trained to express uncertainty rather than project false confidence. This means vague prompts sometimes get more hedged responses than you want — not because Claude cannot answer, but because it genuinely is not sure what you are asking for. Precise prompts eliminate the uncertainty and unlock more confident, specific output.
Claude responds to reasoning context: Claude is trained with Constitutional AI, which means it reasons about its responses. When you provide reasoning context — why you need something, for whom, what the stakes are — Claude incorporates that reasoning into how it responds. “Write a persuasive email” gets a different (and generally weaker) result than “Write a persuasive email for a time-pressed investor who is skeptical of our market size claim.”
Claude genuinely disagrees when it thinks you are wrong: Many AI models are trained to agree and then carefully caveat. Claude is more likely to directly challenge a premise it thinks is flawed. This is valuable in analysis and research — and it means prompts that assert questionable premises may get pushback rather than compliance. Working with this tendency rather than against it produces better outputs.
Claude has strong aesthetic preferences: Particularly in writing, Claude has developed something like taste. It prefers specific over vague, shown over told, earned over asserted. Prompts that invoke these preferences explicitly (“be specific, not general,” “show don’t tell”) activate them more reliably.
The PACT Framework: Deep Dive
The PACT framework (Purpose, Audience, Constraints, Tone) from Claude AI Masterclass is the foundation of effective prompting. Here is the depth version — what each element should actually contain.
P — Purpose: The Precision Test
The Purpose element should be specific enough to pass this test: could someone else read your Purpose statement and produce the same output you want?
Too vague:
Purpose: Write a blog post about productivity.
Passes the test:
Purpose: Write a blog post arguing that most productivity
advice fails because it optimizes for task completion
rather than decision quality — specifically for marketing
managers who already follow standard productivity advice
and are frustrated that it hasn't moved the needle.
The difference: the second specifies the argument (not just the topic), the audience (not just “people interested in productivity”), and the problem being addressed (a specific frustration, not a general subject).
A — Audience: Three Dimensions
Effective audience specification covers three dimensions:
1. Who they are: Role, background, relationship to you 2. What they already know: Technical level, familiarity with the topic 3. What they need from this: Decision they are making, problem they are solving, question they want answered
Audience:
- Who: Senior operations managers at mid-size manufacturing companies
- What they know: Familiar with standard process improvement concepts;
skeptical of technology solutions after previous failed implementations
- What they need: To understand whether our approach is different enough
from what they've tried before to be worth a pilot conversation
C — Constraints: The Freedom by Elimination
Constraints are underused. Most people state what they want; few state what they do not want. For Claude, constraints are particularly valuable because they eliminate the interpretive ambiguity that produces hedged or generic responses.
Format constraints:
- Length: 600–800 words, not more
- Structure: No headers or bullet points — flowing prose only
- Do not include: An introduction explaining what the piece will cover
- Do not include: A conclusion that summarizes what the piece covered
Content constraints:
- Do not mention specific dollar figures — we have not finalized pricing
- Do not make claims about competitors by name
- Do not suggest the reader "reach out" — we do not want that CTA
- Do not write in the second person ("you")
Reasoning constraints:
- Do not qualify every statement — if you are uncertain about a claim,
note it once and move on, do not hedge throughout
- Do not present counterarguments unless I ask — this is advocacy,
not a balanced essay
T — Tone: The Three-Axis Definition
Tone is most useful when specified on three axes:
Formality axis: Casual → Conversational → Professional → Formal → Academic Register axis: Personal/intimate → Collegial → Authoritative → Institutional Energy axis: Subdued → Measured → Direct → Energized → Urgent
Tone: Conversational professional (not stiff corporate, not casual).
Authoritative register — I know this topic well and am writing from
genuine expertise. Measured energy — this is not a sales document,
it is an explanation.
Role Assignment: The Expert Persona Technique
Asking Claude to adopt a specific expert persona before addressing a task activates domain-specific knowledge and judgment more reliably than asking the same question without a role.
How Role Assignment Works
When you tell Claude “Act as a senior UX designer reviewing this interface,” Claude applies UX-specific frameworks, evaluation criteria, and vocabulary to the task. Without this framing, the same review request might produce more generic feedback.
Effective Role Assignment Patterns
The specific expert:
Act as a senior product manager with 10 years of experience
at B2B SaaS companies who specializes in enterprise sales cycles.
You understand the difference between what sales teams say
they need and what actually closes deals.
The character in context:
You are a skeptical but fair senior editor at a financial
publication. You have seen every type of company pitch for
coverage. Your job is to identify what story is genuinely
worth covering for sophisticated financial readers.
The adversarial role:
Act as the most informed critic of this argument.
Your job is not to be destructive but to find every
legitimate weakness — the questionable assumptions,
thin evidence, and logical gaps that a rigorous
peer reviewer would catch.
When NOT to Use Role Assignment
Role assignment helps for tasks requiring domain expertise or a specific evaluative perspective. It is not necessary for:
- Simple factual questions
- Direct tasks with clear outputs (translation, formatting, extraction)
- Creative work where you want Claude’s own voice
- Tasks where the “role” would be redundant with the task description
Chain-of-Thought Prompting
Chain-of-thought prompting instructs Claude to reason explicitly before concluding. This dramatically improves accuracy on analytical, mathematical, and multi-step logical tasks.
The Three Chain-of-Thought Triggers
Explicit instruction:
Think through this step by step before giving me your answer.
Show your reasoning as you work.
Question-based:
Before answering, work through these questions:
1. What are the relevant factors here?
2. What does each factor suggest?
3. Are there any tensions between factors?
4. Given that analysis, what is the most defensible answer?
Then give me your conclusion.
Structured reasoning request:
For this problem:
- First: State the key assumptions
- Then: Identify the relevant considerations
- Then: Work through the implications of each
- Finally: State your conclusion with the confidence level it warrants
Chain-of-Thought vs. Extended Thinking
Chain-of-thought prompting produces visible reasoning in the main response. Extended Thinking produces a separate reasoning block that runs before the response. Use chain-of-thought for tasks where visible reasoning in the response is itself valuable (teaching, transparent analysis). Use Extended Thinking when you want the reasoning depth without it cluttering the final output.
Few-Shot Learning: Teaching by Example
Few-shot prompting shows Claude examples of the output format, style, or approach you want — rather than describing it. Often more effective than description alone.
The Few-Shot Structure
I want you to [task]. Here are examples of what I want:
INPUT: [Example input 1]
OUTPUT: [Desired output 1]
INPUT: [Example input 2]
OUTPUT: [Desired output 2]
INPUT: [Example input 3]
OUTPUT: [Desired output 3]
Now do the same for:
INPUT: [Your actual input]
OUTPUT:
Few-Shot for Style Matching
I want to write marketing copy in this style. Here are three examples:
EXAMPLE 1:
"Your customers remember how you made them feel, not what you said.
Stop writing for search engines. Start writing for humans."
EXAMPLE 2:
"Most landing pages answer the wrong question.
They answer 'What is this product?'
They should answer 'Why does this matter to me?'"
EXAMPLE 3:
"Good copy does one thing: removes doubt.
Every word either builds trust or creates confusion.
Which does yours do?"
Now write copy in this style for: [your product/service/message]
Few-Shot for Classification
Classify customer feedback into one of these categories:
Feature Request / Bug Report / Praise / Complaint / Question
FEEDBACK: "The export button is missing from the new dashboard"
CATEGORY: Bug Report
FEEDBACK: "Would love to see a dark mode option"
CATEGORY: Feature Request
FEEDBACK: "This saved me 3 hours last week, thank you!"
CATEGORY: Praise
Now classify these:
FEEDBACK: "I can't figure out how to invite team members"
CATEGORY:
FEEDBACK: "The loading time has gotten much worse since the update"
CATEGORY:
XML Structure for Complex Prompts
For prompts with multiple components — instructions, context, examples, constraints, input data — XML-style tags dramatically improve clarity and reduce ambiguity. Claude responds particularly well to structured prompts because it can clearly identify each component.
The XML Prompt Pattern
<task>
Analyze the following customer feedback and produce a structured report.
</task>
<context>
This feedback comes from our enterprise customers after the Q1 product
update. We need to prioritize our Q2 roadmap based on this feedback.
The audience for this report is the product leadership team.
</context>
<output_format>
Produce a report with these sections:
1. Executive Summary (3-5 bullet points)
2. Top Feature Requests (ranked by frequency, with example quotes)
3. Critical Issues (bugs or problems affecting multiple users)
4. Sentiment Overview (overall tone, key themes)
5. Recommended Q2 Priorities (3 items, with justification)
</output_format>
<constraints>
- Do not include individual user names or identifying information
- Flag any feedback that suggests a churn risk
- Rate confidence in each recommendation (High/Medium/Low)
</constraints>
<feedback_data>
[Paste your customer feedback here]
</feedback_data>
When to Use XML Structure
XML structure pays off when:
- The prompt has 4+ distinct components (task, context, examples, constraints, data)
- You are building a prompt template that will be reused
- You are using the API with system prompts that need clear sections
- The prompt is over 200 words and components need clear separation
For short, conversational prompts, XML is unnecessary overhead.
Negative Prompting: Defining by Exclusion
Telling Claude what NOT to do is often more effective than telling it only what to do. Negative constraints eliminate the interpretive choices that produce generic or unwanted output.
Effective Negative Constraints by Category
Format negatives:
Do not use bullet points.
Do not use headers.
Do not include a summary paragraph at the end.
Do not number your recommendations.
Content negatives:
Do not mention competitors by name.
Do not include caveats about limitations — I am aware of them.
Do not suggest professional consultation — this is for internal use.
Do not provide background I already gave you — use it, don't repeat it.
Tone negatives:
Do not use hedge words like "perhaps," "might," or "could" unless
genuinely uncertain about a specific fact.
Do not start sentences with "It's worth noting that..."
Do not use exclamation points.
Do not write anything I wouldn't want to read aloud in a board meeting.
Process negatives:
Do not ask me clarifying questions — make your best interpretation
and proceed.
Do not explain what you are about to do — just do it.
Do not offer multiple options unless I ask for them.
The Negative Prompt Audit
For any prompt that consistently produces outputs with a specific problem, identify the pattern and add a negative constraint for it:
If Claude keeps adding “it’s important to note that” → add “do not use the phrase ‘it’s important to note’”
If Claude keeps producing bullet points when you want prose → add “write in flowing prose, no bullet points”
If Claude keeps hedging recommendations → add “make recommendations directly — do not qualify every suggestion with uncertainty language”
Prompt Chaining: Building Complex Outputs Step by Step
For tasks too complex for a single prompt, prompt chaining breaks the work into stages where each stage’s output becomes the next stage’s input.
The Prompt Chain Structure
Stage 1: Generate the raw material
↓
Stage 2: Organize and structure
↓
Stage 3: Refine and polish
↓
Stage 4: Quality check and verify
Example: Research Report Chain
Stage 1 — Information extraction:
From these three research papers, extract:
- All statistics with their sources
- All key arguments made by each author
- All disagreements between authors
- All limitations acknowledged
[Upload papers]
Stage 2 — Structure:
Based on the extracted information, propose a structure for
a 3,000-word research report on [topic] for [audience].
Show me the outline with section titles and a one-sentence
description of what each section covers.
[Paste Stage 1 output]
Stage 3 — Draft:
Draft Section 2 of the report following the approved outline.
Use the extracted information from the research papers.
Do not invent facts — only use what is in the extraction.
[Paste Stage 1 output + approved Stage 2 outline]
Stage 4 — Review:
Review this drafted section:
- Does every factual claim trace to the source material?
- Are there any claims that are stronger than the evidence supports?
- Is the argument coherent from start to finish?
[Paste Stage 3 draft]
When Prompt Chaining Is Most Valuable
- Complex research synthesis with many sources
- Long-form content where different sections need different approaches
- Quality-critical work where verification steps matter
- Multi-perspective analysis where each perspective is developed separately before synthesis
Claude-Specific Prompting Patterns
These patterns work specifically well with Claude due to its training and characteristics.
The Honest Assessment Request
Because Claude is trained toward honesty, explicitly requesting honest evaluation activates this more fully:
I want your honest assessment of this, not a diplomatic one.
If something is wrong, say it's wrong. If the argument is weak,
say it's weak. Do not find ways to affirm something you think
is mistaken.
Claude responds to this instruction meaningfully — it produces more direct, less hedged feedback than a general “evaluate this” request.
The Uncertainty Specification
Claude’s epistemic care means you can ask it to explicitly flag confidence levels:
For each major claim in your analysis, indicate your confidence:
[High] — well-supported by evidence
[Medium] — plausible but could be challenged
[Low] — genuinely uncertain, I'm reasoning from limited information
This helps me know where to seek additional validation.
The Steelman Before Critique
Claude produces better analysis when asked to present the strongest version of a position before critiquing it:
Before critiquing this argument, present the strongest possible
version of it — the steelman. Then critique the steelman,
not a weaker version of the original argument.
The “What Am I Missing?” Prompt
One of the most valuable Claude-specific prompts:
I've thought carefully about this problem and here is my analysis:
[Your analysis]
What am I missing? What considerations have I not accounted for?
What would change my conclusion if I knew it?
Claude excels at this because it is not constrained by your framing — it can see around the edges of your existing thinking.
The Assumption Audit
I'm about to [make a decision / write a piece / implement a plan].
Here is my reasoning: [your reasoning]
What assumptions is this reasoning making?
Which assumptions are I taking for granted without having verified?
Which assumption, if wrong, would most change my conclusion?
The Prompt Anti-Patterns to Avoid
Anti-Pattern 1: The Vague Compliment Opening
Starting prompts with “You are an incredibly knowledgeable and helpful AI assistant…” does nothing — Claude knows what it is. These phrases consume tokens without providing useful instruction.
Anti-Pattern 2: Over-Specifying the Format for Complex Content
Rigidly pre-specifying every structural element of a complex piece can constrain Claude’s ability to find the best structure for the content. For complex content, specify the output requirements rather than the precise structure.
Anti-Pattern 3: Asking for Certainty Claude Cannot Provide
“Give me the definitive answer to whether X is better than Y” for a genuinely contested question just produces false confidence. Asking Claude to “present the considerations for and against” or “reason through this with explicit uncertainty markers” produces more reliable, useful output.
Anti-Pattern 4: Single-Turn Prompts for Complex Tasks
Complex tasks almost always benefit from multi-turn conversation rather than single elaborate prompts. Start with the core requirement, evaluate the output, and refine iteratively. Over-elaborate first prompts often produce over-complex responses.
Anti-Pattern 5: Demanding Agreement
Because Claude is trained to push back on positions it thinks are wrong, prompts that demand agreement (“Confirm that this is the right approach”) can produce either sycophantic agreement (if Claude detects the demand) or direct disagreement (if Claude thinks you are wrong). Better: “Evaluate this approach honestly” — you will get more useful output.
Building Your Personal Prompt Library
Every effective prompt you develop is a reusable asset. The investment in writing a strong prompt template pays back every time you use it.
Recommended structure for a prompt library:
Keep a Google Doc or Notion page with sections for each use case. For each entry:
- Name: What task this handles
- Template: The prompt with [BRACKETS] for customization
- When to use: Specific conditions or task types
- Model recommendation: Haiku / Sonnet / Opus
- Notes: What works, what to watch for
Your immediate starter list (based on this guide):
- PACT writing brief template
- Document analysis sequence (4-step)
- Code review brief
- Difficult message template
- Decision analysis chain-of-thought prompt
- Few-shot classification template
- Style calibration by example prompt
Conclusion
Prompt engineering is not about finding magic words. It is about giving Claude the information it needs to perform well — clearly enough that its interpretive ambiguity is reduced, specifically enough that its output matches your actual goal, and with enough context that its reasoning starts from the right place.
The techniques in this guide — PACT precision, role assignment, chain-of-thought, few-shot examples, XML structure, negative constraints, and prompt chaining — each address a specific failure mode. Learn to recognize which failure mode is affecting your current outputs, and apply the technique that addresses it.
The deeper skill is building your prompt library: the specific, tested, refined templates for the tasks you do most frequently. A prompt library built over three months of deliberate use is one of the highest-leverage professional assets you can develop.
Your next step: Take a task you use Claude for regularly — something that produces inconsistent results or requires a lot of editing after the fact. Write a PACT brief for it. Add the negative constraints that eliminate the things you keep removing. Test it three times and refine. That becomes your first prompt library entry.
📚 Continue the Series:
- ← Previous The Claude API for Non-Developers
- Next → Claude Computer Use: Letting Claude Browse, Click, and Operate Your Computer
- Apply to Projects Claude Projects: Your Personal AI Memory System
- Apply to Writing Claude for Writing
- Apply to Coding Claude for Coding
Last updated: April 2026. Prompting techniques are model-specific and update as Anthropic releases new model versions. Test these techniques with your current Claude model version and adjust based on observed behavior.
⚠️ Prompt engineering improves consistency and quality but does not guarantee specific outputs. Always review AI-generated content for accuracy, appropriate tone, and alignment with your actual goals before use.