Standalone lesson.
Lesson 1563 of 1570
Prompt Engineering
Role + context + examples + constraints + format.
Prompt engineering is just being really specific with your AI. The best prompts have five ingredients: role, context, examples, constraints, and format.
The RCECF recipe
Role
You are a ___.Telling the AI who to be changes how it talks. “You are a friendly museum guide” vs. “You are a strict copy-editor” — same question, very different answers.
Context
Who is the output for? What’s the situation? “I’m presenting to a room of 7th graders who are new to this topic.”
Examples (“few-shot”)
Show one or two examples of good output. This is the single biggest upgrade you can make to a prompt.
Constraints
“Under 200 words.” “Don’t use the word ‘delve.’” “Only include facts from the article I pasted.”
Format
“Bullet points.” “A table with three columns.” “Respond in JSON.”
Advanced move: chain-of-thought
Add “Think step by step before answering” to any complex prompt. The AI will write out its reasoning, and because each step is written first, the final answer is more likely to be correct.
Try it now
In your own AI tool, run one weak prompt (“write me a poem”) and one strong one using all five ingredients. Notice how much more the strong prompt controls the answer.
Tutor
Curious about “Prompt Engineering”?
Ask anything about this lesson. I’ll answer using just what you’re reading — short, friendly, grounded.
Progress saved locally in this browser. Sign in to sync across devices.
Related lessons
Keep going
Creators · 40 min
Few-Shot Example Curation: Quality, Rotation, and Counter-Examples, Part 1
Chain-of-thought prompts show real performance gains on reasoning tasks — and zero benefit on tasks that don't need reasoning. Here's how to tell which is which.
Creators · 9 min
AI and System Prompt Architecture: Layered Instruction Design
AI helps creators architect system prompts in layers so changes don't require rewriting the whole thing.
Creators · 11 min
System Prompts vs User Prompts and Why the Distinction Matters
Use the system prompt as the always-on instruction layer it was designed to be.
