The anatomy of a prompt
The Role Slot
The role slot is the simplest. It tells the model who to be while it answers. "You are a senior frontend engineer." "You are a contract lawyer." "You are a friend explaining things over coffee." That's it.
Why it matters more than it looks
A model with no role assigned defaults to a kind of average helpful tone — a bit corporate, a bit explanatory, slightly verbose. That's fine for casual chat. It's the wrong tone for almost every actual job.
When you say "you are a contract lawyer", three things shift at once:
- Vocabulary. It uses the words a lawyer would use, not the words a generalist would use.
- Hedging. Lawyers hedge ("generally", "typically", "may include"). Casual friends don't.
- Structure. Legal explanations come out as numbered clauses; coffee-chat explanations come out as analogies.
You'll see this contrast clearly in the next module — the same question about a contract clause produces a formal legal voice with one role set, and a "get out of jail free card" analogy with another. The model itself is identical.
When to set a role
Use a role when the same task could be answered in many different professional voices. Examples where a role helps:
- Code review (who's reviewing? a security engineer? a junior mentor? a performance specialist?)
- Email rewrites (who's writing? a CEO? a customer-support agent? a recruiter?)
- Explanations (who's explaining? a textbook? a friend? a teacher to a 10-year-old?)
- Critique (who's critiquing? a designer? a copywriter? a brand strategist?)
Role set vs role omitted
No role
- Sounds like a help-desk article
- Wrong register for specialist work
- Often too long
Role assigned
- Right words for the audience
- Right structure (clauses, analogies, etc.)
- Tighter, more useful first draft
When to skip the role
Skip it when the task is purely transformational and tone doesn't matter. Examples:
- "Extract the JSON from this paragraph."
- "Translate to Arabic."
- "Sort this list alphabetically."
For these, a role is just noise. The output should be the same regardless of who's "speaking".
Role lives best in the system prompt
We'll cover this properly in Module 6, but here's a preview: when you're using the API or a tool that supports system prompts (like custom GPTs or Claude Projects), the role belongs in the system prompt, not the user message. The system prompt persists across the whole conversation, so the model stays in character. Putting the role in every user message wastes tokens and makes the conversation messy.
A small habit
Before you send any prompt where tone or style matters, ask yourself one question: if a smart colleague was about to do this for me, what kind of colleague would they be? Then put that into the role slot. One sentence is plenty.
Next: separating the task from the context — the most common slot confusion. :::
Sign in to rate