How to write a good prompt a simple structure that works
The five parts every strong prompt has, and what the AI guesses when you leave one out.
In short
A good prompt has five parts: a role, the context, the task, the format you want, and one example. Miss one and the AI guesses.
- Name the role first: 'You are my editor,' 'Act as a data analyst.' It shifts the model's depth and tone instantly.
- State the task with an action verb and give the background it cannot know: numbers, audience, constraints.
- Say the format you want: a table, three bullets, a short paragraph. You get what you specify.
- Add one example of a good answer when tone or style matters. Showing beats describing.
The five parts of a good prompt
Learning how to write a good prompt is mostly learning what to stop leaving out. A strong prompt has five parts: the role the AI should play, the context it needs, the task in plain terms, the format you want back, and, when it matters, one example. Practitioners shorthand the core of this as RTF, for role, task, format. Skip any part and the model fills the gap with an average guess. That is where most 'the AI gave me something generic' complaints come from. A generic or wrong answer is almost always a missing part, not a weak model. Two parts do the most work on their own: giving the AI a role and showing it examples. Together they are the foundation of prompt engineering.
How to write a good prompt, part by part
Five parts, in order: role, context, task, format, example.
- 1
Role
Start with who the AI should be: 'You are a hiring manager,' 'Act as my copy editor.' The role sets its vocabulary, standards, and depth.
- 2
Context
Give the background it cannot guess: who the audience is, the numbers, the constraints, the goal. This is the part people skip most.
- 3
Task
State what you want with one action verb: summarize, compare, rewrite, draft, critique. Vague verbs get vague output.
- 4
Format
Name the shape of the answer: a table with these columns, three bullets, a 100-word paragraph, a checklist. You get what you ask for.
- 5
Example
When tone or style matters, paste one example of a good answer. One sample teaches more than three sentences of description.
Vague vs structured: same request, different result
| Vague prompt | Structured prompt | |
|---|---|---|
| What you type | Write something about our new feature. | You are a product marketer. Write a 90-word post for busy managers announcing feature X, which does Y. End with a question. |
| What you get | A generic paragraph you have to rewrite | A usable draft in your format, on the first try |
| Why | The model guessed the role, audience, length, and goal | You supplied all four, so it had nothing to guess |
The RTF template to fill in
Watch-outs
- Front-load the role and task. Models weight the start of a prompt most.
- One task per prompt. Stack three and it does the first well and the rest poorly.
- If the answer misses, do not rewrite from scratch. Add the one part you left out.
Common questions
What makes a good AI prompt?
Five parts: a role for the AI, the context it needs, a clear task with an action verb, the format you want back, and one example when tone matters. That is most of how to write a good prompt: include all five and the model has nothing left to guess, which is what makes an answer feel generic.
What is the RTF prompt framework?
RTF stands for Role, Task, Format: name who the AI should act as, state the task clearly, and specify the output format. RTF is the quickest version of how to write a good prompt and covers most everyday requests; add context and an example when the task is bigger.
Why do I get generic answers from AI?
Because the prompt left out a part the model then had to guess: usually the role, the context, or the format. Add the missing piece and the same question returns a specific answer. Generic output is a prompt problem far more often than a model problem.
How long should a prompt be?
As long as it takes to include the parts that matter, and no longer. A specific two-line prompt beats a rambling paragraph. Add context and an example only when the task needs them.
See how you actually work with AI
The AI Skills Quiz scores your real habits, including how you brief the model before you ask. Free, and it takes a couple of minutes.
Professionals from these companies build their AI skills with Candova
The future belongs to AI‑native companies.
Make sure yours is one.
We make your people AI-fluent so your company becomes AI-native, with Cando, a personal AI trainer for every employee. Start with Candova AI today.
Free to start · Productivity gain guarantee · Built for your real job