📡 You're offline — showing cached content
New version available!
Quick Access
Tutorials Prompt Engineering Role Prompting

Role Prompting

5 min read Quiz at the end
Role prompting activates domain expertise and adjusts tone — use specific detailed role descriptions for best results.

Role Prompting

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.
Topic Quiz · 1 questions

Test your understanding before moving on

1. Why does role prompting improve outputs?
💡 Assigning a specific expert role makes the model apply relevant knowledge, vocabulary, and reasoning style.