The 5-Part Prompt Formula
Role, Context, Task, Format, Constraints — one formula that fixes most weak prompts. Learn each part and start writing prompts that actually work.
Most people do not get weak AI answers because the AI tool is useless.
They get weak answers because their prompt is incomplete.
They ask for “ideas” without saying what kind of ideas. They ask for “better writing” without defining what better means. They ask AI to “make a plan” without explaining the goal, audience, timeline, constraints, or format.
Then the AI gives a generic answer.
And the user thinks, “This sounds impressive, but I still cannot use it.”
That is the exact problem the 5-part prompt formula solves.
The formula is simple:
- Role — who the AI should act as
- Context — the background information it needs
- Task — what you want it to do
- Format — how the answer should be structured
- Constraints — what it should follow or avoid
Once you understand these five parts, prompt engineering becomes much easier. You no longer need to memorize hundreds of random prompts. You can build your own prompts for almost any situation.
This formula works for writing, studying, marketing, freelancing, business planning, productivity, coding, research, professional communication, and daily work.
A beginner prompt says:
Write a blog post about productivity.A stronger prompt says:
Act as a productivity coach for remote workers.
Context: My audience is beginner remote workers who struggle with focus and planning.
Task: Write a 1,200-word blog post about how to plan a focused workday.
Format: Use an H1 title, short introduction, 5 H2 sections, practical examples, and a conclusion with a clear takeaway.
Constraints: Avoid generic motivation, avoid jargon, and include at least 3 specific daily routines.Both prompts ask for a blog post.
But the second prompt gives the AI a complete working brief.
That is the difference between casual prompting and useful prompting.
Why This Formula Works
AI tools are extremely good at pattern completion. They can write, summarize, compare, rewrite, classify, brainstorm, analyze, and plan.
But they need direction.
If you give AI a vague request, it fills in the missing details with assumptions. Sometimes those assumptions are fine. Often, they are not.
For example, if you ask:
Write an email to my client.The AI has to guess:
- What is the email about?
- Who is the client?
- Is the tone friendly, formal, apologetic, persuasive, or urgent?
- What outcome do you want?
- Should the email be short or detailed?
- Is there any sensitive context?
- Should it include a call to action?
Because you did not give those details, the AI chooses a generic path.
Now compare that with this:
Act as a professional client communication coach.
Context: I am a freelance web designer. My client has not sent homepage feedback for 5 days, and the project deadline may slip if I do not receive it by tomorrow.
Task: Write a polite follow-up email asking for feedback and explaining the timeline risk without sounding pushy.
Format:
- Subject line
- Short greeting
- 2 short body paragraphs
- Clear next step
- Friendly sign-off
Constraints:
- Keep it under 160 words
- Do not blame the client
- Sound calm, professional, and helpfulThis prompt gives the AI enough information to produce something you can actually send.
The 5-part formula works because it answers the questions the AI would otherwise have to guess.
Part 1: Role — Tell AI Who to Act As
The role tells the AI what perspective to use.
This is often the fastest way to improve a prompt.
Instead of saying:
Review my resume.Say:
Act as a senior resume writer who specializes in helping marketing professionals apply for remote roles.Instead of saying:
Give me content ideas.Say:
Act as a content strategist for small business owners who sell digital products.Instead of saying:
Check my landing page.Say:
Act as a conversion copywriter and landing page auditor.The role changes the style of thinking.
A teacher explains differently from a consultant. A senior editor reviews differently from a casual reader. A debugging expert analyzes code differently from a general assistant. A career coach gives different feedback than a recruiter.
The better the role, the better the lens.
Good Roles to Use
Here are some useful roles you can reuse:
- Writing coach
- Senior editor
- SEO strategist
- Content strategist
- Career coach
- Resume writer
- Business analyst
- Startup advisor
- Marketing consultant
- Productivity coach
- Project manager
- Research analyst
- Customer support expert
- Sales copywriter
- Curriculum designer
- Debugging expert
- Financial planning assistant
- Executive communication coach
The role should match the task.
If you are asking for feedback on an article, use a senior editor. If you are planning content, use a content strategist. If you are improving an email to your boss, use an executive communication coach. If you are studying for an exam, use a tutor.
Weak Role vs Strong Role
Weak role:
Act as an expert.This is too broad.
Strong role:
Act as a senior SEO content strategist who helps beginner bloggers create practical articles that rank and convert without keyword stuffing.This is much better because it defines the expertise, audience, and quality standard.
You do not always need a long role. But when the task matters, specificity helps.
Part 2: Context — Give the Background Information
Context is the part most beginners skip.
They assume AI already understands their situation. It does not.
Context tells the AI what is going on, who the output is for, why the task matters, and what details should shape the answer.
Without context, AI gives general advice.
With context, AI gives relevant advice.
For example:
Give me LinkedIn post ideas.This is too broad.
Better:
Context:
- I am a freelance graphic designer
- My audience is small business owners
- I want to attract clients for logo and brand identity work
- My tone should be helpful, practical, and not salesy
- I want posts that show expertise without sounding like a pitchNow the AI has something to work with.
Useful Types of Context
You can include context such as:
- Your audience
- Your goal
- Your industry
- Your skill level
- Your current problem
- Your product or service
- Your tone preference
- Your timeline
- Your budget
- Your existing draft
- Your examples
- Your constraints
- Your location or market
- Your platform
- Your desired outcome
You do not need to include all of these every time.
For simple tasks, one or two lines of context may be enough.
For important tasks, more context usually creates a better output.
Example: Too Little Context
Create a study plan.The AI does not know the subject, deadline, current level, available time, or goal.
Example: Better Context
Create a study plan.
Context:
- Subject: beginner Python programming
- Deadline: 30 days
- Current level: I understand basic variables and loops but struggle with functions
- Time available: 1 hour per day on weekdays and 3 hours on weekends
- Goal: build a small calculator app by the endThat context changes everything.
The output can now be realistic.
Part 3: Task — Say Exactly What You Want
The task is the action you want the AI to perform.
This should be direct.
A weak task sounds like:
Help with my website.A stronger task sounds like:
Review my homepage copy and identify the top 5 reasons visitors may not understand the offer.A weak task:
Give me advice about my career.A stronger task:
Compare these 3 career paths based on income potential, learning curve, job availability, and fit with my current skills.The task should answer: what should the AI actually do?
Common Task Verbs
You can use verbs like:
- Write
- Rewrite
- Summarize
- Compare
- Analyze
- Review
- Critique
- Improve
- Generate
- Brainstorm
- Explain
- Simplify
- Translate
- Organize
- Classify
- Score
- Audit
- Plan
- Diagnose
- Recommend
- Convert
- Extract
- Format
The clearer the verb, the clearer the output.
Bad Task vs Better Task
Bad:
Help me with SEO.Better:
Create an SEO content brief for the keyword “AI prompts for students.” Include search intent, H1, meta description, H2 outline, FAQs, internal link ideas, and CTA angle.Bad:
Make this email good.Better:
Rewrite this email to sound professional, concise, and diplomatic. Keep the main message the same, but make the call to action clearer.Bad:
Explain this topic.Better:
Explain this topic to a complete beginner using a simple definition, one analogy, one example, and a 5-question quiz at the end.A clear task gives the AI direction.
Part 4: Format — Control the Shape of the Answer
Format is where many prompts become dramatically more useful.
AI can produce good information, but if the structure is messy, you still have to clean it up.
The format tells AI how to organize the answer.
For example, instead of saying:
Give me a project update.Say:
Format the update as:
- Completed this week
- In progress
- Blockers
- Decisions needed
- Priorities for next weekInstead of saying:
Compare these tools.Say:
Create a comparison table with these columns:
- Tool
- Best for
- Pros
- Cons
- Price level
- RecommendationFormat turns an answer into a usable deliverable.
Useful Output Formats
You can ask for:
- Bullet points
- Tables
- Step-by-step plans
- Checklists
- Templates
- Scripts
- Email drafts
- Content briefs
- Lesson plans
- Comparison matrices
- Scoring rubrics
- JSON
- Markdown
- HTML
- Executive summaries
- Slide outlines
- FAQs
- Action plans
The format should match how you plan to use the output.
If you need to make a decision, ask for a comparison table.
If you need to take action, ask for a checklist.
If you need to publish content, ask for headings and sections.
If you need to brief someone else, ask for a structured document.
Example Format Instruction
Format your answer as:
1. Quick diagnosis
2. Main problem
3. Recommended fix
4. Step-by-step action plan
5. Mistakes to avoid
6. Final checklistThis simple addition gives the answer shape.
Part 5: Constraints — Tell AI What to Follow or Avoid
Constraints are the quality control layer of your prompt.
They tell the AI what boundaries to respect.
Most generic AI output happens because there are no constraints.
For example:
Write a blog introduction about productivity.This may produce something bland like:
“In today’s fast-paced world, productivity is more important than ever.”
If you do not want that style, say so.
Better prompt:
Write a blog introduction about productivity for remote workers.
Constraints:
- Do not start with “in today’s fast-paced world”
- Avoid generic motivation
- Use a specific workplace situation
- Keep paragraphs short
- Make the reader feel understoodConstraints prevent lazy output.
Useful Constraints
You can control:
- Length
- Tone
- Reading level
- Style
- Audience
- Examples
- Assumptions
- Jargon
- Source use
- Structure
- What to include
- What to avoid
- Level of detail
- Risk level
- Creativity level
Examples:
Keep each bullet under 20 words.Use examples from small businesses.Avoid motivational filler.Do not invent statistics.Ask clarifying questions if important information is missing.Use short paragraphs and plain English.Give direct feedback. Do not flatter the idea.Constraints make the AI more predictable.
They also help you avoid outputs that sound polished but are not useful.
The Full 5-Part Prompt Template
Here is the full template you can reuse:
Act as a [ROLE].
Context:
[EXPLAIN THE SITUATION, AUDIENCE, GOAL, AND IMPORTANT DETAILS]
Task:
[EXPLAIN EXACTLY WHAT YOU WANT THE AI TO DO]
Format:
[EXPLAIN HOW THE OUTPUT SHOULD BE STRUCTURED]
Constraints:
- [RULE 1]
- [RULE 2]
- [RULE 3]This template is simple, but it can handle most everyday AI tasks.
Here is the same template filled in for a real use case.
Act as a senior content strategist.
Context:
I run a blog for beginner freelancers. My audience wants practical advice on finding clients without sounding desperate or spammy. I want to write an article that teaches a simple outreach system.
Task:
Create a detailed blog post outline for the topic: “How to Find Your First 5 Freelance Clients.”
Format:
- SEO-friendly title
- Short introduction angle
- 6 H2 sections
- Bullet points under each section
- 3 practical examples
- Conclusion with CTA
Constraints:
- Avoid fake income claims
- Avoid generic advice like “network more”
- Keep the advice beginner-friendly
- Include examples for writers, designers, and virtual assistantsThis is a strong prompt because every part has a job.
The role sets expertise.
The context explains the audience and goal.
The task defines the deliverable.
The format makes the answer easy to use.
The constraints protect quality.
Before-and-After Example: Blog Writing
Bad prompt:
Write a blog post about productivity.Why it fails:
- No audience
- No angle
- No word count
- No structure
- No examples
- No quality rules
- No clear takeaway
Better prompt:
Act as a productivity coach for remote workers.
Context:
My audience is beginner remote workers who struggle with focus, distractions, and planning their day.
Task:
Write a 1,200-word blog post about how to plan a focused workday.
Format:
- H1 title
- Short introduction
- 5 H2 sections
- Practical examples
- Conclusion with a clear takeaway
Constraints:
- Avoid generic motivation
- Avoid jargon
- Include at least 3 specific daily routines
- Use short paragraphsWhy it works:
- The AI knows who it is writing for
- The topic is specific
- The structure is clear
- The style is controlled
- The examples are required
- The final output is easier to edit and publish
Before-and-After Example: Email Writing
Bad prompt:
Write a follow-up email.Better prompt:
Act as a client communication specialist.
Context:
I sent a proposal to a potential client 6 days ago and have not received a response. I want to follow up without sounding desperate or pushy.
Task:
Write a polite follow-up email that reopens the conversation and asks whether they have any questions.
Format:
- Subject line
- Greeting
- 2 short body paragraphs
- Soft call to action
- Sign-off
Constraints:
- Keep it under 120 words
- Do not use pressure tactics
- Sound professional, calm, and helpfulThis prompt produces a much better email because it defines the situation and emotional tone.
Before-and-After Example: Learning
Bad prompt:
Explain marketing.Better prompt:
Act as a beginner-friendly marketing teacher.
Context:
I am a small business owner with no marketing background. I want to understand the basics before promoting my product online.
Task:
Explain what marketing is and how it works.
Format:
- Simple definition
- 5 key concepts
- One real-world example
- Common beginner mistake
- 5-question quiz
Constraints:
- Use plain English
- Avoid academic jargon
- Keep examples relevant to small businessesThe better prompt turns a broad topic into a useful lesson.
How to Know Which Parts You Need
You do not need all five parts for every single prompt.
For very simple tasks, a short prompt is fine.
For example:
Rewrite this sentence in simpler English: [SENTENCE]That is enough.
But the more important the output, the more the five-part formula helps.
Use the full formula when:
- You need publishable content
- You are writing professional communication
- You are making a decision
- You are creating a plan
- You are asking for strategy
- You are working with client-facing material
- You need a reusable template
- You want consistent output quality
A good rule:
If you care about the quality of the answer, give the AI a better brief.
Quick Checklist: Is Your Prompt Complete?
Before you send an important prompt, ask:
- Did I give the AI a useful role?
- Did I explain the situation clearly?
- Did I define the exact task?
- Did I specify the output format?
- Did I include constraints to prevent generic output?
- Did I say who the output is for?
- Did I explain what good looks like?
- Did I mention what to avoid?
If your prompt answers most of these questions, it will usually perform better.
Exercise: Rewrite These 5 Bad Prompts
Use the 5-part formula to improve the prompts below.
Bad Prompt 1
Write a LinkedIn post.Improve it by adding:
- Role
- Audience
- Topic
- Format
- Tone
- Constraints
Bad Prompt 2
Help me study.Improve it by adding:
- Subject
- Current level
- Deadline
- Study format
- Desired outcome
Bad Prompt 3
Give me business ideas.Improve it by adding:
- Skills
- Budget
- Time available
- Target market
- Risk limits
- Output format
Bad Prompt 4
Make this email better.Improve it by adding:
- Recipient
- Goal
- Tone
- Situation
- Length limit
- What to avoid
Bad Prompt 5
Create a marketing plan.Improve it by adding:
- Product
- Audience
- Budget
- Platform
- Timeline
- Success metric
- Format
Do not try to make the prompts perfect.
Just make them clearer than the originals.
That is how prompt engineering improves: one layer of clarity at a time.
Final Takeaway
The 5-part prompt formula is one of the easiest ways to improve your AI results.
You do not need to sound technical. You do not need to use complicated prompt language. You do not need to copy huge templates.
You only need to answer five questions:
Who should the AI act as?
What background does it need?
What should it do?
How should the answer be structured?
What rules should it follow?
That is Role, Context, Task, Format, and Constraints.
Once you understand this formula, you can build prompts for almost anything: emails, blog posts, study notes, resumes, business plans, SEO briefs, content calendars, research summaries, project updates, and daily productivity systems.
In the next chapter, we will make this even more practical by comparing bad prompts and good prompts side by side, with 20 before-and-after examples you can learn from and adapt.