ModelRefs / Role Prompting — Prompt Pattern
Role Prompting — Prompt Pattern
Assign the model an expert role to bias style, depth, and vocabulary. Place a role assignment in the system prompt ('You are a senior security engineer').
Overview
Place a role assignment in the system prompt ('You are a senior security engineer'). Cheap, generic uplift on domain-specific tasks.
When to use it: You want domain-flavored output without fine-tuning.
Pattern details
| Pattern class | role |
|---|---|
| Difficulty | beginner |
| Also known as | persona prompt, system role |
| Last reviewed | 2026-06-07 |
Known failure modes
- Persona leakage — Model breaks role mid-conversation. Mitigation: Reassert role in long conversations or pin via system prompt.
When not to use it
- Stacking 5 roles ('You are a {x} and {y} and {z}') — dilutes signal.
Continue your research
Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to Role Prompting — Prompt Pattern.
Frequently asked questions
When should I use the Role Prompting prompt pattern?
You want domain-flavored output without fine-tuning.
What are common failure modes of Role Prompting?
Persona leakage
Does Role Prompting work across models?
Yes when the anatomy is preserved — see model compatibility matrix on the pattern page.