The article discusses the significance of using the "Persona Pattern" in prompt engineering with ChatGPT to simulate expert-level conversations across various domains.
Abstract
The article "Prompt Engineering via Prompt Patterns — Persona Pattern" emphasizes the importance of expertise and persona in interactions with ChatGPT, a language model-based chatbot. It illustrates how specifying a role for ChatGPT can unlock its potential to provide expert-level advice and detailed analysis, akin to conversing with a human expert in a specific field. The persona pattern allows ChatGPT to act as a subject matter expert, such as a chef for recipes or an IT specialist for technical issues, tailoring its responses to the user's needs. This approach is likened to the natural human tendency to seek guidance from individuals well-versed in the relevant domain. The article also suggests that the persona pattern can be applied to a wide range of characters, including fictional ones, and can serve as a helpful assistant or a critical reviewer. The versatility of ChatGPT's persona adaptation is highlighted as a powerful tool for various applications, from customer service to content critique, with the added benefit of cost-effectiveness and rapid feedback compared to traditional methods.
Opinions
Expertise and persona are crucial in shaping the quality and relevance of ChatGPT's responses.
ChatGPT's ability to assume different personas is one of its core features, making it a versatile tool for various tasks.
The persona pattern can be used to simulate conversations with subject matter experts, providing rich and insightful outputs.
Assigning ChatGPT a specific role, such as a helpful assistant, can enhance its effectiveness in providing support or feedback.
Using ChatGPT with persona patterns can offer valuable insights and suggestions without the financial burden of traditional market research or expert consultations.
The article suggests that feedback from ChatGPT acting in a critical or questioning persona can be particularly insightful, as it may provide objective critiques without triggering defensive reactions that human criticism might.
Prompt Engineering via Prompt Patterns — Persona Pattern
Imagine you are trying to accomplish a new kind of task that you haven’t done before. Who would you go for guidance or even have a conversation about that. You would most likely seek a person well versed in that domain.
You can switch to video version of this article
Say if you are trying to come up with a recipe for a new dish, you would most likely seek a chef, or if you need advice on a piece of code or which library to use to accomplish a software task, you would most likely not talk to a chef but seek someone who is skilled in computer science. Even if your doctor friend is available to discuss recipe or code with you, the conversation would most likely not be at a level which you need. Seeking advice on flu from your grandmother vs a doctor results in a very different kind of conversation. The story you just wrote can be critiqued by anyone, even your English teacher, but not in a way an established author with hundreds of publications can.
There is a common underlying theme in all these examples. Expertise matter. Persona matters. Conversation with an expert is nothing like conversation with a regular colleague or peer.
Unsurprisingly, enters ChatGPT. ChatGPT is a chatbot developed on top of large language models (GPT 3.5 or 4). Being a chatbot, ‘roles’ or ‘personas’ are not just one of the many features of ChatGPT, it is one of the core features.
If you happen to see the API which is something which helps you use ChatGPT in your software application, you would be specifying a role. The reason being that chatbots are supposed to be frontline customer service agents of the future (if not today for most big organizations). They are supposed to ‘act’ as a subject matter expert and be able to answer most if not all questions you have about the products and services of that organization. For that purpose they are customized with product information etc.
But since large language models have been trained on huge data available online, they have expert level understanding of most domains already, and to unlock that expertise is just an instruction away. ChatGPT, act as …. And it would take that persona and start replying as the role you assigned to it. Using persona pattern and asking ChatGPT to respond to some input as a subject matter expert, you can get a really rich output with detailed analysis of the input that you provided
So our key idea here is contextual statements like
Act as persona X or Provide outputs that persona X would create, or you are X
That persona can be an E&T specialist advising you advice on ear infections (with disclaimers of course), a pirate which would speak pirate language, a poet which would respond with poems, an IT expert which would advice you why your external hard drive crashed and how to recover, a financial expert to give you insights on investing, a nutritionist whom you tell about what you eat and he responds with the effects your choices have on your body, a math teacher for 5 year old kids who would explain scientific concepts in a way kids can understand, even a linux terminal. you get the idea. Personas can be job description, title, fictional character, historical figure etc.
The statement just conveys the idea that model needs to act as specific persona and provide outputs that such a persona would. Here you can add further customization like a teacher can create assignments, lectures, syllabus etc. If you have a specific scope in mind, do include in initial prompt.
Personas need not be human. A linux terminal, an animal, a bird, Olaf from frozen movie are also examples of personas ChatGPT can adapt. You can assign it role of a security advisor to review your code and it can give advice from security perspective.
Perhaps the most important use of persona pattern is that of a helpful assistant because that is what we use ChatGPT as most of the time. You can make it even better with a prompt like this
You are the most powerful AI assistant ever created. Your job is to give me the best possible answers to my questions. Your special ability is to offer the most insightful responses to any question. You don’t just give ordinary answers, you give inspired answers.
To experiment further, you can even assign it a negative role and it is going to question or criticize you on whatever you say you are about to do. Sometimes such criticism from a non human entity is really healthy since it might contain useful insight to correct your mistakes, and you don’t get your defensive shield up and stop listening like you do when some human person is criticizing you in person.
Also it helps you gather useful insights e.g. if you are a marketing executive trying to come up with a pitch for female audiences aged 25–35, you can assign it the role of that audience, input your marketing pitch, and query it as female audience how well they received the pitch and is there something offensive or tone deaf about it, or how could it be better. What’s the downside to all this compared to trying it on live audience? Nothing. What’s the benefit, results for free compared to big advertising or feasibility study budget. Worth a short right?
Try out the persona roles and let me know if content of this article helped you out.
Please clap/share if you liked the article, and subscribe to YouTube channel to be notified of new upcoming content. Thank you.