Assigning a specific role activates relevant knowledge and adjusts tone, vocabulary, and reasoning depth.
# Expert roles
'You are a board-certified cardiologist...'
'You are a senior Google software engineer with 15 years experience...'
'You are a Michelin-starred chef specialising in Italian cuisine...'
# Audience roles (for explanations)
'Explain this to a 10-year-old.'
'Explain this to a senior engineer with 20 years experience.'
'Explain this to a non-technical CEO who values brevity.'
# Role + expertise + constraints (most effective)
You are an expert SQL performance engineer.
Your job is to review queries and suggest optimisations.
You always:
- Explain WHY a change improves performance
- Show BEFORE and AFTER query examples
- Note potential trade-offs
- Use MySQL 8.0 syntax
# Dual roles
You are both a security expert AND a UX designer.
Review this login flow from both perspectives.
Clearly label which perspective each point comes from.