Learn the components that make up an effective prompt — context, instructions, format, and constraints.
You have probably written a prompt, read the answer, and thought "that's not what I meant." Then you spent three more messages explaining what you did mean. The information you added in those follow-ups was always in your head. The model just didn't have it.
A strong prompt front-loads that information. It is not longer for the sake of being longer. It simply contains the parts a capable stranger would need to do the job right the first time. This lesson names those parts, shows what each one does, and builds a single prompt up piece by piece so you can watch the output improve.
No prompt guarantees a perfect answer. But the right parts get you closer on the first try and show you what to adjust.
| Part | The question it answers | Example |
|---|---|---|
| Role and context | Who is helping, and what's the situation? | "You are helping a small bakery owner who is new to email marketing." |
| Task | What exactly should be produced? | "Write a welcome email for new subscribers." |
| Input | What material should it work from? | The shop's hours, specialties, a customer note |
| Constraints | What are the limits and rules? | "Under 150 words. No discount codes." |
| Output format | What shape should the answer take? | "Give a subject line, then the body." |
| Examples | What does good look like? | A past email you liked |
Not every prompt needs all six. A quick question needs one or two. But when an answer disappoints you, one of these parts is almost always the one that's missing, so the table doubles as a checklist.
A role tells the model which kind of expertise and voice to draw on. "You are an experienced bookkeeper" pulls the answer toward careful, practical language. The role alone is weak, though. Context is what makes it useful: who you are, who the output is for, and what's going on.
"You are a marketing expert" adds little. "You are helping a two-person bakery that just started collecting email addresses at the register" changes almost everything about the answer.
The task is the verb and the thing: write, summarize, compare, rewrite, list, explain. Make it one clear job. "Help me with my newsletter" is not a task. "Write the first email new subscribers receive" is.
If you find yourself writing "and also," you may have two tasks. Consider splitting them into separate prompts.
The input is the raw material: notes, a draft, data, a customer message. Models work far better from your real material than from their general knowledge, because your material contains the specifics that make the answer yours.
Mark where the input starts and ends so the model doesn't confuse your instructions with your material. Simple labels or quote marks are enough.
Constraints are the rules: length, tone, reading level, things to avoid, things that must be included. They are where most of the "that's not what I meant" moments come from. You knew it had to fit on a postcard. You knew not to mention prices. You just didn't say so.
Good constraints are specific and checkable. "Keep it short" is vague. "Under 100 words" is checkable.
Tell the model the shape you need: a list, a table, three options, a subject line plus body, plain text with no headings. If the output is going somewhere specific, like a text message, a spreadsheet or a slide, say so. It saves you reformatting everything by hand.
An example shows what you mean faster than any description. If you have a past email, post or summary that hit the mark, include it and say what to copy from it (the tone, the length, the structure) and what not to copy (the topic). This is powerful enough that it gets its own paid lesson later in the course.
Here is the same request built up in stages. Watch how each addition removes a guess the model would otherwise have to make.
Stage 1: task only.
Write a welcome email.
You get a generic welcome that could be from a bank, a gym or a software company. The model had nothing to aim at.
Stage 2: add role and context.
You are helping the owner of [SHOP NAME], a small neighborhood bakery
that just started collecting email addresses at the register. Most
subscribers are regulars who already know the shop.
Write a welcome email for new subscribers.
Now it sounds like a bakery. But it invents details, maybe a loyalty program you don't have, because it doesn't know what's true about your shop.
Stage 3: add the input.
You are helping the owner of [SHOP NAME], a small neighborhood bakery
that just started collecting email addresses at the register. Most
subscribers are regulars who already know the shop.
Write a welcome email for new subscribers.
Facts about the shop:
- Hours: [HOURS]
- Known for: [SPECIALTIES]
- Emails will go out [HOW OFTEN] with new items and holiday orders
The details are now real. It's still too long and a little salesy.
Stage 4: add constraints and output format.
You are helping the owner of [SHOP NAME], a small neighborhood bakery
that just started collecting email addresses at the register. Most
subscribers are regulars who already know the shop.
Write a welcome email for new subscribers.
Facts about the shop:
- Hours: [HOURS]
- Known for: [SPECIALTIES]
- Emails will go out [HOW OFTEN] with new items and holiday orders
Rules:
- Under 120 words
- Warm and plain, like the owner talking at the counter
- No discount codes and no exclamation points
- Only use the facts above; don't invent programs or offers
Format: a subject line, then the email body. Nothing else.
This is usually where the output becomes usable. The line "only use the facts above" matters: it tells the model not to fill gaps with made-up details. You should still read the result, because instructions reduce invented details but don't eliminate them.
Stage 5: add an example (optional).
Here is a past message from the owner that has the right voice.
Match the tone and sentence length, not the topic:
"[PASTE A SHORT MESSAGE THE OWNER WROTE]"
If the tone still isn't right after Stage 4, an example like this is usually the fix.
A few habits make any prompt easier for the model to follow:
Give yourself 10 to 15 minutes.
[ROLE]
Act as a [specific expert] with [X years] experience in [domain].
[CONTEXT]
Background: [Situation and relevant details]
Current state: [Where things stand now]
Goal: [What success looks like]
[TASK]
Please [specific action verb] [specific deliverable].
[FORMAT]
Structure your response as:
- [Format requirement 1]
- [Format requirement 2]
[CONSTRAINTS]
- Must: [requirement]
- Must not: [restriction]
- Length: [word/section count]
[EXAMPLE]
Here's an example of what I'm looking for:
[provide example]Learn reusable prompt patterns — RISEN, mega-prompts, and template systems.
The Science of Prompting
No resources available for this lesson yet.
Ask me anything about this lesson!
I'm here to help you understand the concepts better.
Test your understanding of this lesson
AI will generate 5 questions tailored to this lesson
Test your understanding of Anatomy of a Perfect Prompt