The Five-Part Prompt Framework
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
| Part | Question it answers | Example phrase |
|---|---|---|
| 1. Role | Who should the model act as? | "You are a patient AI teacher for small-business owners." |
| 2. Context | What background does it need? | "I own a small bakery with four staff, and I'm new to AI." |
| 3. Task | What exactly should it do? | "Explain AI automation and suggest three tasks I could automate." |
| 4. Constraints | What limits or rules apply? | "Plain words, under 200 words, only free or low-cost tools." |
| 5. Output | What shape should the answer take? | "A two-sentence intro, then a numbered list." |
The Full Example
Put together, the five parts make one prompt:
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
| Tip | Why |
|---|---|
| Start with the task, then add the parts that matter | Short prompts are fine when the task is simple |
| Put the most context into the Context part | Specific facts beat general descriptions |
| Make constraints measurable | "Under 200 words" works better than "short" |
| Show the output shape | A 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:
- Name the five parts in order.
- What does the Constraints part do, and why should it be measurable?
- Which part can never be left out?
Key Takeaways
Quick reference
| Part | Ask yourself |
|---|---|
| Role | Who should the model be? |
| Context | What does it need to know? |
| Task | What exactly should it do? |
| Constraints | What limits apply? |
| Output | What should the answer look like? |
Was this tutorial helpful?