Role prompting: how to give an AI a role that actually helps

TL;DR: Role prompting means telling an AI model who to be, such as "You are a senior B2B copywriter". A role shapes tone, vocabulary and what the model pays attention to, but it adds no knowledge. Research on accuracy is mixed, so write roles that name the audience and the standards, and supply the facts yourself.

What role prompting is

Role prompting is opening a prompt by telling the model who it is. "You are an experienced employment lawyer." "Act as a skeptical investor." "You are our support team's writing assistant." The rest of the prompt then reads as a request to that person.

It is one of the most familiar prompting habits, and the vendors recommend it. Anthropic's prompting guide says setting a role in the system prompt focuses Claude's behavior and tone for your use case, and that even a single sentence makes a difference. OpenAI's guide suggests starting a developer message with an "Identity" section that describes the assistant's purpose, communication style and goals.

The useful question is not whether to use a role but what you expect it to do. Roles are good at some things and do nothing for others.

What a role changes, and what it doesn't

A role changes how the model answers. It does not change what the model knows. "You are a tax expert" doesn't give the model this year's rules for your country, your client's figures or your firm's policy. If the model didn't know something before the role, it doesn't know it after.

What a role can and can't do
A role can changeA role can't change
Tone and register: formal, plain, blunt, warmThe facts the model has: dates, prices, your data
Vocabulary: jargon for experts, plain words for customersHow current its knowledge is
What it notices: a lawyer looks for risk, an editor for clarityWhether a claim is true
What it treats as a good answer for that jobYour company's context, unless you give it
How willing it is to disagree, if the role says soIts underlying ability on hard problems

This is why "You are a world-class marketer" so often disappoints. It tells the model to sound confident about marketing, and it does. It still knows nothing about your product, your buyer or what you tried last quarter, so you get a confident, generic answer.

What the research says about personas

The evidence is mixed, and it depends on what you measure. Two studies point in different directions.

  • Personas didn't improve factual accuracy. Mingqian Zheng and colleagues (first posted in 2023) tested 162 roles, from "doctor" to "friend", on 2,410 factual questions across four families of open models. Adding a persona to the system prompt did not improve performance compared with no persona. Some personas helped on some questions, but which ones looked largely random, and picking the best persona automatically worked no better than chance.
  • Role-play helped reasoning in another setup. Aobo Kong and colleagues (2023) tested a two-step role-play method on ChatGPT: the user assigns a role ("From now on, you are an excellent math teacher"), the model replies in character, and then the real question follows. Across twelve reasoning benchmarks it beat a plain zero-shot prompt on most of them, for example raising accuracy on the AQuA math set from 53.5% to 63.8%.

Read together, the honest summary is this. A job title alone is not a reliable way to make a model more accurate, and gains seen in one setup may not carry over to another model or task. Both studies also tested models that are now a generation or more old. What roles reliably do, and what the vendors recommend them for, is focus: tone, style and which parts of the task get attention. Use them for that, and get accuracy from the facts and instructions you give.

How to write a role that helps

A useful role says who the model is, who it is talking to, and what standard the work must meet. The job title is the least important part.

