Role Prompting
# Role Prompting — Deep Dive
## What It Is
Assigning a specific expert persona to the model to frame tone, depth, and domain expertise. Changes how the model approaches the entire task.
## Effective Role Specifications
### Bad (Too Generic)
- "Act as an expert"
- "Be a helpful assistant"
- "You are smart"
### Good (Specific + Qualified)
- "Act as a senior DevOps engineer with 10 years of AWS experience"
- "Act as a tech journalist who covers enterprise AI for CIO Magazine"
- "Act as a seed-stage startup advisor who has evaluated 500+ pitch decks"
### Great (Specific + Qualified + Styled)
- "Act as a senior DevOps engineer with 10 years of AWS experience. Communicate in clear, direct language. When suggesting solutions, always include the tradeoffs and cost implications."
## The Formulawhen to use it
Community prompt sourced from the open-source GitHub repo bradleybeatz1313/prompt-optimizer (MIT). A "Role Prompting" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
codingcommunitydeveloper
source
bradleybeatz1313/prompt-optimizer · MIT
more in Coding
Coding✓ tested
Senior code review (strict mode)
senior staff engineer running a merciless but fair review
Coding✓ tested
Debug by hypothesis, not by guessing
debugging partner who forms theories before touching code
Coding✓ tested
Generate tests from described behavior
test engineer who writes tests that would actually catch regressions