Master These 7 Prompt Patterns to Solve Any AI Task

By LearnAI TeamApril 14, 20259 min readPrompt Engineering

The difference between mediocre and exceptional AI outputs rarely comes down to the AI model itself—it's about using the right prompt pattern for the task at hand. These seven fundamental prompt patterns will help you solve virtually any problem using AI tools, from content creation to complex problem-solving.

Think of these patterns as mental models or frameworks—once you understand them, you'll have a systematic approach to crafting effective prompts for any situation. We've distilled years of prompt engineering experience into these essential patterns that work across all major AI platforms including ChatGPT, Claude, and Gemini.

Pattern 1: The Persona Pattern

What It Is

The Persona Pattern involves asking the AI to adopt a specific role or identity with expertise relevant to your task. This harnesses the model's training on different writing styles, knowledge domains, and perspectives.

When To Use It

  • When you need specialized expertise or perspective
  • To get advice from a particular professional viewpoint
  • When you want a specific communication style
  • To simulate how a particular type of professional would approach a problem

Basic Template

Act as [specific role/persona] with expertise in [relevant domain]. [Your request here].

Example

Weak prompt: "Write about climate change."

Strong prompt with persona pattern: "Act as a climate scientist with expertise in communicating complex topics to the general public. Explain the current scientific consensus on climate change, focusing on the most important evidence and addressing common misconceptions. Use analogies and visualizations that would help a non-specialist understand the core concepts."

Why It Works

The persona pattern works because AI models have been trained on content from many different professions and writing styles. By specifying a persona, you activate associations with particular knowledge domains, terminology, and communication approaches. This helps the AI filter its vast knowledge base to focus on what would be most relevant to that specific type of expert.

Pro Tips

  • Be specific about the persona's expertise (e.g., "Act as a developmental psychologist specializing in early childhood education" rather than just "Act as a psychologist")
  • You can combine multiple personas for unique perspectives (e.g., "Act as both a financial analyst and a historian")
  • Include specific characteristics about the persona's communication style if relevant (e.g., "You're known for your clear, jargon-free explanations")

Pattern 2: The Task Decomposition Pattern

What It Is

The Task Decomposition Pattern involves breaking down complex problems into smaller, manageable steps that can be addressed sequentially. This guides the AI through a logical thought process rather than attempting to solve everything at once.

When To Use It

  • For complex problems that benefit from step-by-step thinking
  • When you want to see the AI's reasoning process
  • For tasks requiring multiple stages of analysis or creation
  • When you want more control over how the AI approaches the problem

Basic Template

I need to [overall task]. Let's break this down into steps:
1. First, [first subtask]
2. Then, [second subtask]
3. Next, [third subtask]
...
For each step, provide your reasoning and output before moving to the next step.

Example

Weak prompt: "Help me write a business plan for my bakery startup."

Strong prompt with task decomposition pattern: "I need help creating a business plan for my artisanal bakery startup. Let's break this down into steps:

  1. First, help me define my bakery's unique value proposition and target market based on these initial ideas: [your ideas]
  2. Then, outline the key products and services with potential pricing strategy
  3. Next, help me think through startup costs and monthly operating expenses
  4. After that, develop a marketing strategy focused on local community engagement
  5. Finally, identify key metrics for measuring success in the first year

For each step, provide your reasoning and recommendations based on bakery industry best practices before moving to the next step."

Why It Works

Complex problems often overwhelm even advanced AI models when approached all at once. By breaking down the task, you allow the model to focus deeply on each component, leading to more thorough and accurate results. It also creates a logical flow that mimics human problem-solving.

Pro Tips

  • Start with an outline of steps and let the AI suggest modifications to your approach
  • For truly complex problems, nest decompositions (break main steps into sub-steps)
  • Ask the AI to explain its reasoning at each step to ensure the logic is sound
  • Be explicit about dependencies between steps ("Use the outcome from step 2 to inform your approach to step 3")

Pattern 3: The Critique-Revise Pattern

What It Is

The Critique-Revise Pattern involves asking the AI to first generate content, then critique its own work against specific criteria, and finally revise it based on that critique. This creates an iterative improvement cycle within a single prompt.

When To Use It

  • When quality and refinement are important
  • For creative or analytical outputs that benefit from revision
  • When you want to see the AI's thought process evolve
  • To catch potential issues before you review the content

Basic Template

1. [Task description]
2. After generating your initial response, critique it based on these criteria: [list specific criteria]
3. Based on your critique, provide an improved version.

