Role Prompting
Definition
Assigning Claude a role in the system prompt focuses its behavior and tone; even a single sentence measurably shifts responses.
Key points
- Set the role in the system prompt, not the user turn (e.g.
system: "You are a helpful coding assistant specializing in Python."). - A single sentence is enough to make a difference — role prompting is low-cost.
- Complements Prompt Clarity And Motivation: role sets persona/tone; explicit instructions + motivation set the task.
Why it matters for the exam
- Tested as the correct lever for tone/behavior focus, and specifically that the role belongs in the system prompt.
Common gotchas
- Putting the role in the user message instead of the system prompt is weaker / the wrong answer.
- Over-relying on role alone for correctness — pair it with clear instructions and examples.
See also
Sources
Referenced by
Practice questions optional · AI
Generate fresh practice questions about this concept with AI. These are not vault-verified.