Introduction
Ever wondered why some prompts produce clear, powerful results from AI, while others give vague or irrelevant responses?
The secret lies in the structure of the prompt.
AI models like ChatGPT, Claude, and Gemini are trained to understand and respond to context. The better your prompt structure, the better the result.
In this guide, we’ll break down a powerful 5-part formula to master prompt engineering:
Role → Task → Style → Format → Constraints

Let’s dive in.
🧱 1. Role: Who is the AI acting as?
This sets the persona or perspective the AI should take.
You’re telling the AI to “play a role,” which helps generate more relevant, domain-specific responses.
🔹 Why Role Matters:
Without a role, the AI responds generically.
With a role, it adapts to your needs more accurately.
🧠 Examples:
- “You are a financial advisor…” → Expect investment suggestions.
- “Act as a resume expert…” → Get better feedback on CVs.
- “Imagine you are a mindfulness coach…” → Responses will be calming and focused on wellness.
✅ Pro Tip:
Use roles that match the tone and expertise you want in the reply.
📌 2. Task: What do you want it to do?
This is the core action or job.
Clearly define what you expect from the AI.
🔹 A good task is:
- Clear
- Actionable
- Outcome-driven
🧠 Examples:
- “Explain blockchain in simple terms.”
- “Summarize this blog into 5 key takeaways.”
- “Write a tweet about AI trends in 2025.”
If the task is vague (e.g., “Tell me something”), the result will be vague too.
✅ Pro Tip:
Start your task with verbs: write, explain, analyze, summarize, compare, etc.
🧑🎨 3. Style: What tone or voice should it have?
Tone and writing style guide how the AI should sound — formal, casual, persuasive, emotional, technical, etc.
🔹 Why Style Matters:
It controls how the content feels to the reader — and makes sure it fits the audience.
🧠 Examples:
- “Explain this for a 5th-grade student.”
- “Use a professional and formal tone.”
- “Keep the tone light, friendly, and humorous.”
✅ Real-Life Use:
Want to send a professional email?
Prompt:
“You are a polite customer service agent. Draft a formal apology email for a late delivery.”
AI matches the tone perfectly when guided.
🗂️ 4. Format: How should the output look?
This tells the AI the structure of your response.
You can request formats like:
- Paragraphs
- Bullet points
- Tables
- Code blocks
- Tweets
- Email templates
🧠 Examples:
- “Give the answer in a 3-column table: Feature, Benefit, Example.”
- “List steps in bullet points.”
- “Wrap it as a JSON object.”
✅ Pro Tip:
Use formatting to save time — so you don’t need to manually clean up or restructure the output.
⏳ 5. Constraints: What are the boundaries?
Constraints help control the length, complexity, time frame, or scope of the response.
They give AI a defined range to operate within.
🔹 Common Constraints:
- Word count
- Time period
- Language difficulty
- Number of points or examples
- Avoiding or including certain topics
🧠 Examples:
- “Limit the answer to 100 words.”
- “Include only tools launched after 2023.”
- “Avoid technical jargon — make it beginner-friendly.”
- “List exactly 5 ideas, not more.”
✅ Pro Tip:
Constraints are especially helpful for social media content, school assignments, or formatting-sensitive work.
🧪 Complete Prompt Example Using All 5 Elements
“You are a productivity coach. List 5 daily habits that help remote workers stay focused. Use a friendly and motivational tone. Present the output in bullet points. Keep each point under 20 words.”
What’s happening here:
- Role → Productivity coach
- Task → List 5 habits
- Style → Friendly & motivational
- Format → Bullet points
- Constraints → 5 items, each under 20 words
✅ The result?
A clear, motivating, and easy-to-read output — tailored perfectly.
🧠 Why This Prompt Structure Works
Element | Benefit |
---|---|
Role | Contextualizes the reply |
Task | Defines the goal |
Style | Aligns tone with audience |
Format | Saves editing time |
Constraints | Ensures the output meets your requirements |
This structure turns your prompt from “just a question” into a complete creative brief for the AI.
💡 Use Case Examples by Profession
Profession | Example Prompt |
---|---|
Blogger | “You are a blogging coach. Suggest 5 blog topics for beginners in AI. Use a casual tone. Bullet list. Under 50 words.” |
Student | “You are a history teacher. Summarize the French Revolution in 5 bullet points for 10th graders. Max 100 words.” |
Developer | “Act as a senior Java engineer. Explain how to implement a singleton in Spring Boot. Format as code + short explanation.” |
Entrepreneur | “You are a brand strategist. Write a one-line slogan for a tech startup. Use punchy, inspiring tone. Limit to 12 words.” |
Final Thoughts
Mastering prompt engineering isn’t about writing more — it’s about writing smarter.
By using this 5-part prompt structure —
Role → Task → Style → Format → Constraints —
you’ll start getting results that are not only accurate, but useful, elegant, and tailored to your needs.
This structure is the foundation of effective AI use — whether you’re writing a blog, generating code, or just chatting with ChatGPT.
Start using it today, and your AI conversations will never be the same.
Pingback: Prompt Engineering Masterclass (Free AI Course) – From Beginner to Advanced