AI & Automation

Write a Prompt That Works (Role, Task, Context, Example)

Updated July 21, 2026·5 min read

What it is

A prompt is the instruction you give an AI model like Claude. A vague prompt gets a vague answer. A structured prompt spells out four things: the role you want the model to take, the task you want done, the context it needs, and an example of what good output looks like.

Think of it like briefing a sharp new hire who has no idea what you want until you tell them. "Write something about our product" is a shrug. "You're a copywriter. Write a 40-word product blurb for busy parents. Here's the product spec. Here's an example blurb in the tone I like." is a brief they can actually follow.

Time & frequency

A few minutes per prompt. Reuse the same four-part shape every time you ask Claude for real work.

How to do it

  1. 1Set the role. Tell Claude who to be for this task: "You are an editor who cuts fluff." Even one sentence changes the tone and focus.
  2. 2State the task plainly, as an instruction. Say what to do, not what to avoid: "Summarize this in five bullet points," not "don't be too long."
  3. 3Give the context it needs — the source text, the audience, the constraints, the format. Paste the material; don't make it guess.
  4. 4Show one example of good output. A single well-chosen example steers format and tone more than another paragraph of instructions. Wrap it so it's clearly an example, not part of the task.
  5. 5Put the long material near the top and your instruction after it, then send it to Claude at claude.ai.
  6. 6Read the output against your example. If it missed, fix the part that was unclear — usually the task line or the example — and run it again.

Why it works

A model follows a clear spec better than a vague one. When you name the role, state the task as a direct instruction, hand over the context, and show an example, you remove the ambiguity the model would otherwise fill in on its own. Anthropic's prompting guidance makes each of these a named technique: be clear and direct, add context, give Claude a role, and use examples (few-shot or "multishot" prompting).

The example does a lot of the work. Anthropic calls examples "one of the most reliable ways to steer Claude's output format, tone, and structure." This write-up teaches the structure — role, task, context, example — as a repeatable way to write the instruction. The rep is turning a one-line ask into a four-part brief.

Common mistakes

  • Asking for the moon in one line. "Make this better" gives Claude nothing to aim at. Say what "better" means.
  • Listing what you don't want. "Don't be formal" is weaker than "write it like a text to a friend." Tell it what to do.
  • Skipping the example. If you know what good looks like, show one. It beats another paragraph of adjectives.
  • Burying the source text below the instruction. Put the long material first, your ask last.

Practice it now

Write a role-task-context-example prompt

Turn a vague ask into a four-part brief for Claude. Free, no signup.

  • Write the role: "You are a ___."
  • Write the task as a plain instruction.
  • Paste the context — source text, audience, format.
  • Add one example of good output, then send it to Claude at claude.ai.

Coherent Education

You just got the skill for free. The coached version is where it sticks.

seven live tracks, 58 coach-guided lessons, and games that train the skill — with a rep log so you can watch the work add up.

See the tracks

These are skills and practices, not medical or mental-health treatment. Nothing here diagnoses, treats, or claims to change any health condition. If you're dealing with a medical or mental-health issue, talk to a qualified professional.