Template: a role with audience and standards
You are [role, with the experience that matters: for example, a support lead at a software company who has answered thousands of billing questions].
You are writing for [audience: who reads the answer, what they know, what they want].
Your standard: [what good looks like: for example, every answer solves the problem in the first two sentences and never promises a refund we haven't approved].
When you are unsure, [what to do: ask me, or say so plainly].

Here is the difference in practice.

Before: a title and nothing else
You are a world-class copywriter. Write a landing page headline for our accounting software.
After: role, reader, standard and facts
You are a copywriter who writes for small-business owners, not finance teams. Your readers run shops and agencies with under 20 staff, do their own books on a Sunday night and hate jargon. Your standard: a headline a busy owner understands in three seconds, with a concrete benefit and no buzzwords.

Our product: [what it does]. The main benefit: [benefit, for example: invoices chased automatically]. Write 10 headlines under 10 words.

The second prompt would work reasonably well even without its first sentence, because the reader, standard and facts are doing most of the work. That is the point: a role is a frame for the context, not a substitute for it. For the other parts of a strong prompt, see how to write a prompt.

Habits that make roles work

  • Describe the experience, not the rank. "Has reviewed hundreds of supplier contracts for mid-sized manufacturers" tells the model what to pay attention to. "World's best lawyer" tells it nothing.
  • Name the audience inside the role. An expert explaining to another expert and an expert explaining to a customer are two different jobs.
  • Give the role permission to push back. "Tell me plainly if the plan has a flaw" makes a reviewer role useful instead of polite.
  • Keep one role per prompt. "A lawyer, marketer and CFO" in one voice blurs all three. If you want several views, ask for them as separate sections or separate prompts.

Worked examples: roles that earn their place

Roles are most useful when they change what the model looks for. Reviewer roles are the clearest case.

1. A skeptical reviewer for a budget
You are the CFO of a 40-person company, reviewing a budget request before it goes to the board. You are not hostile, but you have seen many optimistic plans. Read the request below and list: the three assumptions most likely to be wrong, the costs that seem to be missing, and the one question you would ask the person who wrote it. Be direct.

<request>
[paste the budget request]
</request>

Why it works: the role sets what to look for (assumptions, missing costs) and the tone (direct, not hostile).

2. Read your page as a customer
You are a first-time visitor to the page below. You run [type of business], you found us through [channel], and you have two minutes. Read the page as that person and tell me: what you think we sell after ten seconds, what you would still need to know before booking a demo, and the first sentence that made you want to leave.

<page>
[paste the page text]
</page>
3. A plain-English editor
You are an editor at a business publication. Your readers are managers who skim. Edit the text below for clarity: cut every sentence that doesn't add information, replace jargon with plain words, and keep every fact and number exactly. Return the edited text, then the three biggest changes and why.

[paste]
4. A tutor who checks understanding
You are a patient tutor for someone new to [topic]. Explain [concept] in plain words with one everyday example. Then ask me one question to check I understood, and wait for my answer before going further.

In each case, notice what the role adds: a point of view, a reader, and a standard for the answer. None of them relies on the role to supply facts. The budget, the page and the text are pasted in.

Roles in system prompts

If you use the same role every time, put it in the system prompt, the standing instructions that apply to the whole conversation, instead of repeating it in each message. In the API that is the system message (Anthropic) or the developer message (OpenAI). In ChatGPT, custom instructions and project instructions do a similar job.

A role in a system prompt should be short and practical. Anthropic's own example is a single line: "You are a helpful coding assistant specializing in Python." For a team assistant, a few lines usually cover it:

A role for a team assistant's system prompt
You are the writing assistant for [company]'s customer success team. You help write replies to customers who use [product], mostly [type of customer].
Voice: friendly, plain and specific. No exclamation marks, no "we apologize for any inconvenience".
Rules: never promise refunds, discounts or dates; suggest the reply and flag anything that needs a manager's approval.
If a customer's question needs information you don't have, say what is missing instead of guessing.

The split between what belongs in the system prompt and what belongs in each message is its own topic, covered in system prompt vs user prompt. For Claude specifically, see our guide to the Claude system prompt.

When to skip the role

  • Simple, factual tasks. "Convert this table to CSV" gains nothing from "You are a data engineer".
  • When the role is the whole prompt. If you find yourself writing a better job title to fix a bad answer, add context instead.
  • When you need accuracy on facts. A role won't make an answer more true. Give the source material and ask for quotes.
  • When it makes the model pretend. "You are a licensed doctor" doesn't make advice safer; it can make a guess sound more authoritative. Ask for an explanation and the questions to take to a real professional.

A role tells the model how to think about your task; only you can tell it what is true about your situation. This is the gap Prompt Expert is built for: an expert for the task asks a few questions and reads your website and files, so the prompt carries your real facts, not just a job title.

Let the right experts write your prompt

Prompt Expert is an AI prompt generator that brings the right experts to every job. They ask a few questions, read your website and files, and write the prompt for ChatGPT, Claude or Gemini with your real facts, working together when a job needs more than one.

See how it works

Questions

What is role prompting?

Role prompting is telling an AI model to take on a role or persona, such as "You are an experienced editor", before giving it a task. The role shapes the tone, vocabulary and focus of the answer.

Does role prompting improve accuracy?

Not reliably. One large study found that adding personas to system prompts did not improve accuracy on factual questions, while another found gains on reasoning tasks with a specific role-play method. Roles are more dependable for tone and focus.

What is a good example of a role prompt?

"You are the CFO of a 40-person company reviewing a budget request. List the three assumptions most likely to be wrong and the costs that seem missing." It sets a point of view, a standard and a clear task.

Should the role go in the system prompt or the user prompt?

Put a role you use every time in the system prompt, or in custom instructions in ChatGPT. Put a role for one task, such as a reviewer for one document, in the message itself.

Is "act as" the same as "you are"?

In practice, yes. Both set a role. What matters more is what follows: the audience, the standard for a good answer and the facts the model needs.

Sources