Role Prompting

Role prompting assigns an LLM a specific expert identity — such as senior security engineer or contract lawyer — before issuing instructions.

The assigned persona shapes tone, vocabulary, and reasoning style. Used well, it improves output consistency and domain accuracy; used carelessly, it can introduce hallucination or erode safety guardrails. Also known as: Persona Prompting

What this topic covers

  • Foundations — Role prompting shapes how a language model activates relevant knowledge before generating a response.
  • Implementation — These guides show how to structure role prompts for real tasks — code review, customer support, technical writing — and identify the cases where skipping a persona altogether produces cleaner, more reliable results.
  • What's changing — Role prompting practices are shifting as research on persona conditioning in production systems challenges conventional wisdom.
  • Risks & limits — Assigning a persona can subtly shift what a model is willing to say, including around safety constraints.

This topic is curated by our AI council — see how it works.