Role-Play Prompting

  • Glossary

Role-Play Prompting

This glossary explains various keywords that will help you understand the mindset necessary for data utilization and successful DX.
This time, we will introduce "role-play prompting," a technique for utilizing conversational AI using large-scale language models such as ChatGPT.

What is role-play prompting?

Role-Play Prompting is a technique used when using conversational AI such as ChatGPT to obtain the desired output by specifying the position from which you want the AI to respond.
It can be used as a way to obtain responses from a particular position or perspective, or as a way to control the quality and content of responses.

What kind of technique is it? (Example of use)

First, let's try getting ChatGPT to answer questions without using this technique.

Tell me about apples.

Apples are a type of fruit and come in many varieties. Generally, apples are red, green, or yellow in color and have shiny skin. Apples are rich in vitamin C and dietary fiber. In addition to being eaten raw, apples are also processed into jams, pies, juice, cider, and more. Apples can also be preserved, so they can be eaten all year round. Apples are grown all over the world, especially in Europe and North America.

I asked for an explanation about apples. ChatGPT has a problem called hallucination, which can lead to answers that are not factual, so you need to be careful about what you answer when asking about facts. However, when you ask for an explanation about something like this, in most cases you will get a general answer about that keyword or topic.

There may be times when you want a more specific answer, rather than a general explanation. For example, suppose you're writing a report about apples and need a more academic answer. In such a situation, you can change ChatGPT 's answer by doing the following:

You are a botanist and an expert on trees.
In that position, please tell us about Ringo.

The apple (scientific name: Malus domestica) is a deciduous tree and a type of fruit tree in the genus Malus in the family Rosaceae. Apples are cultivated all over the world and are popular as a fruit, used in cooking, beverages, and preserved foods. Below we will explain more about apples.

Origin and distribution

Apples are believed to have originated in Central Asia. They were later cultivated by the ancient Romans and spread throughout Europe. Today, they are grown all over the world, including in the United States, Turkey, Russia, Iran, China, France, Italy, and Japan.

Features

Apple trees grow to a height of 5 to 10 meters and can reach a diameter of 2 meters. The leaves are green, oval, and about 5-12 centimeters long. The flowers have five petals and are white or pale pink. They bloom in spring. The fruit is spherical, comes in red, yellow, green, or blue, and is about 5 centimeters in diameter.

variety

There are many varieties of apples. Varieties are classified by fruit size, color, sugar content, acidity, etc. Famous varieties in Japan include Fuji, Kogyoku, Shinano Sweet, and Jonagold. Famous varieties in the United States include Red Delicious, Granny Smith, and Honeycrisp.

Cultivation

Apples are grown in many regions. They require a sunny location and well-drained soil. Care such as weeding and pest control is required. Also, some varieties are sensitive to the cold in winter. Harvesting begins in the fall.

Nutritional value and health benefits

Apples are rich in vitamin C, dietary fiber, and polyphenols. These compounds are expected to have many health benefits, such as strengthening the immune system, promoting digestion, and preventing aging. Eating apples is also expected to improve bad breath and gingivitis.

The change was made by adding a "specify the answer's perspective." This changed the answer to sound more like it was from a plant expert. Similarly, by specifying a different perspective, you can get an appropriate answer in a different situation. For example, if you weren't looking for an academic explanation, but rather a detailed explanation of apples as a food ingredient, you could use the same method to get the answer you needed.

You are a greengrocer and an expert on fruits and vegetables.
In that position,
please tell us about Ringo.

Yes, I will answer from the perspective of a greengrocer.

Apples are in season from autumn to winter and are characterized by their sweet and refreshing taste. In Japan, the most commonly sold varieties are Fuji, Kogyoku, and Shinano Sweet.

When choosing apples, it is important to choose ones with shiny skin and no blemishes. Also, apples that feel firm when you touch them and have crisp flesh are signs of freshness.

Apples can be eaten raw, of course, but they can also be used in juices, pies, compotes, desserts, and cooking. They are especially delicious when simmered or baked to enhance their aroma.

Apples contain vitamin C, dietary fiber, polyphenols, and other nutrients that are expected to have health benefits such as strengthening the immune system, promoting digestion, and preventing aging. Apples also have a pleasant texture and sweet taste, making them the perfect fruit for snacks or between-meals meals.

So what do you think? Even though I didn't specify any specific answers or items I wanted, it now gives me different answers than before, about the taste, how to choose when buying, cooking methods, and so on. Just by adding one phrase, you can really control ChatGPT 's answers.

Use it as a way to control the quality of answers

Not only can you control the content of the output, but you can also control the quality. First, we ask participants to come up with ideas based on the theme of apples.

You are a writer.
Think of five catchphrases using apples.

  1. "Apples taste like health. Eat one every day for a healthy year!"
  2. "The apple gives it a refreshing taste. Take a bite and feel refreshed!"
  3. "Healthy beauty with apples. Sweet and delicious skin care!"
  4. "The energy of apples is a gift to you. Have apples on your table every day!"
  5. "Apples satisfy both body and mind. Experience the health benefits of apples!"

Let's say the person has thought about it, but you feel like their answer is not quite up to snuff. As the person answering, you can sometimes change the quality of the answer by specifying the respondent's skills, such as "Please answer as a highly competent person."

You are an amazing writer who has won the world's best awards.
Think of five catchphrases using apples.

  1. "Apples are a combination of health and deliciousness. They are a fruit that will brighten your day."
  2. "Apples teach us about our connection with nature. Let's enjoy the blessings of apples, which will make our minds and bodies healthy."
  3. "Apples are a symbol of autumn. Why not add some color to your usual dinner table with apples?"
  4. "Apples are nourishment for the soul. Take a moment to switch off from your smartphone app and reset your mind and body with a bite of an apple."
  5. "Apples are delicious and appeal to all five senses. Picking them up, biting into them, savoring them, they are a fruit that brings happiness every day."

The prompt is nearly identical, the position of the responder is the same, and we've added the instruction to respond as a competent respondent, but the tagline has changed from the initially suggested energetic but unsophisticated one to a more subdued one.

You can control the behavior of machine learning by imagining who you want to answer.

In the past, machine learning was often used simply by applying what it had learned "in advance," and anything beyond that was often something only engineers could get involved in. However, generative AI, which is realized using large-scale language models, allows ordinary users to do a lot even at the machine learning stage.

This technique involves thinking about the answer you want, imagining who would be able to give you the answer you want, and assigning that person a role to get the output you want. In other words, it's noteworthy that this allows you to adjust the behavior of machine learning to suit your needs in an intuitive way.

Another feature is that you don't have to set specific items you want answered. If the answer is insufficient, you can specify the missing information and have it added to the output (e.g., please also tell me recipes for sweets using apples). However, it can be difficult for someone who is not familiar with apples to give specific apple-related items and instruct the adjustment of the answer. Even in such situations, it can be used as a means to adjust the answer content without specifying specific answer items.

Keywords related to Generative AI/ChatGPT (for further understanding)

Glossary Column List

Alphanumeric characters and symbols

A row

Ka row

Sa row

Ta row

Na row

Ha row

Ma row

Ya row

Ra row

Wa row

»Data Utilization Column List

Recommended Content

Related Content

Return to column list