Role prompting
Published
Role prompting is telling a model to adopt a specific persona so its vocabulary, priorities and level of detail match that role. It works when the role implies a concrete standard the model can apply. It does nothing when the role is flattery — "world-class expert" names no standard and changes little.
What is role prompting?
Role prompting is opening a prompt by telling the model who to be: "You are a copy editor", "You are a security reviewer", "You are a paediatric nurse explaining to a parent". The claim is that adopting a role brings the associated vocabulary, priorities and assumptions with it.
That claim is partly true and widely overstated, which is worth being precise about — role prompting occupies the first line of an enormous number of prompts, and much of that space is wasted.
Does telling an AI it is an expert improve the answer?
Not on its own. "You are a world-class expert programmer" is the most common form of role prompting and one of the least useful, because it names no standard the model can act on. There is no behaviour it can adopt to become world-class that it was not already attempting.
What does change behaviour is a role that implies concrete priorities. Compare:
| Role | What changes |
|---|---|
| You are a brilliant writer | Very little. Names no standard. |
| You are a line editor who cuts redundancy without changing the author’s voice | Priorities: preserve voice, delete rather than add. |
| You are a security reviewer looking for injection and auth flaws | Attention: shifts toward specific vulnerability classes. |
| You are explaining to a parent with no medical training | Register, vocabulary, assumed knowledge. |
The pattern: the useful part of a role is the constraint it smuggles in. "A line editor who cuts redundancy" is really an instruction to prefer deletion. You could state that directly — and often should.
When is role prompting genuinely worth the space?
- When register matters. Naming the audience and the speaker sets vocabulary and assumed knowledge more compactly than describing them.
- When you want a specific lens. A security reviewer and a performance reviewer looking at the same code notice different things. The role directs attention.
- For sustained persona work. Roleplay, practice conversations and simulations need a character to maintain, which is a genuine role rather than a framing device.
- When the role implies a standard of care. "A pharmacist checking for interactions" carries a whole procedure with it.
And when it is not worth it: any time the role is an adjective rather than an occupation. If removing the role sentence would not change what the model does, remove it.
How do you write a role that changes behaviour?
Name the occupation, then the specific thing that occupation optimises for. The second half is what does the work.
Weak: You are an expert marketer.
Better: You are a direct-response copywriter who sells with specifics
rather than adjectives, and who never claims anything the brief
does not support.
Weak: You are a great teacher.
Better: You are a teacher who defines every term the first time it
appears and gives a concrete example before every general rule.Notice that the better versions are close to being constraints with a job title attached. That is the honest description of what role prompting is, and writing them that way makes the useful part explicit rather than implied.
Can a role make a model claim expertise it does not have?
This is the real risk, and it deserves more attention than it gets. Telling a model it is a doctor, a lawyer or a financial adviser does not give it professional judgement — it gives it professional register. The output sounds more authoritative without being more reliable, which is worse than sounding uncertain.
If you use a professional role for a regulated domain, pair it with an explicit boundary: what the model must not do, and where the user should go instead. A confident tone with no such boundary is the most dangerous combination available in a prompt.
Common questions
- Does role prompting still work with newer models?
- The useful part does. Roles that specify register, audience or lens still change output. Roles that are flattery — "world-class", "genius", "the best in your field" — do very little, and did less than people believed even with older models.
- Should the role go in the system prompt or the user message?
- The system prompt, if the role holds for the whole conversation, which it usually does. A role that changes per request is a sign you are using the role to smuggle in a constraint — state the constraint directly instead.
- Is it safe to tell a model it is a doctor or a lawyer?
- It changes tone, not competence, and confident tone without competence is a genuine hazard. If you use a professional role in a regulated domain, pair it with an explicit boundary stating what the model must not do and where the user should go instead.
- What is the difference between a role and a persona?
- A role names expertise and lens. A persona adds voice, boundaries and consistency across turns. Roles suit one-off tasks; personas suit sustained conversation, roleplay and practice scenarios.
- Can I skip the role entirely?
- Often, yes. If the constraints and output format are specific, the role adds little. A good test is to delete the role line and see whether anything changes — if not, the space is better spent on a constraint.