Welcome to Prompt Mastery!
You've learned the basics of prompt engineering in Module 1. Now it's time to level up and become a prompt master! In this module, you'll learn advanced techniques that separate beginners from experts.
What You'll Master: By the end of this lesson, you'll know exactly how to craft prompts that get you the perfect response, every single time. We'll break down the psychology of effective prompting and give you battle-tested frameworks.
The Anatomy of a Perfect Prompt
Let's dissect what makes a prompt truly effective. Every great prompt has these 7 elements:
The 7 Elements of Effective Prompts
| Feature |
|---|
The RESPECT Framework
I created a framework that makes writing effective prompts easy to remember: RESPECT
RESPECT Framework Definition: A systematic approach to prompt writing where you specify Role, Expectation, Structure, Parameters, Examples, Context, and Tone. This framework ensures your prompts include all the key elements that help AI models understand exactly what you want and how to deliver it.
- Role - Who should the AI be?
- Expectation - What do you want?
- Structure - How should it be formatted?
- Parameters - What are the constraints?
- Examples - Can you show what you want?
- Context - What background information is needed?
- Tone - What style should be used?
Let's see this framework in action:
Common Prompt Problems and Solutions
Let's identify and fix common mistakes that make prompts ineffective:
Problem 1: The Vague Request
❌ Bad Prompt:
Help me write better
Why it fails:
- No context (write WHAT better?)
- No current level specified
- No specific goal
- No format preference
✅ Fixed Prompt:
I'm a college student writing essays for my English Literature class.
I often get feedback that my arguments lack depth and my paragraphs
don't flow well.
Help me improve my essay writing by:
1. Explaining how to develop stronger arguments (with an example)
2. Teaching me paragraph transition techniques
3. Giving me a checklist to review my essays before submitting
I learn best with concrete examples. Keep explanations simple and
practical.
Why it works: Specific problem, clear goals, context provided, learning style mentioned
Problem 2: The Multi-Task Confusion
❌ Bad Prompt:
Explain machine learning and also help me with Python and tell me
about data science careers and what should I learn first
Why it fails:
- Too many unrelated tasks
- No clear priority
- AI won't know what to focus on
- Response will be scattered
✅ Fixed Approach - Break Into Separate Prompts:
Prompt 1: "I'm a complete beginner interested in data science.
Explain the relationship between Python, machine learning, and
data science careers in simple terms. Use a diagram/visual
description if possible. Keep it under 200 words."
Prompt 2: "Based on my interest in data science, create a
learning roadmap. Start with what I should learn in Month 1,
then Month 2-3, then Month 4-6. For each phase, suggest 1-2
specific resources."
Why it works: One clear task per prompt, logical sequence, actionable
Golden Rule: One prompt = One clear task. If you find yourself using "and also" or "and then" multiple times, split it into separate prompts!
Problem 3: The Assumption Trap
❌ Bad Prompt:
Optimize this code:
[code snippet]
Why it fails:
- What language? (could be multiple)
- Optimize for what? (speed? memory? readability?)
- What's your skill level?
- What's acceptable to change?
✅ Fixed Prompt:
I'm a Python beginner and wrote this function to process customer
data. It works but takes 30 seconds on 10,000 records.
[code snippet]
Please optimize for speed while keeping the code readable for
beginners. Explain:
1. What's making it slow
2. Your optimization approach
3. The improved code with comments
4. How much faster it should be
I'm comfortable with basic Python but haven't learned advanced
concepts like decorators yet.
Why it works: Context, specific goal (speed), skill level, what to preserve, what you understand
Interactive Prompt Quality Checker
Advanced Techniques
Technique 1: The Constraint Ladder
Adding constraints progressively makes outputs better:
Constraints Definition: Specific limitations or requirements you set in a prompt, such as word count, format, tone, what to include, or what to avoid. Constraints focus the AI's output and prevent it from going off-track or being too generic.
Level 1 - No constraints:
Write about healthy eating
Level 2 - Basic constraints:
Write a 300-word article about healthy eating for busy professionals
Level 3 - Multiple constraints:
Write a 300-word article about healthy eating for busy professionals.
Include 3 practical tips. Use a motivating tone. Avoid diet fads.
Level 4 - Comprehensive constraints:
You are a nutritionist writing for busy professionals (25-40 years old)
who want to eat healthier but have limited time and cooking skills.
Write a 300-word blog post titled "Healthy Eating Hacks for Busy Lives"
Include:
- Opening hook about common struggles (1 sentence)
- 3 practical tips that take under 5 minutes each
- One simple recipe idea
- Motivating conclusion
Constraints:
- Use "you" to make it personal
- Each tip: max 2 sentences
- Avoid mentioning expensive superfoods or complex meal prep
- Tone: Encouraging friend, not lecturing expert
- Include one specific time-saving number in each tip
The Constraint Paradox: More specific constraints = more creative and useful results! Constraints don't limit the AI—they focus it.
Technique 2: The Negative Space
Tell the AI what NOT to do:
Negative Prompting Definition: A technique where you explicitly tell the AI what to avoid or not include in its response. For example, "Avoid technical jargon" or "Don't use complicated examples." This helps steer the AI away from common mistakes or unwanted patterns.
You are a software engineer explaining Git to complete beginners.
Explain what Git is and why developers use it. Include a simple
metaphor to make it relatable.
AVOID:
- Technical jargon (repository, commit, merge, etc.)
- Assuming they know command line
- Comparing to other version control systems
- Making it sound complicated
Instead:
- Use everyday language
- Focus on the "why" not the "how"
- Make it feel achievable, not intimidating
Technique 3: The Perspective Shift
Change the AI's perspective for better results:
Standard approach:
Explain blockchain technology
Perspective shift:
You are a skeptical small business owner who's heard blockchain
might help your business, but you think it's probably overhyped
tech nonsense.
A blockchain expert is explaining it to you. Write their explanation
that would actually convince you it's worth learning about.
This creates more relatable, persuasive content!
Real-World Prompt Templates
Here are proven templates for common tasks:
Template 1: Learning New Concepts
I'm learning [TOPIC] and currently understand [WHAT YOU KNOW].
I'm confused about [SPECIFIC CONFUSION].
Explain [CONCEPT] by:
1. Using a simple analogy from [FAMILIAR DOMAIN]
2. Breaking it into 3 key points
3. Giving a practical example
Assume I'm a [YOUR LEVEL] but don't oversimplify—I want to
truly understand it.
Template 2: Content Creation
You are a [ROLE] writing for [AUDIENCE] who [CONTEXT].
Create a [FORMAT] about [TOPIC] that:
1. [FIRST GOAL]
2. [SECOND GOAL]
3. [THIRD GOAL]
Requirements:
- Length: [X WORDS/PARAGRAPHS]
- Tone: [STYLE]
- Include: [MUST-HAVES]
- Avoid: [MUST-NOT-HAVES]
Example of desired style: [SHOW EXAMPLE]
Template 3: Problem Solving
I'm trying to [GOAL] but facing [PROBLEM].
Details:
- Current situation: [CONTEXT]
- What I've tried: [ATTEMPTS]
- Constraints: [LIMITATIONS]
Provide:
1. 3-5 potential solutions, ordered by ease of implementation
2. For each: pros, cons, estimated time
3. Your recommended approach and why
My skill level: [BEGINNER/INTERMEDIATE/ADVANCED]
Template 4: Code Help
I'm a [SKILL LEVEL] working in [LANGUAGE] on [PROJECT TYPE].
Current problem: [DESCRIPTION]
Here's my code:
[CODE]
Error I'm getting: [ERROR MESSAGE]
Help me:
1. Identify what's wrong and why
2. Show the corrected code with comments
3. Explain the concept so I avoid this in future
4. Suggest one related best practice
I understand [CONCEPTS YOU KNOW] but haven't learned [WHAT YOU DON'T KNOW] yet.
Practice Exercise: Prompt Transformation
Let's transform weak prompts into powerful ones:
Test Your Mastery
Key Takeaways
🎯 Use the RESPECT Framework
- Role, Expectation, Structure, Parameters, Examples, Context, Tone
- Not every prompt needs all 7, but the more you include, the better the result
- This framework works for ANY type of prompt
🎯 One Prompt = One Task
- Break complex requests into focused prompts
- Each prompt should have a single clear objective
- Better to send 3 focused prompts than 1 confusing one
🎯 Constraints Are Your Friend
- Specific constraints = Specific results
- Tell the AI what to include AND what to avoid
- Length, format, tone, style—define them all
🎯 Context Prevents Assumptions
- Always explain your situation, skill level, and goal
- The AI can't read your mind—give it background
- "I'm a beginner" vs "I'm experienced" changes everything
Your Challenge
Before moving to the next lesson, practice the RESPECT framework:
Exercise 1: Take this weak prompt and transform it using RESPECT:
"Help me learn Python"
Exercise 2: Write a prompt for YOUR real-world need right now using the framework. Test it with ChatGPT and compare the result to how you normally ask questions.
Exercise 3: Find a prompt you've used recently that gave poor results. Analyze it with the Prompt Quality Analyzer mindset and rewrite it.
Pro Insight: The best prompt writers save their successful prompts in a document. Start your own "prompt library" now! When you craft a great prompt, save it as a template for future use. You'll build an arsenal of proven prompts over time.
What's Next?
In the next lesson, "Few-Shot Learning: Teaching AI by Example", you'll learn how to show the AI exactly what you want through examples—one of the most powerful techniques in prompt engineering!
You'll discover:
- What few-shot learning is and why it works
- How to write effective examples
- When to use zero-shot vs few-shot vs many-shot
- Real examples that demonstrate the power of this technique