LearnAI home

Foundations ยท Lesson 4

Role Prompting: Wear a Costume

Turn the AI into a pirate accountant, a patient teacher, or a ruthless editor.

Three magic words: "You are a..."

Start a prompt with "You are a..." and something delightful happens: the model puts on a costume. Not just a funny voice: a whole stance. Vocabulary, priorities, level of detail, what it assumes you already know. All of it shifts.

Why does this work? During training, the model absorbed text from teachers, lawyers, comedians, doctors, and yes, people writing like pirates. When you assign a role, you're telling it which region of everything it has read to draw from. It's less "pretend" and more "tune to this channel."

One question, two costumes

Let's ask the same question ("explain a 401k") in two very different outfits.

Prompt: "You are a pirate. Explain what a 401k is."

Arr, listen close, matey. A 401k be a treasure chest ye fill with a piece of every paycheck, before the tax collectors get their hooks in it. Better still, many a captain (yer employer) will match yer doubloons. Free treasure for the takin'! But mark this: raid the chest before ye be old and grey, and ye'll pay a hefty penalty to the crown. Bury it, let it grow, and retire to yer own island. Arr.

Prompt: "You are a certified financial advisor. Explain what a 401k is to a 24-year-old at their first job."

A 401k is an employer-sponsored retirement account. You contribute a percentage of each paycheck, often before taxes, which lowers your taxable income today. Many employers match contributions up to a limit. That match is effectively free money, so contributing at least enough to capture it is usually the first priority. The money is invested and grows tax-deferred; withdrawing before age 59 and a half typically triggers penalties. Starting at 24 is a genuine advantage: compounding does most of the heavy lifting when given decades.

Same facts underneath. Completely different delivery, vocabulary, and emphasis. That's the power of a role: it sets a hundred small defaults at once.

The pirate version is silly, but notice it's accurate. Roles change the costume, not the facts. (Mostly. A pirate advisor is still not licensed. Consult a human for actual doubloon allocation.)

Roles you'll actually use

RoleWhat it's great for
"You are a patient teacher explaining to a beginner"Learning anything without jargon whiplash
"You are a ruthless editor"Cutting your writing by 40% without mercy
"You are a skeptical senior engineer reviewing this plan"Finding holes before your real reviewers do
"You are a friendly customer support agent for a small bakery"Consistent brand voice in replies
"You are an interviewer for a marketing role; grill me"Practice under pressure, minus the sweating

The pattern: role + audience + attitude. "You are a patient teacher" is good; "You are a patient teacher explaining to a curious 10-year-old, using everyday analogies" is better.

The costume rack, side by side

Here's the same question ("explain credit card interest") with and without a costume.

โŒ Weak prompt

Prompt

Explain how credit card interest works

Output

Credit card interest is the cost of borrowing money on your card. If you don't pay your full balance by the due date, the remaining amount is charged interest, usually calculated daily.

Accurate but flavorless: Generic Explainer Mode. With no role, the model can't tell whether you're a teenager, a CPA, or a pirate. So it aims at nobody in particular.

โœ… Good prompt

Prompt

You are a patient teacher explaining to a 15-year-old getting their first card. Explain how credit card interest works using one everyday analogy. Keep it under 100 words.

Output

Think of a credit card as borrowing money from a friend who charges rent on it. Pay everything back by the due date and the rent is zero. But if you only pay part, the leftover starts collecting a fee every day, and tomorrow's fee is calculated on today's total, fees included. That snowball effect is why a small balance can grow surprisingly fast. The cheat code: pay the full balance every month, and interest never touches you.

The role set the vocabulary, the analogy style, and what to assume the reader knows: a hundred small decisions made in one sentence.

Want to try more costumes in a real chat? Here's a starter you can copy and remix:

Costume changer

You are [a pirate / a stern accountant / a kindergarten teacher / a skeptical engineer]. Explain [topic] to [audience]. Use [one analogy / plain language / precise terminology]. Keep it under [length].

Run it twice with two different roles and compare. Same facts, different planet.

Checkpoint

"You are a..." tunes the model to a region of its training, setting tone, vocabulary, and assumptions in one line while the underlying facts stay put.

When roles matter most

Roles shine when the delivery matters as much as the content: adjusting expertise level, holding a brand voice, adopting a critical mindset, or making dry material fun. They're also the foundation of system prompts (coming up in Lesson 8), where a role becomes a persona that persists across an entire conversation.

๐Ÿ“ Quiz

Question 1 of 3

What does assigning a role like 'You are a financial advisor' actually change?

Found this useful? Pass it on.