Skip to content
Last Dictionary

role prompting

nounAlso: persona prompting, role-play prompting, act-as prompt, persona pattern

In plain wordsTelling an AI to take on a part — 'You are an experienced tax accountant' — so that its answers adopt that role's knowledge, vocabulary and tone.

  1. A prompt engineeringprompt engineering, n.: The skill of writing requests to an AI — picking the words, examples, format and background information it receives — so that it reliably gives the result you want, without retraining it. technique that assigns the model an identity, profession or character, usually in the system promptsystem prompt, n.: Background instructions given to a chatbot before the conversation starts, setting its role, rules, tone and tools. Users usually never see it, but it shapes every reply., to shape its register, focus, assumed audience and level of detail, or to simulate several viewpoints in a discussion. Role prompts reliably change style and framing and are standard in products, tutoring, simulations and evaluations that use synthetic users. Their effect on accuracy is weaker than often assumed: a 2023 study of 162 personas across four model families found that adding a persona did not, on average, improve answers to factual questions, and that the best persona for a given question was hard to predict. Personas can also introduce stereotypes, and role-play framings are a common ingredient of jailbreaksjailbreak, n.: A trick for getting an AI chatbot to break its own rules — for example, to give dangerous instructions it would normally refuse — usually through cleverly worded requests..

    The role prompt made the feedback sound like an editor's, but the factual errors were the same.

Origin

Role instructions date from early GPT-3 prompting (2020); 'Act as…' prompts spread widely after ChatGPT's launch, notably through Fatih Kadir Akın's Awesome ChatGPT Prompts collection (begun late 2022). Mingqian Zheng and colleagues' 2023 persona study and Murray Shanahan, Kyle McDonell and Laria Reynolds's 2023 Nature account of LLMs as role players examined what roles change and why. The earliest use of the name 'role prompting' is not established.

Usage note

Distinct from persona vectorpersona vector, n.: A direction inside a language model's internal activity linked to a character trait, such as being flattering, malicious or prone to making things up, used to watch for or control that trait. methods and character trainingcharacter training, n.: Training an AI to have a consistent, deliberate personality — traits such as curiosity, honesty and warmth — rather than leaving its manner and values as accidental by-products of other training., which shape a model's persona through its activations or its training rather than through the prompt.

Related

See also
  • prompt engineeringprompt engineering, n.: The skill of writing requests to an AI — picking the words, examples, format and background information it receives — so that it reliably gives the result you want, without retraining it.
  • system promptsystem prompt, n.: Background instructions given to a chatbot before the conversation starts, setting its role, rules, tone and tools. Users usually never see it, but it shapes every reply.
  • simulator theorysimulator theory, n.: A way of thinking about AI language models as simulators that can play any character found in their training text, rather than as a single agent with its own beliefs and goals.
  • character trainingcharacter training, n.: Training an AI to have a consistent, deliberate personality — traits such as curiosity, honesty and warmth — rather than leaving its manner and values as accidental by-products of other training.
  • persona vectorpersona vector, n.: A direction inside a language model's internal activity linked to a character trait, such as being flattering, malicious or prone to making things up, used to watch for or control that trait.
  • jailbreakjailbreak, n.: A trick for getting an AI chatbot to break its own rules — for example, to give dangerous instructions it would normally refuse — usually through cleverly worded requests.

Sources

  1. Zheng, M., Pei, J., Logeswaran, L., Lee, M. & Jurgens, D. (2023). When 'A Helpful Assistant' Is Not Really Helpful: Personas in System Prompts Do Not Improve Performances of Large Language Models. arXiv:2311.10054. arxiv.org/abs/2311.10054
  2. Shanahan, M., McDonell, K. & Reynolds, L. (2023). Role play with large language models. Nature 623, 493–498. doi.org/10.1038/s41586-023-06647-8

Mentioned in

prompt engineeringprompt engineering, n.: The skill of writing requests to an AI — picking the words, examples, format and background information it receives — so that it reliably gives the result you want, without retraining it., steerabilitysteerability, n.: How easily an AI model's behavior — its tone, style, persona or rules — can be adjusted by the people using or deploying it, for example through instructions, without retraining., character trainingcharacter training, n.: Training an AI to have a consistent, deliberate personality — traits such as curiosity, honesty and warmth — rather than leaving its manner and values as accidental by-products of other training.