Decoder. plain-English AI glossary

Role prompting

● Core

Telling the model to adopt a specific role — expert, critic, mentor — to change the tone and quality of its output.

Think of it like

Asking different people to answer: a teacher explains differently than a comedian or an engineer.

Example

"You are a senior software architect. Review this code for maintainability and scalability issues." vs. just "Review this code."

How it actually works

Role prompts work because the model learned associations between identities and knowledge/style during training. A "helpful tutor" persona elicits explanatory text; a "security engineer" persona spots attack vectors. The role acts as shorthand for a behavioral mode. Combining roles with other techniques (few-shot, CoT) stacks effects.

For product teams

Cheap way to steer output tone and depth; often improves perceived quality without model changes.

For engineers

Just text in the system message. Combine with other constraints. Watch for role hallucination if you ask too specific a persona.

Related

Read anything AI without the jargon

Look up any term in plain English, or save terms as you read with the free Chrome extension.

Open DecoderAdd to Chrome