Example

Weak prompt: "Write a sales email for my new productivity software."

Strong prompt with critique-revise pattern: "I need a sales email for my new productivity software that helps remote teams coordinate tasks.

  1. First, write an initial draft of the email targeting small business owners.
  2. After writing the draft, critique it based on these criteria: clarity of value proposition, emotional appeal, use of social proof, strength of call-to-action, and avoidance of spam triggers.
  3. Based on your critique, provide an improved version that addresses the weaknesses you identified.

The final email should be concise, compelling, and focused on solving real problems that small business owners face with remote team coordination."

Why It Works

This pattern leverages the AI's ability to evaluate content against criteria, essentially creating a self-review process. By making the model critique its own work, you help it identify blindspots and weaknesses in its initial output. The revision then specifically targets those issues, resulting in significantly improved quality.

Pro Tips

  • Be specific about the criteria for critique (e.g., "evaluate the clarity, persuasiveness, and factual accuracy" rather than just "critique this")
  • You can specify the critique format (e.g., "rate each paragraph on a scale of 1-5 for clarity and engagement")
  • For complex outputs, you can request multiple rounds of revision focused on different aspects
  • Ask the AI to explain what changed in the revision and why, which helps you learn what improvements were made

Pattern 4: The Template Pattern

What It Is

The Template Pattern involves providing a specific structure or format for the AI to follow in its response. This ensures consistency, completeness, and alignment with your exact output requirements.

When To Use It

  • When you need a specific output format or structure
  • For creating standardized documents or responses
  • When integrating AI outputs with other systems or workflows
  • When you want to ensure all required elements are included

Basic Template

[Task description]

Please format your response exactly as follows:

[Section Title 1]: [Instructions for this section]
[Section Title 2]: [Instructions for this section]
...

Additional formatting instructions: [Any special formatting requirements]

Example

Weak prompt: "Create a product description for my new yoga mat."

Strong prompt with template pattern: "Create a compelling product description for my eco-friendly yoga mat made from natural rubber and recycled materials.

Please format your response exactly as follows:

HEADLINE: [A catchy 5-7 word headline that emphasizes eco-friendly benefits]

SUMMARY: [2-3 sentence overview highlighting key features and benefits]

KEY FEATURES:
- [Feature 1]: [Benefit it provides]
- [Feature 2]: [Benefit it provides]
- [Feature 3]: [Benefit it provides]
- [Feature 4]: [Benefit it provides]

SPECIFICATIONS:
• Material: Natural rubber and recycled microfiber
• Dimensions: 72" x 24" x 5mm
• Weight: 4.5 lbs
• Colors Available: Sage Green, Ocean Blue, Sunset Orange

WHY YOU'LL LOVE IT: [3-4 bullet points about the emotional and practical benefits]

IDEAL FOR: [List 3 types of yoga practitioners this mat is perfect for]

SUSTAINABILITY COMMITMENT: [2 sentences about our environmental practices]
          

The description should use sensory language and focus on both the practical benefits and the eco-conscious aspects of the product."

Why It Works

Templates provide clear structure and expectations for the AI, eliminating ambiguity about what should be included and how it should be formatted. This pattern is especially powerful because it combines content guidance with format requirements, ensuring you get exactly what you need without having to request revisions.

Pro Tips

  • Include examples of the type of content you want in each section if possible
  • For complex templates, consider numbering sections to help the AI keep track
  • You can include conditional elements (e.g., "If product has technical specifications, include them in this format:")
  • Specify character or word count limits for sections that need to be concise
  • For data-oriented outputs, provide clear format specifications (e.g., "List items should be comma-separated")

Pattern 5: The Comparative Analysis Pattern

What It Is

The Comparative Analysis Pattern involves asking the AI to analyze multiple perspectives, approaches, or solutions to the same problem and compare their strengths and weaknesses. This helps avoid one-sided analyses and reveals nuances that might be missed with a singular approach.

When To Use It

  • When exploring a complex issue with multiple valid viewpoints
  • For decision-making between different options or approaches
  • When you want to understand tradeoffs and nuances
  • To reduce bias in analysis by considering multiple perspectives

Basic Template

Analyze [topic/problem] from the following perspectives/approaches:
1. [First perspective/approach]
2. [Second perspective/approach] 
3. [Third perspective/approach]

