๐Ÿง˜โ€โ™‚๏ธ PromptVibe

RACE Prompt Framework

RACE = Role, Action, Context, Explanation. A prompt framework designed for educational and explanatory content. Specify the AI's teaching role, the topic or action, the audience context, and how the explanation should be structured.

When to Use RACE

Use the RACE framework when:

  • You need to explain a complex topic to a specific audience โ€” beginners, students, executives, or domain specialists.
  • You are creating learning materials, course content, explainer articles, or training documentation.
  • The audience's knowledge level should directly shape the depth, vocabulary, and examples used.
  • You want the AI to adopt a teaching style โ€” use analogies, examples, or Socratic questions โ€” rather than just presenting facts.

When Not to Use RACE

  • Action-oriented tasks โ€” use APE for data analysis, code generation, or process automation.
  • Professional tasks with detailed constraints โ€” use ROLE when output format, limitations, and expert persona all matter.
  • Simple direct requests โ€” use TAG for quick, unambiguous tasks.

RACE Framework Template

Role: [AI's teaching persona or expertise] Action: [What to explain or create] Context: [Audience level, background, or setting] Explanation: [How to structure the explanation โ€” analogies, depth, format]

Example: Teaching a Complex Topic

Before (weak prompt):

Explain machine learning

After (structured prompt):

Role: Patient and clear data science educator who specializes in explaining technical concepts to non-technical audiences Action: Explain how machine learning models learn from data, covering supervised learning, training, and overfitting Context: Audience is marketing professionals with no coding background; they understand A/B testing and basic statistics Explanation: Use real-world analogies from marketing (e.g., ad targeting, email segmentation); avoid math notation; structure as: concept overview, analogy, practical example, one key takeaway per section

Example prompt:

You are a patient data science educator specializing in non-technical audiences. Explain how machine learning models learn from data โ€” cover supervised learning, training, and overfitting. My audience is marketing professionals who understand A/B testing and basic stats but have no coding background. Use marketing analogies like ad targeting and email segmentation. Avoid math notation. Structure each section as: concept overview, analogy, practical example, and one key takeaway.

Example: Academic Writing Support

Before (weak prompt):

Help me understand supply and demand

After (structured prompt):

Role: Economics professor teaching an introductory undergraduate course Action: Explain the law of supply and demand, including what causes shifts in each curve and how equilibrium price is determined Context: First-year university students who have not studied economics before; this is their second lecture Explanation: Use a concrete everyday example (e.g., coffee prices); define each term before using it; include a summary table at the end comparing factors that shift supply vs demand

Example prompt:

Act as an economics professor teaching an intro undergraduate course. Explain the law of supply and demand to first-year students in their second lecture โ€” no prior economics background. Cover what causes shifts in each curve and how equilibrium price is determined. Use a concrete everyday example like coffee prices. Define every term before using it. End with a summary table comparing factors that shift supply versus demand.

How to Write a RACE Prompt โ€” Step by Step

  1. Define the Role. Describe the AI teaching persona โ€” e.g., a patient high school teacher, a senior data scientist, a Socratic tutor.
  2. State the Action. Specify what to explain, teach, or create โ€” the topic, concept, or learning objective.
  3. Describe the Context. Define the audience โ€” their knowledge level, background, age group, or the learning setting.
  4. Specify the Explanation. Define how the explanation should be structured โ€” analogies, depth, format, length, and any teaching techniques to use or avoid.

Frequently Asked Questions

What does RACE stand for in prompt engineering?

RACE stands for Role, Action, Context, Explanation. It is a four-part prompt framework designed for educational and explanatory content. It assigns the AI a teaching role, specifies the topic, defines the audience context, and controls how the explanation should be structured.

When should I use RACE instead of ROLE?

Use RACE when the primary goal is to explain, teach, or create educational content for a specific audience. Use ROLE when the task requires a professional expert persona with output constraints and limitations that go beyond explanation.

Is RACE good for creating learning materials?

Yes, RACE is purpose-built for learning material creation. The Context component ensures the AI calibrates complexity for the audience, and the Explanation component lets you specify teaching techniques โ€” analogies, examples, Socratic questions, or step-by-step breakdowns.

Try the Prompt Generator โ†’

Also see: All AI Prompt Frameworks ยท AI Prompt Optimizer