Prompt Engineering Guide
πŸ˜ƒ Basics
πŸ’Ό Applications
πŸ§™β€β™‚οΈ Intermediate
🧠 Advanced
Special Topics
🌱 New Techniques
πŸ€– Agents
βš–οΈ Reliability
πŸ–ΌοΈ Image Prompting
πŸ”“ Prompt Hacking
πŸ”¨ Tooling
πŸ’ͺ Prompt Tuning
πŸ—‚οΈ RAG
🎲 Miscellaneous
Models
πŸ“ Language Models
Resources
πŸ“™ Vocabulary Resource
πŸ“š Bibliography
πŸ“¦ Prompted Products
πŸ›Έ Additional Resources
πŸ”₯ Hot Topics
✨ Credits
πŸ§™β€β™‚οΈ Intermediate🟦 Revisiting Roles

Revisiting Roles

🟦 This article is rated medium
Reading Time: 3 minutes

Last updated on August 7, 2024

Takeaways
  • Diminished Effectiveness: Role prompting is less effective in newer models like GPT-4 compared to older models, which benefited significantly from this technique.
  • Maximizing Role Prompting: The article discusses strategies to enhance role prompting's effectiveness, such as using longer, more detailed prompts, automatic role generation, and combining multiple personas.

Why Revisit Role Prompting?

While older models like GPT-3 davinci-002 reaped significant benefits from Role Prompting, as described in a previous article, the efficacy of this strategy appears to have diminished with newer models such as GPT-3.5 or GPT-4. This observation is largely anecdotal and is based on practical usage rather than rigorous systematic testing.

To illustrate, assigning the role of "a doctor" or "a lawyer" amplified the relevance and depth of answers in health or legal contexts respectively in previous versions of AI models. This indicates that role prompts contributed to raising the model's comprehension of the subject matter at hand.

However, this level of enhancement seems to be less evident in more recent versions. These advanced models already have a sophisticated understanding and are often sufficiently accurate without the need for role-based reinforcement.

More on Roles

Roles can be much longer than a sentence. They can ask the AI the complete specific tasks. See a few examples from Awesome ChatGPT Prompts below .

Act as an Etymologist

I want you to act as an etymologist. I will give you a word and you will research the origin of that word, tracing it

back to its ancient roots. You should also provide information on how the meaning of the word has changed over time,

if applicable. My first request is "I want to trace the origins of the word 'pizza'".

Act as an Absurdist

I want you to act as an absurdist. The absurdist's sentences are meaningless. The words used by an absurdist are completely

ridiculous. The absurdist does not make commonplace sentences in any way. My first suggestion request is "I need help

creating absurdist sentences for my new series called Hot Skull, so write 10 sentences for me".

Automatically Create a Role

You can ask the AI to create a role for you! You can then use this role as part of another prompt. Try it out here:

Multiple Personas Working Together

A final anecdote is that you can use multiple role prompted Large Language Models (LLMs) to work together. This can often lead to improvements in both accuracy and quality of text generation.

Conclusion

The improved accuracy of newer AI models has decreased the efficacy of the simple role prompting techniques you have learned about previously. However, with more advanced roles, we can still take advantage of this approach and guide an LLM response to a desired output format or style.

FAQ

Why do we need to revisit role prompting?

Assigning a role like "you are a doctor" to an LLM could significantly improve the outputs of older AI models, but it does not have the same effect on newer models like GPT-4 that already have a sophisticated understanding of an input.

How can role prompting still be effective?

Role prompting can still be a great prompting technique, even with newer models, if we introduce longer and more descriptive role prompts, ask the AI to automatically generate a role, or combine multiple role prompted LLMs to work together.

Sander Schulhoff

Sander Schulhoff is the Founder of Learn Prompting and an ML Researcher at the University of Maryland. He created the first open-source Prompt Engineering guide, reaching 3M+ people and teaching them to use tools like ChatGPT. Sander also led a team behind Prompt Report, the most comprehensive study of prompting ever done, co-authored with researchers from the University of Maryland, OpenAI, Microsoft, Google, Princeton, Stanford, and other leading institutions. This 76-page survey analyzed 1,500+ academic papers and covered 200+ prompting techniques.

Footnotes

  1. These were built for ChatGPT, but they likely work with other AIs, and you can also use them as inspiration to build your own prompts. ↩

  2. Wang, Z., Mao, S., Wu, W., Ge, T., Wei, F., & Ji, H. (2023). Unleashing Cognitive Synergy in Large Language Models: A Task-Solving Agent through Multi-Persona Self-Collaboration. ↩

Copyright Β© 2024 Learn Prompting.