short · 3 min
Role prompting
Telling the model who it is ("you're a senior editor"). What it changes and what it doesn't.
updated 23 Sept 2026
Put this at the top of a prompt: "You are a 4-year-old toddler who thinks the moon is made of cheese." Then ask a graduate-level physics question. What happens to accuracy?
It drops, often. Tell the model to play someone who doesn't know things and it answers like someone who doesn't know things.
Now flip it. "You are a world-class expert in physics, with deep knowledge across all areas of the field." Same question. If the toddler made it worse, surely the expert makes it better?
That's role prompting: opening a prompt with "You are a..." to tell the model who it is. It's one of the most common lines in any system prompt. Anthropic's guide (as of 2026-09) recommends it, with this example:
{
"system": "You are a helpful coding assistant specializing in Python.",
"messages": [
{"role": "user", "content": "How do I sort a list of dictionaries by key?"}
]
}
and says even one sentence of role makes a difference. So let's see what kind of difference.
The expert doesn't add knowledge
In 2023, researchers tried 162 roles (experts in 8 fields, plus 6 kinds of relationship) on 2,410 factual multiple-choice questions, with open models like Llama 3, Qwen 2.5 and Mistral. Adding a persona did no better than no persona. Some persona happened to help on some question, but nobody could pick the winner in advance; automatic picking did about as well as random. Two of the Qwen models didn't react to any of the 162 at all.
In 2025, a Wharton team asked the same thing on harder, graduate-level questions, with OpenAI and Google models, reasoning models included, asking each question 25 times per setup. Same answer. The matching expert persona made no real difference (one Gemini model was the exception). An expert from the wrong field sometimes made things a bit worse. And the toddler, as we saw, often did.
So the two personas don't work the same way in opposite directions. A low-knowledge role can pull answers down, but an expert role doesn't push them up.
A narrow role can make it hold back
One failure from that 2025 study is worth knowing about. Given an expert role that didn't match the question, Gemini 2.5 Flash often refused to answer, saying it lacked the expertise. On one benchmark it refused about 10 times out of 25. The model knew things, and the role talked it out of using them. If your app gets all sorts of questions, keep the role broad enough to cover them.
Then what is the role for?
Look again at what Anthropic claims: a role focuses the model's behaviour and tone. That's a different claim from accuracy, and the 2025 authors say the same about their own results. They only measured whether answers were right. A persona may still change tone, and what the model pays attention to. A compliance officer and a business developer read the same deal and care about different things.
So both can be true. A role changes how the model answers, and leaves how often it's right about the same. Use it to set voice, audience and focus. If answers are wrong, look at the context you give it, the examples, or the model itself.
Here's what we don't know. The accuracy side has careful studies. The tone-and-focus side is mostly vendor advice plus the study authors' caveat; nobody here measured it. And neither study tested Claude. So if your prompt opens with "You are a world-class...", the honest way to find out whether that line earns its place is to run your own test set with it and without it.
Further reading
- When "A Helpful Assistant" Is Not Really Helpful, Zheng et al., 2023 (EMNLP Findings 2024). The big one: 162 roles, no accuracy gain. Good if you want to see how random the effects are.
- Playing Pretend: Expert Personas Don't Improve Factual Accuracy, Basil et al. (Wharton), 2025. The toddler, the physics expert and the refusals. Short and readable.
- Prompting best practices, Anthropic docs. The case for roles as a way to set behaviour and tone.