One of the simplest ways to improve AI output is to tell the model who it is before you give it a task.
You are a senior software engineer with 10 years of experience in Python.
You are a professional copywriter who specializes in direct-response marketing.
You are a financial advisor explaining investments to a first-time investor.
This is called role assignment or persona prompting, and it works by priming the model to draw on patterns associated with that role — vocabulary, reasoning style, level of detail, and domain knowledge.
Why Roles Work
When you assign a role, you're giving the model a filter. Everything it outputs gets run through the lens of that persona.
A "senior software engineer" will notice edge cases you didn't mention. A "professional copywriter" will instinctively write for conversion, not just description. A "financial advisor" will add appropriate caveats and explain in layman's terms.
The model doesn't become that person — but it does weight its predictions toward patterns it associates with that role.
Basic Role Assignment
The simplest form is one sentence at the start of your prompt:
You are a UX researcher. Review this user interface description and identify
3 potential usability problems.
Interface description: [description]
You are a Michelin-star chef. Suggest improvements to this recipe to make it
more restaurant-quality.
Recipe: [recipe]
Adding Specificity to Roles
Generic roles work. Specific roles work better.
Generic:
You are a doctor. Explain this medical term.
Specific:
You are a cardiologist explaining medical concepts to patients who have no
medical background. Use simple language, avoid jargon, and use analogies
where helpful.
The more you define the role's expertise, communication style, and audience, the more targeted the output.
Combining Roles with Tasks
Roles work best when combined with clear tasks and format instructions:
You are an experienced product manager at a B2B SaaS company.
We are launching a new feature that lets users export data to CSV.
Write a one-page product requirements document (PRD) covering:
1. Problem statement (2 sentences)
2. User stories (3 bullet points)
3. Success metrics (2-3 measurable KPIs)
4. Out of scope (what we're NOT building)
Be concise and use bullet points where appropriate.
When Role Assignment Helps Most
Roles are especially powerful when:
- Domain expertise matters — Legal, medical, financial, technical topics benefit from a knowledgeable persona
- Tone is important — A "friendly teacher" vs. a "stern editor" will produce very different writing styles
- The audience is specific — Pairing a role with an audience ("explain to a 10-year-old") controls both the expert lens and the communication level
- You want a specific perspective — "You are a skeptical investor reviewing this pitch deck" gives you critical feedback rather than validation
Important Caveats
Role assignment is useful but not magic. Research on its effectiveness shows mixed results depending on the task and model. A few things to keep in mind:
- Simple tasks don't need roles — Don't add "You are an expert" to everything. For simple tasks (translating a word, formatting a list), it adds noise without benefit.
- Roles don't grant real expertise — The model doesn't actually become a doctor or lawyer. Never rely on AI for actual medical, legal, or financial decisions.
- Test what works — The same role can produce very different results across models. Claude, GPT-4o, and Gemini each respond differently to persona prompts.
Quick Reference: Useful Role Templates
You are a [role] with [X years/level of] experience in [domain].
Your communication style is [tone/style].
You are speaking to [target audience].
Examples:
You are a senior technical writer with 8 years of experience in developer documentation.
Your style is clear, precise, and developer-friendly (assumes coding knowledge, no hand-holding).
You are writing for backend engineers.
Key Takeaway
Role assignment is one of the easiest wins in prompt engineering. A single sentence — "You are a [role]" — can meaningfully improve the relevance, tone, and quality of AI output. Use it whenever domain expertise, tone, or audience matters.
Next: Learn about Formatting Output — how to control exactly how the AI structures its response.