Anatomy of a Good Prompt: Role, Context, Task, Format and Examples
A prompt is a brief to a brilliant new hire. Learn the five parts (role, context, task, format, examples), when you need two and when you need all five, then turn "Summarise these tickets" into a brief that ranks 15 support tickets into themes.
What you will learn
- Name the five parts of a strong prompt and what each one adds
- Match the number of parts to the size of the job
- Turn a vague ask into a working brief on real support-ticket data
- Check Claude's answer against a known expected result
Before you start
- A claude.ai account
Type "write about our product" and you get something fuzzy back: generic, off-target, unusable. A vague ask gives a vague answer.
Think of a prompt as a brief to a new hire. A brilliant new hire is still new. Hand over a clear brief and the work comes back sharp. Hand over one line and they have to guess.
The five parts of a strong prompt
Here's each part, built up into one prompt for a product launch.
- Role sets the voice and expertise. A copywriter answers differently from an engineer.
You are a B2B copywriter who writes for busy operations managers. - Context gives the facts it can't guess: product, audience, the number that matters.
We're launching StudyFlow, an analytics dashboard for ops managers. It cuts weekly reporting from 3 hours to under 30 minutes. - Task is one prompt, one job. Vague verbs like "help with" invite vague answers, so name the deliverable.
Write a LinkedIn post announcing it. - Format covers length, tone and structure. Spelling out the shape saves a round of "make it shorter".
~120 words, friendly and concrete, 3 short paragraphs, one clear call to action. - Examples teach tone faster than any adjective. This is few-shot prompting: show, don't just tell.
"Spreadsheets shouldn't eat your Monday. StudyFlow gives you the morning back..."
In the lecture, the vague "write about our product" came back as a generic line about "a great solution" with "cutting-edge technology". With all five parts assembled, the post opened "Spreadsheets shouldn't eat your Monday" and talked about 3 hours of weekly reporting becoming 30 minutes. The prompt isn't much longer. It's clearer.
Examples get their own deep dive in Few-Shot Prompting Done Right.
You rarely need all five
You don't write a brief to ask a colleague what time lunch is. The five parts are a checklist to reach for, not a form to fill in.
| The job | Parts that help | Example |
|---|---|---|
| Quick ask | Task (plus Format) | Summarise a thread or meeting notes |
| Real deliverable | Role, Task, Format | A customer reply, a post, anything someone else will read |
| High stakes or repeated | All five | Brand voice, templates, anything you'll run again next week |
Two parts: meeting notes
Summarise the meeting notes below into
the three decisions we actually made.
One line each, plain English, no preamble.
[notes pasted underneath]
The notes are the context, and a role wouldn't change three bullets. In the lecture the answer came back as three lines: launch moves to 14 March, Priya owns the pricing page rewrite, and the free trial stays at 14 days.
Three parts: a refund complaint
You are a calm customer-support lead.
Reply to the refund complaint below and offer
the 14-day replacement instead.
Under 90 words, warm, no corporate jargon,
end with one clear next step.
Role sets the voice, Format stops it rambling. The complaint is pasted in, so Context is already there. The reply opened by owning the problem ("a printer that jams three days in isn't good enough, and I'm sorry") and ended with one next step: "Reply yes and it ships this afternoon."
All five: release notes
When the voice must match, bring an example. The prompt gave a role (release notes for a small SaaS team), context (v2.4 ships Friday with dark mode, CSV export and a timezone bug fix), the task, a format of about 80 words with one line per change, and one past entry to copy, which began "Search got fast. Really fast." The answer matched that punchy voice line by line. The example did the heavy lifting; "be punchy" never could.
Worked example: from vague ask to working prompt
Same data, same model, two very different results. The data is 15 support tickets from Brightwave, a subscription analytics product, saved as a CSV. Here are a few rows:
| TicketID | Channel | Message | Status |
|---|---|---|---|
| BW-1041 | Charged twice for the March plan. Need one refunded. | Open | |
| BW-1042 | Chat | App crashes every time I open the Reports tab on Android. | Open |
| BW-1046 | Phone | Third email in a week with no answer. Getting frustrated. | Escalated |
| BW-1048 | Chat | Love the new dashboard. Just wanted to say thanks. | Closed |
Use a fresh chat with no Project and no custom instructions, so the comparison is fair.
Take 1: the lazy ask
Upload the CSV and type:
Summarise these tickets.
What comes back is a readable paragraph that is not wrong, and not usable either. Check it for priority, owner and counts: you won't find them. Nothing here is false. It just doesn't answer a question anyone actually asked.
Take 2: the same job, briefed
You are our customer support lead.
Attached are last week's support tickets from Brightwave, a subscription analytics product.
Group them into themes, count the tickets in each, and tell me which theme to fix first
and why.
Give me a markdown table with columns: Theme, Ticket count, Severity, Recommended owner.
Then one short paragraph titled "Fix this first".
Severity should read like: "High - customers threatening to cancel".
Those five paragraphs are Role, Context, Task, Format and Example, in order. Here's what each one buys you in the answer:
| Part | What it adds to the output |
|---|---|
| Role | A judgement call: it now recommends instead of only describing |
| Context | It knows these are subscription customers, not random messages |
| Task | Counts and a ranked "fix first", instead of a shrug |
| Format | A table you can paste into a stand-up doc |
| Example | Severity reads in your house style, not the model's |
Check your take against the expected result
The data has three main themes built into it, so you can mark Claude's answer:
| Theme | Tickets | Ticket IDs |
|---|---|---|
| Billing errors (double charge, wrong currency, wrong plan rate) | 6 | BW-1041, 1044, 1047, 1051, 1054, 1055 |
| Android app crash on the Reports tab | 4 | BW-1042, 1045, 1049, 1053 |
| Slow or missing response | 4 | BW-1043, 1046, 1050, 1052 |
| Positive feedback | 1 | BW-1048 |
Four tickets are marked Escalated (BW-1046, 1050, 1052 and 1054), and every one is about a broken promise or a repeat failure, not a new problem. That's the "fix this first" signal. If Claude ranks billing first, that's fine. What matters is that it ranks at all, and that it notices the escalations cluster around customers being ignored rather than around one bug.
The model didn't get smarter between take one and take two. The brief did.
Common mistakes
- A vague verb. "Help with this" gives you a shrug. Name the deliverable.
- Two jobs in one prompt. One prompt, one job.
- Describing a tone instead of showing it. One sample sentence beats three adjectives.
- Filling in all five for a quick ask. Match the parts to the size of the job.
Try it yourself
Take a prompt you typed this week. Which of the five parts was missing? Add only the ones the job needs, run it again, and compare. Next, sharpen the answer's shape in Shaping the Output: Format, Tone and Length.
Related course on Udemy
Claude Certified Associate (CCAO-F): Complete Exam Prep
Every domain of the Claude Certified Associate exam, explained.View on Udemy ↗: Claude Certified Associate (CCAO-F): Complete Exam Prep (paid course, opens in a new tab)Related posts
Claude.ai Interface Tour: Every Control You Need on One Screen
Sign in to claude.ai and learn the one screen you'll use for everything: the chat box, the model selector, the sidebar with chats and Projects, the attach and tools row, the Artifacts panel and Settings.
The AI Fluency Model: Delegation, Description, Discernment and Diligence
Most people pick up AI skills in a random order. The AI Fluency Model builds them in sequence: Delegation (what to hand off), Description (asking well), Discernment (judging the output) and Diligence (using it responsibly).
Working With Claude: Pick the Surface, Match the Model, Keep the Context Clear
Three questions every time you use Claude: where do I use it, which model fits, and how do I keep it sharp? Learn the five surfaces, the four model tiers and the context window, with three habits that keep the board clear.
Claude's Four Entry Points: Choose Chat, Projects, Artifacts or Research Before You Type
Before you type, pick the room: Chat for a quick word, Projects for recurring work with your files, Artifacts for a deliverable you'll edit and keep, Research for a deep, cited dig. A decision guide with links to each deep dive.
