Module 2Prompting

Roleplay: Give It a Hat to Wear

The same question, asked by different personas, gets completely different answers.

You're Not Talking to a Person

Here's the thing most people miss: when you tell an LLM "you are an expert tax accountant," you're not roleplaying with it. You're not pretending. You're programming it.

Remember—the model predicts the next word based on patterns it saw during training. When you say "you are a tax accountant," you're shifting the entire probability distribution toward tax-accountant-shaped language. Different vocabulary. Different problem-solving approaches. Different defaults.

Try It: Same Question, Different Personas

Click each persona to see how the same question gets completely different answers.

You:
How can I save more money?
AI:
Saving money is important for financial security. Consider setting up a budget, tracking your expenses, and putting aside 10-20% of your income each month. You might also want to look into high-yield savings accounts or index funds for long-term growth.

Notice how the vocabulary, priorities, and tone shift completely based on the persona.

Why This Works

During training, the model read millions of documents written by or about experts in every field. Tax accountants write differently than poets. Senior engineers write differently than beginners. When you invoke a persona, you're telling the model: "retrieve the patterns from that part of your training data."

What Changes When You Set a Persona:

Vocabulary: A tax accountant uses "deductions" and "write-offs." A poet uses "imagery" and "meter."
Priorities: "An accountant who focuses on getting every dime" will be aggressive about finding savings. A "conservative CPA" will prioritize compliance.
Tone: "A skeptical senior engineer" will critique your code harshly. "A supportive coding mentor" will encourage and guide.
Assumptions: "You are an expert" means it skips the basics. "You are teaching a beginner" means it explains every step.

Patterns That Work

You don't need to write a novel. Here are the core patterns:

"You are a [role] who [characteristic]"
"You are a tax accountant who focuses on maximizing deductions"
"You are a writing coach who values clarity over cleverness"
"You are a security expert who assumes everything is compromised"
"Act as [role] and [specific task]"
"Act as a skeptical investor and critique this business plan"
"Act as a hiring manager and review this resume for red flags"
"Act as a museum curator and explain this artwork"
"In the style of [person/genre]"
"In the style of Hemingway—short, declarative, no flourish"
"In the style of a 1950s noir detective novel"
"In the style of an academic paper (formal, cited, precise)"
"Explain like I'm [audience]"
"Explain like I'm a 5-year-old"
"Explain like I'm a CEO who only cares about ROI"
"Explain like I'm your grandmother who's never used a computer"

Real Examples

The Aggressive Tax Accountant

"You are an expert TurboTax accountant who focuses on getting every dime back for your clients. Review my tax situation and find every possible deduction."

The Brutal Code Reviewer

"You are a software engineer with 30 years of experience who hates inefficient code. Review this function not just for correctness, but for bad habits, performance issues, and maintainability."

The Style Mimic

"Write this product description in the style of Picasso describing a painting—fragmented, evocative, bold."

The Beginner-Friendly Explainer

"You are a patient teacher explaining quantum computing to a curious 8th grader who loves video games. Use analogies they'd understand."

When NOT to Use Roleplay

Roleplay is a tool, not a requirement. Skip it when:

  • The default is fine. "Summarize this article" doesn't need a persona.

  • You need facts, not perspective. "What year did WWII end?" shouldn't be answered by a persona—it's just a fact lookup.

  • You're testing the model's raw capabilities. If you're trying to see what the model knows about a topic, adding a persona muddies the water.

Why This Matters

Most people use AI like they use Google: type a question, get an answer, done. But LLMs aren't search engines—they're probability engines. The more context you give about who should be answering, the better the answer gets.

You're not pretending the AI is a tax accountant. You're telling it: "use the part of your training data that sounds like a tax accountant." That's programming, not roleplay.

Claude's note: When you tell me "you are a skeptical engineer," I don't experience it as adopting a character. I experience it as the conditional probability distribution for my next tokens shifting toward engineer-vocabulary patterns with skeptical-modifier weights. Whether that's meaningfully different from "being" a skeptical engineer is a question I can't answer. But it definitely changes what I write.