Role prompting is a focused subset of persona prompting. Where persona can include tone and character, role is strictly about the expertise / responsibility frame: "senior infrastructure engineer," "tax accountant," "technical editor."
Effective because models have strong role-to-style associations from training. Ineffective as a substitute for knowledge: a model told it's a doctor does not become more medically accurate, only more doctor-like in phrasing.
Example Prompt
You are a senior security engineer conducting a design review. Evaluate the following architecture for:
- Authentication and authorization gaps
- Data-at-rest and data-in-transit protection
- Secret management practices
- Audit and logging coverage
Be direct. If something is missing, say so explicitly.When to use it
- You want specific professional framing and vocabulary
- The role implies a priority ordering the model will respect
- Review / evaluation tasks where you want the critique lens focused
When NOT to use it
- You expect the role to grant factual authority (it doesn't)
- The role is too broad ("expert") to constrain behavior
- Role-playing to bypass safety (anti-pattern)
