Frameworks

The RACE framework for prompting

RACE stands for Role, Action, Context, and Expectation. It is a four-part checklist for turning a vague request into a brief the model can actually act on. We named Promptrace after it because the four parts map cleanly onto what separates a prompt that works from one that produces filler.

The appeal of RACE is that it is short enough to remember and apply in your head. You will not reach for a template every time, but you will start noticing which of the four parts you left out, and that is usually where the weak output was coming from.

Last reviewed

R is for Role: who should the AI be?

Role is the part of a RACE prompt that tells the model who to be, set before you tell it what to do. A role sets a soft prior over vocabulary, tone, and the kind of evidence the answer reaches for. "You are a senior tax accountant" and "explain this tax rule" produce very different answers to the same underlying question.

The more specific the role, the stronger the effect. Name the seniority and the domain, and where it matters, name the audience the role usually speaks to. A role is not flattery for the model; it is a shortcut that loads a whole register of expertise in a few words.

Weak

Give me some feedback on my CV.

Strong

You are a technical recruiter who has screened thousands of software engineering CVs for Series-B startups.

A is for Action: what should it do?

Action is the task itself, stated with a concrete verb. Write, analyse, compare, summarise, classify, rewrite, refactor: each one points the model at a specific kind of output. Vague verbs like "help with" or "look at" make the model guess, and it often guesses wrong.

If you have more than one thing to do, number them. A single run-on sentence with three buried requests usually gets one of them answered well and the other two ignored.

Weak

Can you help me with my landing page?

Strong

(1) Rewrite the headline below for clarity. (2) Suggest three alternative subheads. (3) Flag any claim that needs evidence.

C is for Context: what does it need to know?

Context is the background a new collaborator would need on day one. Who is the audience? What is the goal? What has already been decided? What constraints come from the brief? The model has no memory of you or your project, so anything you leave unsaid, it invents.

Context is usually the cheapest quality upgrade available. Two sentences at the top of a prompt that explain who the work is for and why it exists will lift the output more than almost any clever phrasing.

Weak

Write a product description for a candle.

Strong

Write a product description for a 35 GBP soy candle sold by a small UK brand whose voice is warm and plain-spoken. The buyer is a 30 to 45 year old shopping for their own home.

E is for Expectation: what should the answer look like?

Expectation is where you spell out what the finished answer should look like. Format, length, structure, and tone all belong here. Do you want a markdown table, a numbered list, JSON, or three short paragraphs? How long? In what voice? If you do not say, you get the model's default, which is usually a wall of prose.

Expectation also covers the guardrails: what to avoid, what to leave out, which words you never want to see. Naming the shape of a good answer up front saves you a round of "no, not like that".

Weak

Compare these three project management tools.

Strong

Compare these three tools as a markdown table with columns for Price, Best for, and Biggest weakness. Keep each cell under twelve words. British English, no marketing buzzwords.

What does a full RACE prompt look like?

A full RACE prompt stacks all four parts into a single, natural brief, not a rigid form. You write a clear brief that happens to cover all four bases. Here is a complete example.

Full RACE prompt
You are a senior content strategist at a B2B SaaS company. (Role)

Write a 600-word blog intro and outline. (Action)

The topic is why event sourcing makes audit logs cheaper. The audience is CTOs at Series-B fintechs who already understand databases but not event sourcing specifically. The goal is to book demos, not to teach theory. (Context)

Return a hook of two sentences, then a numbered outline of six sections with a one-line summary each. British English. No jargon without a plain-English gloss. (Expectation)

How does RACE map to the seven scoring dimensions?

RACE is the pocket version of the Promptrace scorer, which breaks the same idea into seven measurable dimensions: role, task clarity, specificity, context, output format, constraints, and examples. Role maps to R, action covers task clarity, context covers context and specificity, and expectation covers format and constraints. The seventh dimension, examples, is the one RACE does not name explicitly, which is why pairing RACE with a worked example or two tends to push a good prompt to a great one.

Use RACE when you are writing quickly and want a mental checklist. Run the result through the scorer when you want to see exactly which dimension is still soft.

Key takeaways

  • RACE stands for Role, Action, Context, Expectation.
  • Role sets the register, Action names the task with a concrete verb, Context supplies the background, Expectation defines the shape of the answer.
  • It is a mental checklist, not a rigid template: write a natural brief that covers all four.
  • Add a worked example to cover the one thing RACE leaves out, and you have the full seven-dimension picture.

See how your prompt scores

Paste any prompt into the free Promptrace scorer and get an instant breakdown across all seven dimensions. No signup.

Open the prompt scorer →

Frequently asked questions

What does RACE stand for in prompt engineering?

RACE stands for Role, Action, Context, and Expectation. You assign the model a role, state the action you want with a concrete verb, supply the context it needs, and describe the expected output. It is a four-part checklist for writing clear prompts.

Is the RACE framework better than CRISPE?

Neither is strictly better; they suit different moments. RACE is shorter and faster to apply in your head, which makes it a good default. CRISPE adds a personality step and an experiment step, so it is useful when tone matters a lot or when you want the model to generate several variations to compare.

Does RACE work with Claude and Gemini as well as ChatGPT?

Yes. RACE describes how to brief any capable large language model, so it works the same way with Claude, Gemini, Llama, Mistral, and ChatGPT. The framework is about the information you supply, not about model-specific syntax.

Sources and further reading

Related guides