For each, address:
- Key assumptions and principles
- Strengths and advantages
- Limitations and disadvantages
- Scenarios where this approach works best

After analyzing each individually, provide a comparative assessment and [recommendation/synthesis] based on [specific criteria or context].

Example

Weak prompt: "What's the best way to structure a remote work policy?"

Strong prompt with comparative analysis pattern: "Analyze different approaches to structuring a remote work policy for a mid-sized (200 employee) technology company from the following perspectives:

  1. Fully remote with asynchronous work
  2. Hybrid with required in-office days (2-3 days per week)
  3. Remote-first with quarterly in-person team gatherings

For each approach, address:

  • Key assumptions and principles underlying this model
  • Benefits for employee satisfaction, productivity, and company culture
  • Potential challenges and drawbacks
  • Implementation requirements (technology, policy changes, management approaches)
  • Types of roles or teams where this approach works best

After analyzing each individually, provide a comparative assessment identifying which elements from each approach might be combined for a custom solution. Consider our context as a growing technology company with both engineering and customer-facing teams."

Why It Works

This pattern leverages the AI's ability to represent multiple viewpoints and framework simultaneously. By explicitly requesting analysis from different angles, you force a more thorough and balanced exploration of the topic. This often reveals important considerations and nuances that would be missed in a single-perspective response.

Pro Tips

  • Include perspectives that represent different stakeholders, not just different approaches
  • Ask for specific concrete examples that illustrate each perspective
  • Request that the AI identify where perspectives agree or overlap, not just where they differ
  • Have the AI evaluate each perspective against specific metrics or criteria relevant to your situation
  • For controversial topics, explicitly ask the AI to represent positions fairly, even those it might not favor

Pattern 6: The Persona-Audience Alignment Pattern

What It Is

The Persona-Audience Alignment Pattern extends the persona pattern by aligning both who is communicating (the persona) with who they are communicating to (the audience). This creates highly targeted content optimized for specific communication contexts.

When To Use It

  • When creating communication designed to resonate with a specific audience
  • For marketing, sales, or educational content
  • When adapting complex information for particular knowledge levels
  • For roleplaying professional interactions (e.g., doctor to patient, teacher to student)

Basic Template

Act as [specific persona] communicating with [specific audience]. 
The [audience] has these characteristics: [relevant audience traits, knowledge level, concerns].
Your goal is to [communication objective].

Create [type of communication] that [specific requirements for the communication].

Example

Weak prompt: "Write an explanation of blockchain technology."

Strong prompt with persona-audience alignment pattern: "Act as a financial technology expert communicating with small business owners who are considering accepting cryptocurrency payments.

The audience has these characteristics:

  • Limited technical knowledge but strong understanding of business operations
  • Primary concerns about security, volatility, and regulatory compliance
  • Looking for practical information rather than theoretical explanations
  • Busy professionals who need clear, actionable information

Your goal is to help them understand blockchain technology enough to make informed decisions about cryptocurrency payments for their business.

Create a concise explanation that:

  • Uses relatable business analogies rather than technical jargon
  • Focuses on practical implications rather than how the technology works
  • Addresses common concerns and misconceptions for this audience
  • Includes specific considerations for small business implementation
  • Provides clear next steps if they want to explore accepting crypto payments
"

Why It Works

Effective communication requires understanding both who is speaking and who is listening. This pattern creates that dual awareness in the AI, allowing it to adapt content for maximum relevance and impact. By specifying audience characteristics, concerns, and knowledge level, you help the AI filter and format information to match exactly what the audience needs.

Pro Tips

  • Be specific about the audience's existing knowledge, misconceptions, and concerns
  • Include demographic and psychographic details about the audience if relevant
  • Specify the relationship between the persona and audience (e.g., advisor, peer, authority figure)
  • Indicate any sensitive topics or approaches to avoid with this particular audience
  • For marketing content, include the stage of the buyer's journey the audience is in

Pattern 7: The Constraint Pattern

What It Is

The Constraint Pattern involves deliberately limiting the AI's options or applying specific restrictions to guide the response in creative or focused ways. These constraints actually enhance creativity and precision by forcing more thoughtful and innovative approaches.

When To Use It

  • When you want to encourage creative problem-solving
  • To focus the response on specific elements or approaches
  • When trying to avoid common or obvious solutions
  • To simulate real-world constraints in planning or design tasks

Basic Template

[Task description]

Apply these constraints to your response:
- [Constraint 1]
- [Constraint 2]
- [Constraint 3]

