Prompt Patterns
Battle-tested prompt templates for common tasks. Learn patterns that professionals reuse across projects.
Don’t Reinvent the Wheel
In the previous lesson, we explored chain-of-thought prompting. Now let’s build on that foundation. Professional prompt engineers don’t write every prompt from scratch. They have a library of patterns—proven structures that work reliably for common tasks.
This lesson gives you that library.
Each pattern is a template you can adapt. Think of them like design patterns in software: named solutions to recurring problems.
Pattern 1: Structured Output
Problem: You need AI output in a specific format—JSON, CSV, table, or specific fields.
Pattern:
[Task description]
Respond in this exact format:
[FIELD 1]: [description]
[FIELD 2]: [description]
[FIELD 3]: [description]
Example:
[Complete example showing the format]
Now process: [your input]
Example:
Extract contact information from this email signature.
Respond in this exact format:
NAME: [full name]
TITLE: [job title, or "Not specified"]
COMPANY: [company name, or "Not specified"]
EMAIL: [email address]
PHONE: [phone number, or "Not specified"]
Example:
NAME: John Smith
TITLE: Senior Developer
COMPANY: Acme Corp
EMAIL: john@acme.com
PHONE: 555-123-4567
Now extract from:
"""
Best regards,
Sarah Chen | Product Manager
TechStart Inc.
sarah.chen@techstart.io
Mobile: (415) 555-8901
"""
Why it works: The combination of format specification plus example leaves zero ambiguity about structure.
Pattern 2: Persona + Task
Problem: You need consistent tone, expertise, and approach across multiple requests.
Pattern:
You are [detailed persona description].
Your style:
- [trait 1]
- [trait 2]
- [trait 3]
---
[Specific task]
Example:
You are a senior product manager at a B2B SaaS company with 10 years of experience. You've shipped 20+ features from conception to launch.
Your style:
- You think in terms of user problems, not feature requests
- You always consider the "build vs buy vs partner" question
- You communicate concisely—bullet points over paragraphs
- You flag assumptions explicitly
---
Review this feature request and provide your assessment:
"We need to add a dashboard showing user activity metrics."
Why it works: The persona primes all subsequent interactions with consistent behavior.
Pattern 3: Step-by-Step Analysis
Problem: Complex task requires organized thinking through multiple dimensions.
Pattern:
[Describe the situation or input]
Analyze this by thinking through:
1. [DIMENSION 1]: [what to consider]
2. [DIMENSION 2]: [what to consider]
3. [DIMENSION 3]: [what to consider]
4. [DIMENSION 4]: [what to consider]
Then provide your [conclusion/recommendation/decision].
Example:
A startup is deciding whether to raise venture funding or bootstrap.
Analyze by thinking through:
1. MARKET TIMING: Is this a winner-take-all market that rewards speed?
2. CAPITAL INTENSITY: How much funding is truly needed to reach profitability?
3. FOUNDER GOALS: What does success look like for the founders personally?
4. COMPETITIVE DYNAMICS: What are competitors doing and how funded are they?
Then provide your recommendation with key considerations.
Why it works: Forces systematic thinking instead of jumping to conclusions.
Pattern 4: Devil’s Advocate
Problem: You want to stress-test an idea before committing to it.
Pattern:
I'm considering [idea/decision/plan].
Play devil's advocate. Your job is to:
- Find the weakest points in this idea
- Identify what could go wrong
- Surface assumptions that might be wrong
- Point out what I might be missing
Don't be polite—be thorough. I need to know the real risks.
[Details of the idea]
Example:
I'm considering quitting my job to start a freelance consulting business.
Play devil's advocate. Your job is to:
- Find the weakest points in this plan
- Identify what could go wrong
- Surface assumptions that might be wrong
- Point out what I might be missing
Don't be polite—be thorough. I need to know the real risks.
My plan:
- I have 5 years of marketing experience
- I have $30,000 savings (6 months expenses)
- I have 3 former colleagues who said they'd hire me
- My specialty is B2B content strategy
Why it works: Explicitly asking for criticism counteracts AI’s tendency to be agreeable.
Pattern 5: Iterative Refinement
Problem: You need to improve something through multiple rounds of feedback.
Quick check: Before moving on, can you recall the key concept we just covered? Try to explain it in your own words before continuing.
Pattern:
Here's my [draft/version/attempt]:
[Content]
---
Review this and provide:
1. What's working well (keep this)
2. What needs improvement (specific issues)
3. Concrete suggestions for each issue
Then write an improved version incorporating your suggestions.
Example:
Here's my product launch email:
Subject: New Feature Alert!
Hi there,
We're excited to announce our new dashboard feature. It shows activity metrics. You can see daily, weekly, and monthly views. Click here to try it.
Thanks,
The Team
---
Review this and provide:
1. What's working well
2. What needs improvement
3. Concrete suggestions for each issue
Then write an improved version incorporating your suggestions.
Why it works: Structured feedback plus immediate revision creates a tight improvement loop.
Pattern 6: Format Transformation
Problem: You need to convert content from one format to another while preserving meaning.
Pattern:
Transform the following [SOURCE FORMAT] into [TARGET FORMAT].
Preserve:
- [what to keep]
- [what to keep]
Adjust:
- [how to adapt]
- [how to adapt]
Source:
[content]
Target:
Example:
Transform the following meeting notes into action items.
Preserve:
- Every commitment or decision made
- Who is responsible for each item
- Any mentioned deadlines
Adjust:
- Remove discussion/context (just the actions)
- Format as a checklist
- Add inferred deadlines if obvious from context
Source:
"""
Discussed Q4 roadmap. Mike will finalize the prioritization by Friday. Sarah mentioned the design mockups are almost done—she'll share them next week. We agreed to push the API changes to January since Tom's team is overloaded. Need to update stakeholders. Janet will send the email today.
"""
Target:
Why it works: Explicit “preserve” and “adjust” instructions prevent information loss while enabling format change.
Pattern 7: Comparison Analysis
Problem: You need to evaluate multiple options objectively.
Pattern:
Compare [OPTION A] vs [OPTION B] for [CONTEXT/USE CASE].
Evaluate across these criteria:
- [Criterion 1]
- [Criterion 2]
- [Criterion 3]
- [Criterion 4]
For each criterion:
1. Rate each option (Better/Same/Worse)
2. Explain why briefly
Then provide an overall recommendation based on [stated priorities].
Example:
Compare PostgreSQL vs MongoDB for a new e-commerce application.
Evaluate across these criteria:
- Data model flexibility
- Query complexity support
- Scaling approach
- Ecosystem and tooling
- Team learning curve (team knows SQL but not NoSQL)
For each criterion:
1. Rate each option
2. Explain why briefly
Then provide an overall recommendation, prioritizing reliability and team productivity.
Why it works: Structured comparison prevents cherry-picking and ensures consistent evaluation.
Pattern 8: Constrained Generation
Problem: You need output that follows specific constraints.
Pattern:
Generate [what you need].
Constraints:
- [Hard constraint 1]
- [Hard constraint 2]
- [Hard constraint 3]
Preferences:
- [Soft preference 1]
- [Soft preference 2]
Avoid:
- [What not to do]
- [What not to do]
Example:
Generate 5 taglines for a sustainable coffee brand called "Groundwork."
Constraints:
- Maximum 8 words each
- Must relate to either sustainability or quality
- No clichés like "wake up" or "fuel your day"
Preferences:
- Clever wordplay is good
- References to "ground" or "roots" encouraged
- Tone: confident but not preachy
Avoid:
- Environmental guilt-tripping
- Generic coffee descriptors ("rich," "bold," "smooth")
- Exclamation points
Why it works: Clear boundaries prevent generic outputs and guide toward specificity.
Building Your Pattern Library
Start by noticing patterns in your work:
- What tasks do you repeat? Those need patterns.
- What prompts work well? Save them as templates.
- What outputs does your team reuse? Standardize the prompts.
Keep a document (or folder) with your proven patterns. Adapt them, don’t rewrite from scratch.
Key Takeaways
- Prompt patterns are reusable templates for common tasks
- Key patterns: Structured Output, Persona + Task, Step-by-Step Analysis, Devil’s Advocate, Iterative Refinement, Format Transformation, Comparison, Constrained Generation
- Build your own library from prompts that work well
- Adapt patterns to your context rather than writing from scratch
Next: what to do when prompts don’t work. We’ll cover systematic debugging techniques.
Up next: In the next lesson, we’ll dive into Debugging Prompts.
Knowledge Check
Complete the quiz above first
Lesson completed!