Race Prompting Framework
Definition
RACE is a structured prompting framework designed to reduce ambiguity and improve the quality of AI outputs. It works by breaking a prompt into four deliberate components — Role, Action, Context, and Execute/Expected Output — ensuring the model has everything it needs to respond with precision. Rather than prompting by instinct, RACE makes prompt construction a repeatable, teachable process.
The Four Components
R — Role
Who should the AI be?
Assign a persona or professional identity to the model. This anchors the tone, vocabulary, and expertise level of the response.
Ask yourself: What expert or specialist would give the best answer to this question?
A — Action
What should the AI do?
State the specific task clearly. Use precise verbs — write, summarise, compare, explain, generate — rather than vague instructions.
Ask yourself: What exact output do I need? One word, a list, a draft, a table?
C — Context
What background matters?
Provide relevant details — audience, constraints, purpose, or any information the model needs to tailor its response correctly.
Ask yourself: What does the AI need to know about my situation to avoid a generic answer?
E — Execute / Expected Output
What should the result look like?
Define the format, length, structure, or tone of the final output. This is where you set the standard for what “done” looks like.
Ask yourself: Should this be bullet points? A paragraph? Under 200 words? Formal or conversational?
How to Use the Framework
Think of RACE as filling in four slots before you send any prompt. You don’t need to label each part explicitly (though you can), but every component should be present.
- Start with the Role — this orients the model’s knowledge and voice before it reads the rest of your prompt.
- State the Action using a precise verb so the model knows exactly what to produce.
- Add Context to eliminate guesswork about your audience, constraints, or goals.
- Define the Expected Output so the model knows what “done” looks like in terms of format, length, and tone.
The order doesn’t need to be rigid. What matters is that all four elements are represented. A prompt missing even one element will typically produce a response that’s too generic, too long, or off-tone.
Quick rule of thumb: If you’re unhappy with an AI response, audit it against RACE. Usually, a weak response traces back to a missing or vague Context, or an Expected Output that wasn’t specified at all. That’s the most common failure point.
Examples
Example 1 — Writing a Job Posting
| Component | Input |
|---|---|
| R — Role | Act as a senior HR manager with 10 years of experience in talent acquisition. |
| A — Action | Write a job description for a mid-level data analyst position. |
| C — Context | The company is a fintech startup with 50 employees. The role requires Python, SQL, and strong communication skills. The team values autonomy and fast iteration. |
| E — Expected Output | Output a concise posting under 300 words with clearly separated sections: About the Role, Responsibilities, Requirements, and Nice to Haves. Tone should be professional but approachable. |
Example 2 — Explaining a Complex Concept
| Component | Input |
|---|---|
| R — Role | Act as a university professor who specialises in behavioural economics. |
| A — Action | Explain the concept of loss aversion. |
| C — Context | My audience is a group of first-year marketing students with no prior economics background. They learn best through real-world examples. |
| E — Expected Output | Write 3 short paragraphs. Include one everyday example, avoid academic jargon, and end with a one-sentence takeaway the students can memorise. |