The Five-Part Prompt Framework

Updated · 5 min read

Is there a checklist for writing a good prompt? Navika runs a small online shop in Dallas and wants AI to help her automate some work, but her first prompts get vague, jargon-filled answers. She doesn't need clever wording; she needs to cover the right parts.

This lesson gives you a simple checklist: the five-part prompt framework. Role, Context, Task, Constraints, Output.

The Five Parts

PartQuestion it answersExample phrase
1. RoleWho should the model act as?"You are a patient AI teacher for small-business owners."
2. ContextWhat background does it need?"I own a small bakery with four staff, and I'm new to AI."
3. TaskWhat exactly should it do?"Explain AI automation and suggest three tasks I could automate."
4. ConstraintsWhat limits or rules apply?"Plain words, under 200 words, only free or low-cost tools."
5. OutputWhat shape should the answer take?"A two-sentence intro, then a numbered list."
Five parts, one clear prompt

The Full Example

Put together, the five parts make one prompt:

text
You are a patient AI teacher for small-business owners.
I own a small bakery in Dallas with four staff, and I am new to AI.
Explain what AI automation is, and suggest three tasks in my bakery I could automate.
Use plain words, no jargon, under 200 words, and only free or low-cost tools.
Start with a two-sentence explanation, then a numbered list: for each task,
give the task, the kind of tool, and the time it could save each week.

Each line removes a guess. Without the role, the tone might be too technical; without the context, the tasks might suit a factory; without the constraints, the tools might be expensive; without the output, you might get an essay. The task line is the only one you can never leave out.

Using It Well

TipWhy
Start with the task, then add the parts that matterShort prompts are fine when the task is simple
Put the most context into the Context partSpecific facts beat general descriptions
Make constraints measurable"Under 200 words" works better than "short"
Show the output shapeA small template or example of the format helps most

Common Mistakes

Making the role do all the work. "You are an expert" helps a little; context and constraints help much more.

Leaving constraints vague. "Not too long" means different things to different people.

Writing all five parts for a one-line question. Use the framework to check, not to pad.

Interview Corner

What is the five-part prompt framework?

Role, Context, Task, Constraints and Output: who the model should act as, what background it needs, exactly what to do, what limits apply, and what shape the answer should take.

Which part of a prompt matters most?

The task, because without it the model doesn't know what to do. After that, specific context and measurable constraints usually improve answers the most.

Practice

Exercise: one prompt per role. Write a five-part prompt for each person, then test it and improve one part: a student preparing for an exam, a developer learning Python, a business owner analyzing sales, a product owner preparing requirements, and a professional learning a new technology. Which part did you improve most often?

Check your understanding:

  1. Name the five parts in order.
  2. What does the Constraints part do, and why should it be measurable?
  3. Which part can never be left out?

Quick check: the five-part framework

4 questions
1Which list shows the five parts?
2"Use only free or low-cost tools" belongs to which part?
3Which constraint is most useful?
4"Start with two sentences, then a numbered list" is which part?

Key Takeaways

Quick reference

PartAsk yourself
RoleWho should the model be?
ContextWhat does it need to know?
TaskWhat exactly should it do?
ConstraintsWhat limits apply?
OutputWhat should the answer look like?

Was this tutorial helpful?

Lesson 35 of 186