Prompt Like a Pro
β¨ PAN'S RULE: The computer is a super-smart puppy. It wants to do what you say, but you need to give it good instructions! β¨
Let's learn the secret language of AI! You'll master "prompting"βhow to give an AI the perfect instructions to get exactly what you imagine in your head.
Garbage In, Garbage Out
If you tell an AI, "Write a story about a dog," you're letting the AI just guess what you want, and it might guess wrong! You might get a 10-page tragedy about a stray, or a 3-sentence rhyme for a little kid.
Prompt Engineering is the skill of giving the AI super-clear instructions so there's no confusion. You aren't just asking a question; you are telling the AI exactly how to behave. A great prompt has four parts:
- Role: Who the AI should be. "Act as a senior Disney Pixar animator."
- Task: What the AI should do. "Write a story outline about a dog who gets lost."
- Format: How the AI should show the answer. "Use bullet points and keep it under 300 words."
- Constraint: A rule the AI must follow. "Do NOT use the word 'sad'."
Let's Get Silly: The Prompt-o-Matic!
Let's build a silly prompt together. Fill in the blanks below to create a set of instructions for an AI. This is how you start thinking like a prompt engineer!
Create a story about a from who loves to !
π Action Plan: Building a Megaprompt
Start with the Goal (The Vague Prompt)
"Help me plan a birthday party."
Okay, your turn! Add a Role and some Context to make this prompt better. Try to beat our example in the next step!
Add Context & Persona (Better!)
"Act as an expert event planner. Help me plan a superhero birthday party for an 8-year-old."
Add Format & Constraints (The Megaprompt! π)
"Act as an expert event planner. Plan a superhero birthday party for an 8-year-old. Provide a schedule from 1PM to 4PM, a grocery list under $50, and 3 game ideas. Output the answer as a Markdown table."
π΅οΈ Prompt Deconstruction
In the prompt below, which part is the Constraint?
π¨βπ©βπ§ PARENT CORNER: Kitchen Table Prompts
Try this fun activity away from the screen! Take turns giving each other "prompts" for drawings. Start simple ("Draw a house") and then add more detail ("Draw a tall, spooky, purple house with a friendly ghost in the window"). This is a great way to practice how adding context and constraints changes the final result!
Your First Mission: The Idea Engine
Reading is cool, but building is even cooler. It's time to use your new prompting skills with a real AI!
Your Mission: Generate a logo for a fictional space exploration company. Use the skills you just learnedβRole, Task, Format, and Constraintsβto get an awesome image.
Tool: Microsoft Designer Image Creator
Challenge:
- Start with a simple prompt: "a logo for a space company"
- Now, add more details! Try adding a style like 'pixel art', 'watercolor', or '3D render'.
- Add a constraint. Maybe you want "no text" or "on a black background".
- Keep trying new prompts until you make something you love!
π§ Deep Dive: Pro-Techniques
Want to teach the AI a specific style? Give it examples right in the prompt! This is a pro-move called Few-Shot Prompting.
For example, to teach an AI a Q&A format, you could write:
Q: What is the capital of Japan? A: Tokyo.
Q: What is the capital of Canada? A:
The AI will see the pattern and answer with 'Ottawa'. You just taught it a format on the fly! Cool, right?
π Learn More
- Next Up: Exploring Different Kinds of AI - Keep exploring!
- Back to the AI Builders Lab Mission Board - See all available missions.