RUNLOCALAIv38
->Will it run?Best GPUCompareTroubleshootStartLearnPulseModelsHardwareToolsBench
Run check
RUNLOCALAI

Independently operated catalog for local-AI hardware and software. Hand-written verdicts. Source-cited claims. Reproducible commands when we have them.

OP·Eruo Fredoline
DIR
  • Models
  • Hardware
  • Tools
  • Benchmarks
TOOLS
  • Will it run?
  • Compare hardware
  • Cost vs cloud
  • Choose my GPU
  • Prompting kits
  • Quick answers
REF
  • All buyer guides
  • Learn local AI
  • Methodology
  • Glossary
  • Errors KB
  • Trust
EDITOR
  • About
  • Author
  • How we make money
  • Editorial policy
  • Contact
LEGAL
  • Privacy
  • Terms
  • Sitemap
MAIL · MONTHLY DIGEST
Get monthly local AI changes
Monthly recap. No spam.
DISCLOSURE

Some links on this site are affiliate links (Amazon Associates and other first-class retailers). When you buy through them, we earn a small commission at no extra cost to you. Affiliate links do not influence our verdicts — there are cards we rate highly that we don't have affiliate relationships with, and cards that sell well that we refuse to recommend. Read more →

© 2026 runlocalai.coIndependently operated
RUNLOCALAI · v38
  1. >
  2. Home
  3. /Learn
  4. /Courses
  5. /Prompt Engineering Fundamentals
  6. /Ch. 7
Prompt Engineering Fundamentals

07. Role Prompting

Chapter 7 of 25 · 20 min
KEY INSIGHT

Role prompts activate associated patterns in training data—but specificity matters; vague roles produce vague behavior.

Role prompting assigns the model a persona: "You are a senior software engineer," "You are a pediatrician," "You are a skeptical reviewer." The role shapes the vocabulary, reasoning style, and assumptions the model applies.

Role works by activating relevant training data. Models trained on diverse internet text have encountered many perspectives. Explicitly naming a role increases the probability that the model accesses associated patterns.

You are an experienced trial attorney reviewing contracts for potential liability issues.

Review the following service agreement and identify:
1. Liability caps that favor the vendor
2. Indemnification clauses with asymmetric obligations
3. Force majeure provisions that may be overbroad
4. Termination rights that create one-sided exit options

Flag each issue with its clause number, explain the legal risk, and suggest alternative language.

Input: [contract text]

This prompt sets expectations: technical legal language, risk-focused analysis, practical recommendations. The model approaches the task as a lawyer, not a general text analyzer.

Roles can combine:

You are a documentation specialist with 15 years of experience writing API guides for developers. Your explanations are precise, include code examples, and assume readers have intermediate programming knowledge but are unfamiliar with this specific API.

Write reference documentation for the following endpoint.

The combination (documentation specialist + years of experience + audience assumptions) produces different output than any single role.

Role prompting fails when:

  • The role contradicts the task (asking a creative writer to do precise extraction)
  • The role is vague ("be helpful" is not a role)
  • The role conflicts with model training (ascribed traits may not match actual behavior)
# Vague role - likely to produce inconsistent results:
"You are an assistant."

# Specific role - produces more consistent behavior:
"You are a technical support agent specializing in networking hardware, speaking to customers who have basic IT knowledge and are frustrated because their device is not connecting."
EXERCISE

Identify three tasks in your workflow and write role descriptions that would improve output quality. Test each with and without the role.

← Chapter 6
Step-by-Step Reasoning
Chapter 8 →
Personas for Different Tasks