Prompt Lab

Master Advanced Prompting Techniques

What You'll Learn

  • How few-shot examples guide AI to better outputs
  • Why chain-of-thought prompts unlock deeper reasoning
  • How style matching ensures on-brand results
  • Ways constraints shape more focused responses
  • When to use each technique for maximum impact

You'll work through 4 real tasks and try different prompting techniques on each. For every choice, you'll see feedback explaining why it works (or doesn't). Let's go.

Task 1 of 4

Write a Study Guide for a History Chapter

Your student needs a study guide for a chapter on the American Revolution. The guide should be clear and organized so they can review before a test.

Basic Prompt

"Create a study guide for a history chapter on the American Revolution."

Which technique would improve this prompt the most?

Few-Shot Example
Show an example of a great study guide so the AI understands the format and quality you want.
"Create a study guide for the American Revolution chapter. Here's an example of a good study guide format from another chapter: [Key Concepts] - Concept 1: Brief explanation with 2-3 supporting details - Concept 2: Brief explanation with 2-3 supporting details [Study Questions] 1. What was...? 2. Why did...? Use this format for the American Revolution guide."
Chain-of-Thought
Ask the AI to think through key themes step by step, so it reasons about what matters most.
"Create a study guide for the American Revolution chapter. First, think through the most important themes and turning points. Then organize them into clear sections with key concepts and study questions. What are the 5-7 most critical ideas a student should know?"
Style Matching
Specify the tone, length, and format so the output matches exactly what you need.
"Create a concise study guide for the American Revolution chapter. Keep it to one page. Use clear headings, bullet points, and a friendly but academic tone. Include key concepts, dates, and important figures."
Constraints
Set specific requirements like length, sections, and format to focus the output.
"Create a study guide for the American Revolution with exactly these sections: 1. Timeline (5 key dates) 2. Key Figures (6-8 people) 3. Vocabulary (10 terms) 4. Study Questions (10 questions) Keep each section brief and scannable."
Task 2 of 4

Debug Why a Webpage Button Doesn't Work

You built a form and the "Submit" button isn't triggering anything. You need to figure out what's wrong in your code.

Basic Prompt

"My button doesn't work. Help me debug it."

Which technique would improve this prompt the most?

Chain-of-Thought
Walk through the logic step by step so the AI reasons through possible causes.
"My Submit button isn't working. Walk me through debugging this step by step. First, what are the most common reasons a button might not respond? Then, help me check: 1. Is the button connected to a function? 2. Is the function named correctly? 3. Are there any console errors? What should I look for first?"
Provide Context
Include the actual code so the AI can see exactly what you're working with.
"My button isn't working. Here's my code: [paste HTML and JavaScript]. The button is supposed to validate the form and submit it. What's the issue and how do I fix it?"
Role Assignment
Tell the AI to act as an expert, so it applies specialized knowledge to your problem.
"You are an expert web developer. I have a button that isn't responding to clicks. Help me debug it. My button code is [paste code]. What's wrong and how should I fix it?"
Few-Shot Example
Show a working button example so the AI knows what you're aiming for.
"My button isn't working. Here's a button that DOES work: [working code example]. Now here's my broken button: [broken code]. What's different and how do I fix mine?"
Task 3 of 4

Create Social Media Captions for a School Event

Your school is holding a fundraiser and you need engaging captions for Instagram, TikTok, and Twitter that match your school's voice.

Basic Prompt

"Write social media captions for our school fundraiser."

Which technique would improve this prompt the most?

Style Matching
Specify tone, emoji usage, platform style, and voice so captions feel authentic.
"Write 3 social media captions for our school fundraiser. Make them energetic and fun, using relevant emojis. For Instagram: longer, story-focused, 1-2 emojis. For TikTok: punchy and trendy, hashtags included. For Twitter: concise and witty, under 280 characters. Use our school's voice: friendly but professional."
Few-Shot Examples
Show captions you like so the AI matches your preferred style and tone.
"Write social media captions for our school fundraiser. Here are captions we loved from past posts: [Example caption 1] [Example caption 2] Use this tone and style for the fundraiser captions across Instagram, TikTok, and Twitter."
Constraints
Set character limits, hashtag requirements, and format specs for each platform.
"Write 3 social media captions for our school fundraiser: - Instagram: 150-200 characters, 2-4 hashtags, 1-2 relevant emojis - TikTok: 100-150 characters, 3-5 trending hashtags, trendy language - Twitter: Under 280 characters, call-to-action link, 1-2 hashtags"
Role Assignment
Ask the AI to think like a social media manager with your school's voice.
"You're a social media manager for our school. Write engaging captions for our upcoming fundraiser. Match our school's friendly, inclusive voice. Create one caption for each platform: Instagram, TikTok, and Twitter. Make them shareable and on-brand."
Task 4 of 4

Analyze Data from a Survey About Teen Phone Usage

You collected survey responses about how much time teens spend on their phones. You need a clear analysis that explains the patterns and highlights important findings.

Basic Prompt

"Analyze our teen phone usage survey data."

Which technique would improve this prompt the most?

Role Assignment
Ask the AI to think like a data analyst to bring expert perspective to the analysis.
"You are a data analyst specializing in teen digital behavior. Analyze this survey data on teen phone usage: [paste data]. What patterns stand out? What's surprising? What are the key takeaways for educators and parents?"
Output Format Specification
Ask for specific output formats so the analysis is organized exactly how you need it.
"Analyze this survey data on teen phone usage: [paste data]. Structure your analysis as: 1. Key Findings (3-4 bullet points) 2. Patterns & Trends (2-3 paragraphs) 3. Notable Groups (breakdown by age, gender, etc.) 4. Implications (what this means) Use a data table if helpful. Make it readable and actionable."
Chain-of-Thought
Ask the AI to work through patterns step by step to reveal deeper insights.
"Analyze this teen phone usage survey data: [paste data]. Work through it step by step: 1. What do the numbers tell us overall? 2. Are there differences between groups? 3. What patterns surprise you? 4. What do these patterns suggest about teen behavior? Think out loud so I can follow your reasoning."
Constraints
Set length, focus areas, and specific questions to answer.
"Analyze this teen phone usage survey: [paste data]. Keep the analysis to 300-400 words. Focus on these questions: 1. What's the average phone usage across age groups? 2. What's the biggest concern? 3. How does this compare to national trends? Highlight 2-3 actionable insights."
🎉

Lab Complete!

You've mastered advanced prompting techniques. Now you can write prompts that unlock the best from AI.

Your Technique Journey

Quick Reference: Prompting Techniques

Few-Shot Examples
Show the AI examples of great outputs so it understands quality and format. Best for: formats, style, structure.
Chain-of-Thought
Ask the AI to think through problems step by step, revealing reasoning. Best for: analysis, problem-solving, complex tasks.
Style Matching
Specify tone, voice, format, and audience so outputs feel right. Best for: writing, communication, brand voice.
Constraints
Set length, structure, sections, and specific requirements. Best for: focused outputs, meeting specs, organized results.
Role Assignment
Tell the AI to act as an expert (data analyst, teacher, writer). Best for: leveraging specialized knowledge and perspective.
Provide Context
Give the AI the full picture—code, data, background. Best for: debugging, analysis, specific problems.