Master the Art of Prompting
Learn 7 powerful prompting strategies with interactive examples and real-world use cases. From beginners to experts, discover techniques that will transform how you work with AI.
Zero-shot
Beginner"Clear instructions, instant results"
What is Zero-shot?
Zero-shot prompting means giving the AI clear, direct instructions without providing any examples. It's the simplest and most straightforward approach - you tell the AI exactly what you want, and it delivers based purely on its training.
How it works
When to use Zero-shot?
Quick Answers
Get immediate responses to straightforward questions or simple tasks.
Content Generation
Create emails, summaries, or basic content with clear specifications.
Simple Commands
Execute direct tasks like translations, formatting, or basic coding.
Creative Writing
Generate stories, poems, or creative content with specific guidelines.
See the Difference
Write an email to a customerWrite a professional email to a customer with the following requirements:
- Tone: Friendly yet professional
- Purpose: Apologize for delayed shipment
- Include: Estimated delivery date (May 15th), discount code for next purchase (SAVE20)
- Length: 3-4 paragraphs
- Signature: Use company name "TechStore"Basic email without clear direction or structure...
Well-structured, professional email with all required elements, appropriate tone, and proper formatting.
Example Prompts
Write a professional email to schedule a meeting with a client. Include:
- Greeting with client's name (John)
- Purpose: Discuss Q2 product roadmap
- Suggest 3 time slots next week
- Keep it under 150 words
- Professional but friendly toneSummarize this article in 3 bullet points, focusing on:
- Main findings
- Key statistics
- Actionable takeaways
Keep each bullet point under 20 words.Try it Yourself
Pro Tips
- •Be specific about tone, length, and format requirements
- •Include concrete details instead of vague descriptions
- •Specify the output structure (bullet points, paragraphs, etc.)
- •Define your audience to help the AI adjust appropriately
Common Mistakes to Avoid
- •Being too vague (e.g., 'write something good')
- •Assuming the AI knows your context without explaining
- •Not specifying format or length, leading to inconsistent results
When NOT to Use
Avoid zero-shot for complex tasks requiring specific patterns, formats that need examples to understand, or when you need the AI to follow a very particular style.
Few-shot
Beginner"Learn by example"
What is Few-shot?
Few-shot prompting provides the AI with 2-3 example input-output pairs before asking it to complete your task. The AI learns the pattern from your examples and applies it to new inputs. It's like showing someone how to do something a few times before asking them to do it themselves.
How it works
When to use Few-shot?
Formatting Tasks
Transform data into specific formats by showing examples of desired output.
Style Matching
Replicate a particular writing style, tone, or voice consistently.
Pattern Recognition
Classify or categorize items based on demonstrated patterns.
Code Generation
Generate code following specific conventions shown in examples.
See the Difference
Convert product descriptions to bullet pointsConvert product descriptions to bullet points following this format:
Example 1:
Input: "This comfortable cotton t-shirt is perfect for everyday wear. Features a classic crew neck and comes in 5 colors."
Output:
• Material: 100% cotton
• Style: Classic crew neck
• Use: Everyday wear
• Colors: 5 options available
Example 2:
Input: "Premium leather wallet with RFID protection, multiple card slots, and coin compartment. Dimensions: 4.5 x 3.5 inches."
Output:
• Material: Premium leather
• Feature: RFID protection
• Storage: Multiple card slots, coin compartment
• Size: 4.5 x 3.5 inches
Now convert this:
"Wireless noise-cancelling headphones with 30-hour battery life, comfortable over-ear design, and included carrying case."Example Prompts
Respond to customer inquiries using this template:
Example 1:
Customer: "Where is my order?"
Response: "Thank you for reaching out! I've checked your order #12345, and it's currently in transit. Expected delivery is May 15th. You'll receive a tracking link via email shortly. Is there anything else I can help with?"
Example 2:
Customer: "Can I return this item?"
Response: "Absolutely! We accept returns within 30 days of purchase. Please visit our returns portal at returns.com and use order #12345. You'll receive a prepaid shipping label. Let me know if you need any assistance!"
Now respond to:
Customer: "Do you ship internationally?"Try it Yourself
Pro Tips
- •Use 2-3 examples - more than that rarely improves results
- •Make sure your examples are diverse but follow the same pattern
- •Keep examples consistent in format and structure
- •Choose examples that cover edge cases or variations
Common Mistakes to Avoid
- •Providing inconsistent examples that confuse the pattern
- •Using too many examples (diminishing returns after 3-4)
- •Choosing examples that are too similar to each other
When NOT to Use
Skip few-shot when the task is simple enough for zero-shot, or when you can't provide good representative examples. Also avoid if examples would take up too much token space.
Chain-of-Thought
Intermediate"Think step by step"
What is Chain-of-Thought?
Chain-of-Thought (CoT) prompting encourages the AI to break down complex problems into logical steps and show its reasoning process. Instead of jumping to an answer, the AI "thinks out loud" through each step, leading to more accurate and explainable results.
How it works
When to use Chain-of-Thought?
Math & Logic
Solve mathematical problems or logical puzzles requiring multi-step reasoning.
Analysis Tasks
Analyze complex situations that require breaking down into components.
Decision Making
Evaluate options and make informed decisions with clear reasoning.
Debugging
Trace through code or processes to identify and fix issues.
See the Difference
Calculate 15% tip on $47.50Calculate 15% tip on $47.50. Let's think step by step:
1. First, convert the percentage to decimal
2. Multiply the bill amount by the decimal
3. Round to 2 decimal places
4. Show the total with tip included
Please show your work for each step.The tip is $7.13
Step 1: 15% = 0.15\nStep 2: $47.50 × 0.15 = $7.125\nStep 3: Rounded to $7.13\nStep 4: Total = $47.50 + $7.13 = $54.63\n\nThe tip is $7.13 and your total is $54.63
Example Prompts
A train leaves Station A at 2:00 PM traveling at 60 mph. Another train leaves Station B (180 miles away) at 2:30 PM traveling at 80 mph toward Station A.
Let's solve this step by step:
1. Calculate how far the first train travels before the second starts
2. Determine the combined speed of both trains approaching each other
3. Calculate the remaining distance to cover
4. Find the time until they meet
5. Determine the exact meeting time
Please show all calculations clearly.Try it Yourself
Pro Tips
- •Use phrases like 'Let\'s think step by step' or 'Let\'s break this down'
- •Ask the AI to explain its reasoning at each stage
- •Request numbered steps for clarity
- •Encourage showing calculations or intermediate results
Common Mistakes to Avoid
- •Skipping the step-by-step instruction - AI might still jump to conclusion
- •Not allowing enough space for reasoning (token limits)
- •Using CoT for simple tasks that don't need it
When NOT to Use
Avoid for simple, straightforward tasks where step-by-step reasoning adds unnecessary complexity. Also skip if you need very quick, concise responses.
ReAct
Advanced"Think, then act"
What is ReAct?
ReAct (Reasoning + Acting) combines reasoning traces with task-specific actions. The AI alternates between thinking about what to do (Thought), taking an action (Action), and observing the result (Observation). This creates a feedback loop that allows for adaptive problem-solving.
How it works
When to use ReAct?
Research Tasks
Gather information through multiple steps with intermediate decisions.
Iterative Problem Solving
Tackle problems that require trying different approaches and learning.
Planning & Strategy
Develop plans that adapt based on intermediate outcomes.
Complex Workflows
Execute multi-step processes with decision points along the way.
See the Difference
Find information about electric cars and their environmental impactResearch electric cars and their environmental impact using the Thought-Action-Observation framework:
Thought: I need to understand both the benefits and drawbacks of electric cars environmentally.
Action: List key environmental factors to research (battery production, energy sources, lifetime emissions).
Observation: [What did we learn from this step?]
Thought: Now I need to compare these factors to traditional vehicles.
Action: Identify comparison points.
Observation: [What insights did we gain?]
Continue this pattern to build a comprehensive understanding.Example Prompts
Analyze the market opportunity for a new fitness app using ReAct:
Thought: I need to understand the current market size and trends.
Action: Identify key market metrics to analyze.
Observation: [Record findings]
Thought: Now I should analyze the competition.
Action: List main competitors and their strengths/weaknesses.
Observation: [Record findings]
Thought: Based on the above, where are the gaps?
Action: Identify underserved segments or unmet needs.
Observation: [Record findings]
Thought: Finally, what's the recommended strategy?
Action: Synthesize findings into actionable recommendations.Try it Yourself
Pro Tips
- •Explicitly structure prompts with 'Thought', 'Action', 'Observation' labels
- •Allow the AI to iterate and adjust based on observations
- •Use this for tasks that benefit from adaptive decision-making
- •Encourage the AI to learn from each observation
Common Mistakes to Avoid
- •Not clearly separating thought from action
- •Skipping the observation step - loses the feedback loop
- •Using for simple linear tasks that don't need iteration
When NOT to Use
Avoid for straightforward tasks without decision points, or when you need a single direct answer without intermediate steps.
Reflexion
Advanced"Learn from mistakes"
What is Reflexion?
Reflexion adds a self-evaluation and improvement layer to problem-solving. The AI tries an approach, evaluates its own output, reflects on what could be better, and then refines the solution. It's like having built-in quality control and continuous improvement.
How it works
When to use Reflexion?
Quality Improvement
Refine outputs iteratively until they meet high-quality standards.
Error Correction
Identify and fix mistakes or issues through self-evaluation.
Content Editing
Polish writing, code, or creative work through multiple refinement cycles.
Strategy Refinement
Develop and improve strategies based on evaluation feedback.
See the Difference
Write a compelling product descriptionWrite a compelling product description, then refine it:
Step 1 - Initial Draft:
Write the first version of the product description.
Step 2 - Self-Evaluate:
Analyze the draft for:
- Clarity of benefits
- Emotional appeal
- Call to action strength
- Readability
Step 3 - Reflect:
Identify specific weaknesses and opportunities for improvement.
Step 4 - Refine:
Rewrite the description addressing the identified issues.
Step 5 - Final Check:
Confirm all improvements have been made.Example Prompts
Compose and refine a sales email using Reflexion:
1. DRAFT: Write initial sales email for our new software product.
2. EVALUATE: Score the draft on:
- Subject line effectiveness (1-10)
- Opening hook strength (1-10)
- Value proposition clarity (1-10)
- Call to action power (1-10)
3. REFLECT: For any score below 8, explain what's missing or weak.
4. REFINE: Rewrite the email addressing each weakness.
5. VERIFY: Confirm all scores are now 8+ or explain remaining tradeoffs.Try it Yourself
Pro Tips
- •Build in explicit evaluation criteria
- •Ask for specific scores or assessments
- •Request the AI explain what to improve and why
- •Allow multiple refinement cycles for best results
Common Mistakes to Avoid
- •Not providing clear evaluation criteria - leads to vague feedback
- •Stopping after first evaluation without refinement
- •Using for tasks where the first output is usually good enough
When NOT to Use
Skip Reflexion for time-sensitive tasks requiring quick responses, or simple tasks where quality is already high in first attempt.
Tree of Thoughts
Advanced"Explore multiple paths"
What is Tree of Thoughts?
Tree of Thoughts (ToT) explores multiple reasoning paths simultaneously, like branches on a tree. Instead of following one line of thinking, the AI generates several different approaches, evaluates each one, and then selects or combines the best elements. It's perfect for complex problems with multiple viable solutions.
How it works
When to use Tree of Thoughts?
Creative Brainstorming
Generate and evaluate multiple creative ideas before selecting the best.
Strategic Planning
Explore different strategies and compare their potential outcomes.
Architecture Design
Consider multiple design approaches before committing to one.
Decision Analysis
Evaluate pros and cons of different options systematically.
See the Difference
Design a customer retention strategyDesign a customer retention strategy by exploring multiple approaches:
Step 1 - Generate 3 Different Approaches:
Path A: Loyalty rewards program approach
Path B: Personalization and engagement approach
Path C: Community building approach
Step 2 - Develop Each Path:
For each approach, outline:
- Key features
- Implementation requirements
- Expected costs
- Potential ROI
Step 3 - Evaluate Each Path:
Score each on:
- Ease of implementation (1-10)
- Cost effectiveness (1-10)
- Customer impact (1-10)
- Scalability (1-10)
Step 4 - Select or Combine:
Choose the best approach or combine strengths from multiple paths.Example Prompts
Explore different approaches for our app's next major feature:
Branch 1: AI-Powered Recommendations
- Core functionality
- Technical requirements
- User benefits
- Development timeline
Branch 2: Social Collaboration Features
- Core functionality
- Technical requirements
- User benefits
- Development timeline
Branch 3: Advanced Analytics Dashboard
- Core functionality
- Technical requirements
- User benefits
- Development timeline
Evaluation Matrix:
Compare all three on: User demand, Development effort, Revenue potential, Strategic fit
Recommendation:
Based on the evaluation, which path should we pursue? Or should we combine elements?Try it Yourself
Pro Tips
- •Generate 3-5 distinct approaches, not minor variations
- •Use consistent evaluation criteria across all paths
- •Consider combining strengths from multiple approaches
- •Be explicit about what makes each path unique
Common Mistakes to Avoid
- •Creating paths that are too similar to each other
- •Not fully developing each path before evaluation
- •Bias toward the first generated path
When NOT to Use
Avoid for simple problems with obvious solutions, or when you need quick decisions without exploring alternatives. Also skip if token limits prevent exploring multiple paths fully.
Meta Prompting
Intermediate"Assign the perfect role"
What is Meta Prompting?
Meta prompting assigns the AI a specific expert role or persona tailored to your task. By defining who the AI should "be" (e.g., a marketing strategist, senior developer, or financial advisor), you help it access the most relevant knowledge and adopt the appropriate perspective and communication style.
How it works
When to use Meta Prompting?
Domain Expertise
Access specialized knowledge by assigning expert roles in specific fields.
Specific Output Formats
Get results in professional formats by defining the role and standards.
Tone & Style
Match a specific writing style or communication approach through role-play.
Perspective Shifts
View problems from different professional angles by changing roles.
See the Difference
Help me improve my website's conversion rateYou are a senior conversion rate optimization (CRO) specialist with 10+ years of experience in e-commerce. You've helped over 100 companies increase their conversion rates by an average of 40%.
Your approach:
- Data-driven analysis
- Evidence-based recommendations
- Clear prioritization of changes by impact
- Specific, actionable next steps
Task: Analyze my website and provide a CRO improvement plan.
Input Format: I'll describe my website and current metrics
Output Format:
1. Executive Summary
2. Key Issues (prioritized)
3. Recommended Changes (with expected impact)
4. Implementation Roadmap
Please analyze in your expert capacity.Example Prompts
You are a Staff Software Engineer at a FAANG company, specializing in Python and system design. You have:
- 15+ years of experience
- Led architecture reviews for high-scale systems
- Mentored 50+ junior developers
- Strong focus on performance, security, and maintainability
Your code review approach:
1. Correctness and logic
2. Security vulnerabilities
3. Performance implications
4. Code maintainability
5. Best practices adherence
Review Style: Constructive, specific, with examples
Please review this Python code: [code here]
Provide feedback in this format:
- Critical Issues (must fix)
- Improvements (should fix)
- Suggestions (nice to have)
- What's done wellYou are a Chief Marketing Officer with expertise in SaaS B2B marketing. Your background:
- Built marketing teams at 3 successful startups
- Expert in growth marketing, content strategy, and demand generation
- Data-driven approach with focus on CAC, LTV, and conversion metrics
Your framework:
1. Understand business goals and current metrics
2. Identify target audience and positioning
3. Recommend multi-channel strategy
4. Define success metrics and timeline
5. Provide implementation roadmap
Task: Develop a go-to-market strategy for our new product.
Please provide strategy in format:
- Situation Analysis
- Strategy Recommendations
- Channel Plan
- Budget Allocation
- Success Metrics
- 90-Day Action PlanTry it Yourself
Pro Tips
- •Be specific about the role - include experience level and specialties
- •Define the expert's approach or framework
- •Specify desired output format and structure
- •Include relevant context about the expert's background
Common Mistakes to Avoid
- •Vague roles like 'expert' without specifics
- •Not defining what makes this expert qualified
- •Skipping output format specifications
When NOT to Use
Skip meta prompting for general tasks that don't benefit from specialized expertise, or when you want a neutral, objective perspective without role bias.