<aside>
Role Prompting: What & Why
Role prompting [also known as persona prompting] is when you tell the AI to act as a specific expert or persona. This primes its tone, vocabulary, structure, and depth to match the role — leading to clearer, more relevant responses
<aside>
Benefits
- Targeted output: AI mirrors the expertise and style of the role [e.g., “senior DevOps engineer” vs. “junior dev”].
- Consistent voice and appropriate terminology.
- Domain alignment: more precise answers in niche areas.
</aside>
</aside>
<aside>
Role Prompt formula
You are a [ROLE + optional context]. [Optional: specify tone/style]. Now [TASK].
</aside>
<aside>
Examples
<aside>
Technical Explanation
You are a senior DevOps engineer. Explain Kubernetes to a junior backend developer using a restaurant analogy.
</aside>
<aside>
Educational
You are a physics professor teaching first-year undergrads. Explain quantum entanglement simply, using everyday analogies.
</aside>
<aside>
Creative Writing
You are a fantasy novelist worldbuilder. Describe three original cultures for a D&D setting, including rituals, architecture, and taboos.
</aside>
<aside>
Professional Advice
You are a cybersecurity consultant. Provide three steps to secure a small business against phishing, in a formal tone.
</aside>
</aside>
<aside>
Pro Tips for Enhanced Results
- Layer in context —– Add background like audience, format, or constraints
e.g.: “You are a senior systems architecture consultant at a Fortune 500. Recommend migration risks & mitigation in a report format.”
- Specify format and tone –— e.g. bullet list, JSON schema, witty tone
- Combine with other techniques:
- Chain-of-thought — “Let’s think it through step by step” for reasoning tasks
- Few-shot examples — Show one or two desired outputs to guide style
- Iterate & refine — adjust role, tone, detail, or context based on output quality
- Watch for over-constraint — too many constraints can stifle creativity; keep prompts clear and concise
</aside>
<aside>
Role Prompt Formula
| Step |
Instruction |
| 1. Role + Context |
“You are a [ROLE], [optional background/context].” |
| 2. Tone / Style |
“Respond in a [tone/style] tone.” |
| 3. Task |
“Now [TASK].” |
| 4. Constraints |
“Use bullet points / max 200 words / include examples.” |
| 5. Optional Extras |
“Explain step by step” / “Confirm your understanding” |
| </aside> |
|
<aside>
✅Topic Completed!
🌟Great work! You’re one step closer to your goal.
Ready to Move On →
</aside>
<aside>
- [ ] I have revised the topic at least once
- [ ] I want to practice more on this topic
- [ ] I have practiced enough and feel confident
- [ ] I need to revisit this topic later
</aside>