What it is
A role assignment is a short line at the top of a prompt that tells the model who it is speaking as. You name a job, a level of expertise, or a point of view, then ask your actual question underneath. The role does not add knowledge the model lacks. It changes which knowledge it reaches for and how it frames the reply.
Without a role, a model tends to answer for everyone at once. It hedges, covers the basics, and spreads itself thin. A role narrows that range. The reply reads like it came from one person with one job rather than a committee.
When to use it
Reach for a role when a plain question gives you a flat, encyclopedic answer. It helps with review, critique, planning and explanation. It helps less with pure lookups, where you just want a fact.
Be careful with roles that carry strong assumptions. Asking the model to act as a lawyer or a doctor can produce confident language that sounds authoritative but is not advice you should rely on. Use roles to shape tone and angle, not to borrow authority.
How to use it
- Pick one specific role. "A copy editor who works on technical documentation" beats "an expert".
- Add the constraints that matter: audience, length, what to avoid.
- State the task clearly after the role line.
- Ask for the output in a form you can check, such as a list or a table.
- Read the result and adjust the role if the answer drifts. A slightly different role often fixes a vague reply.
A worked example. You have written a short guide to setting up a home wifi network and want feedback before publishing.
Prompt: "You are a support agent who answers the same wifi questions every day. Read the draft below. List the three places where a frustrated reader would give up. For each one, write the sentence that confused them and a plain rewrite. Keep each rewrite under twenty words."
That prompt gives the model a viewpoint, a bounded task, and an output format. The reply will point at real trouble spots instead of praising the draft in general terms.
What a good result looks like
The answer should feel like it came from someone doing the job. It should be specific, use your vocabulary, and skip the throat clearing. If the reply still reads like a general summary, the role was probably too broad or the task too loose. Tighten one of them and try again. A good role is a lens, not a costume.
Assigning a persona before your real question narrows the model's focus and makes answers more specific. For anyone writing prompts who wants less generic output.