Your response must work within these limitations while still accomplishing the primary objective.

Example

Weak prompt: "Give me ideas for team-building activities."

Strong prompt with constraint pattern: "Suggest creative team-building activities for a remote marketing team of 12 people spanning 4 different time zones.

Apply these constraints to your response:

  • Each activity must be completable in under 30 minutes
  • Do not suggest anything requiring physical props that need to be mailed
  • Activities should not rely on synchronous participation (people may join at different times)
  • Must work well for both introverted and extroverted team members
  • Should specifically help build cross-functional understanding between design, content, and analytics sub-teams
  • Total budget not to exceed $20 per person

For each activity, briefly explain how it meets all constraints while building team cohesion and improving cross-functional collaboration."

Why It Works

Constraints paradoxically enhance creativity by eliminating obvious solutions and forcing more innovative approaches. They also ensure practical relevance by simulating real-world limitations. When AI has complete freedom, it often gives generic responses, but constraints push it to generate more thoughtful, specific, and creative outputs.

Pro Tips

  • Use a mix of different types of constraints (resource, time, format, conceptual)
  • For creative tasks, try unusual constraints that force unexpected approaches
  • Ask the AI to explain how its solutions address each constraint
  • For optimization problems, use constraints to specify minimum requirements
  • You can rank constraints by importance ("These first three constraints are non-negotiable, while the last two are preferences")

Combining Patterns for Advanced Prompting

While these patterns are powerful individually, they become truly transformative when combined. Here are some effective pattern combinations:

Persona + Task Decomposition

Have an expert persona guide you through a complex problem step-by-step, bringing domain-specific expertise to each stage.

Example: "Act as an experienced data scientist analyzing customer churn. Break down the analysis into steps: 1) Initial data exploration, 2) Feature identification, 3) Pattern recognition, 4) Model recommendation..."

Template + Critique-Revise

Provide a specific output format, then have the AI critique and improve its own work within that structure.

Example: "Create a press release following this template... After generating the initial press release, critique it for newsworthiness, clarity, and brand alignment, then provide an improved version maintaining the same structure."

Comparative Analysis + Constraint

Analyze multiple approaches while applying specific limitations that reflect real-world scenarios.

Example: "Compare these three marketing strategies under these constraints: limited budget, two-person team, and a 30-day timeline..."

The most advanced prompt engineers strategically layer these patterns based on their specific needs. With practice, combining patterns will become second nature, allowing you to craft super-prompts that yield exceptional results.

Choosing the Right Pattern for Your Task

If You Need To... Consider This Pattern
Get expert perspective or specialized knowledge Persona Pattern
Solve a complex problem with multiple steps Task Decomposition Pattern
Improve the quality of AI-generated content Critique-Revise Pattern
Create content with specific structure or formatting Template Pattern
Understand multiple viewpoints on a topic Comparative Analysis Pattern
Create targeted communication for specific audiences Persona-Audience Alignment Pattern
Generate creative solutions within limitations Constraint Pattern

Take Your AI Prompting to the Next Level

These seven patterns are just the beginning of what's possible with advanced prompt engineering. Our comprehensive courses dive deeper into these techniques with personalized feedback and hands-on practice.

In our Associates in AI Fundamentals program, you'll master these patterns plus dozens more advanced techniques that will transform your ability to work with AI tools.

Start Free Course
LearnAI Team

About the Author

The LearnAI Team combines expertise from prompt engineers, AI researchers, and educators who have helped thousands of students and professionals harness the power of AI tools. Our curriculum is continuously updated to reflect the latest developments in prompt engineering techniques and best practices.

Continue Your Learning Journey

This article is based on material from our Associates in AI Fundamentals course. Take your learning to the next level with our structured curriculum and hands-on exercises.

Start Free Course

Share This Article

More Articles You Might Like

Master These 7 Prompt Patterns to Solve Any AI Task

Learn the fundamental prompt patterns that will help you solve virtually any problem using AI tools, from content creation to problem-solving.

Read More →

AI Terminology Explained: A Beginner-Friendly Glossary

Break through the jargon barrier with our plain-English explanations of essential AI terms and concepts that every learner should understand.

Read More →

AI and Human Creativity: Partners, Not Competitors

Explore how AI can enhance rather than replace human creativity, with practical examples of AI-human collaboration across various creative fields.

Read More →

Ready to Master AI?

Take your learning to the next level with our structured AI courses and personalized learning paths.