Prompt Template

Prompt Templates

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

What is a prompt template?

A prompt template is a standardized format used to create text data that is provided as input when utilizing conversational generation AI such as ChatGPT. Typically, it is used by filling in the specified content in a text template with several input fields and then inputting it into ChatGPT or similar systems.
By providing pre-defined fields in the form of a template for users to input, this can be used as a means to control the quality and content of responses. By assetizing the know-how gained from using generative AI as a template and making examples that produce good output reusable, it can also be a way to effectively promote the use of generative AI within an organization.

Without a prompt template

First, let's try having ChatGPT respond without using a prompt template. This is an example of using it to have the AI generate ideas for catchy slogans to promote apples.

Think of some catchphrases to promote apples.

Here are some examples of catchphrases to promote apples:

  1. "An apple a day keeps the doctor away!"
  2. Get healthy with apples!
  3. "The natural deliciousness of apples!"
  4. "Apples refresh your body and mind!"
  5. "The more you eat, the more energetic you become! Apple power!"

They do create a proposal for now, but the proposals they come up with are not necessarily appropriate for the purpose you want to use them for.

Therefore, in order to obtain the desired output, there are various techniques for modifying the input given to ChatGPT, and these are called prompt engineering. Prompt templates (or templates) are one such technique.

Prompt template example

Many different prompt templates have been devised, but as an example, let's create one based on the content published in the "Guidelines for the Use of Text Generation AI," which is a guideline for the use of text generation AI created by the Tokyo Metropolitan Government.

Because it is published by the Tokyo Metropolitan Government, you can use it without worrying about the rights, and if you ask other people to use it, it is easier to explain and get them to understand if it is from the Tokyo Metropolitan Government.

  • position
    • Make your position clear
      (Administrative field and position, role given to text generation AI, etc.)
  • Purpose/background
    • Specify the purpose and background
      (Prerequisites and issues)
  • Output format
    • Specify the output format
      (number of characters, English, bullet points, etc.)

Excerpted and organized from the Tokyo Metropolitan Government's "Guidelines for the Use of Text Generation AI"

For example, you can create a template like the one below.

Request details

#position
Clarify your position (administrative field, position, role to be given to text generation AI, etc.)

#Purpose/Background
Specify the purpose and background (organize prerequisites and issues)

#Output format
Specify the output format (number of characters, English, bullet points, etc.)

Let's imagine using this in the previous example of "having a generating AI come up with catchy slogan ideas to promote apples," and fill in the parts that need to be entered. When actually using something like this, when filling in the template,

  • For each requested item, it is necessary to reconsider what your purpose is and what you want to achieve.
    • Or you might realize that you "hadn't considered" something.
  • Furthermore, it is necessary to clearly specify these things in text.

I think you'll understand that too.

Think of a phrase to promote apples.

#position
As the Public Relations Director of Aomori Prefecture, I would like you to come up with a phrase.
Please create the text in a sophisticated style, as if you were a world-renowned award-winning writer.

#Purpose/Background
We want people to know about the appeal of apples, their health benefits, and new ways to cook them.
By doing so, we hope to reduce the number of people who think apples are unattractive and increase apple consumption.

#Output format
Please write in bullet points, each about 200 characters long.

Rather than being a model input, I created this as an example so that anyone could fill it in. Let's try entering the above as input.

  1. Aomori apples are natural gems recognized worldwide, harboring the mysteries of nature. No other fruit truly conveys the blessings of nature.
  2. Eat Healthy - Eating an apple every day will help protect your health. Its high vitamin C and dietary fiber content are essential for beauty and health.
  3. Aomori apples have a unique flavor and a world-class balance of sweetness and acidity, and a distinctive aroma. They are great for simple uses and also complement cooking perfectly.
  4. Innovative apple recipes - great for cooking too! Taking advantage of the sweetness and tartness of apples, new and innovative apple dishes such as apple pizza and apple salad are appearing one after another.
  5. Aomori's apple orchards are a world-famous tourist attraction. With beautiful scenery and fresh apples, this area is sure to become yours once you've visited!

Whether this is sufficient or not is a question, but the output has changed considerably since the beginning. Let's try changing some conditions, such as the output format.

Think of a phrase to promote apples.

#position
As the Public Relations Director of Aomori Prefecture, I would like you to come up with a phrase.
Please make the content easy to understand even for elementary school students.

#Purpose/Background
We want people to know about the appeal of apples, their health benefits, and new ways to cook them.
By doing so, we hope to reduce the number of people who think apples are unattractive and increase apple consumption.

#Output format
Output it as hip hop lyrics.

After entering the above, you will get the following, for example. Regardless of whether these are well-written lyrics, you can see that the instructions you gave are reflected quite well.

*The following are hip-hop lyric phrases that even elementary school students can enjoy.

Intro Yay! I'm going to introduce you to the best fruit from Aomori Prefecture! It's called apples! Everyone, listen up!

No. 1 Aomori apples are delicious! The red varieties are especially sweet and juicy. They're also packed with vitamin C and help fight colds. Include apples in your daily diet!

Chorus: Apples! Apples! Full of energy! Apples! Apples! They're good for your body! Aomori apples aren't just delicious; they're also healthy and fun, we want everyone to know about them!

Number 2: Apples can be used in a variety of dishes. They're great in salads, pies, and smoothies. But peeling and seeding are grown-up jobs. When you grow up, you can help out!

Chorus: Apples! Apples! Full of energy! Apples! Apples! They're good for your body! Aomori apples aren't just delicious; they're also healthy and fun, we want everyone to know about them!

No. 3 Aomori has many apple orchards. There are beautiful scenery and lots of cute apples. You can even go apple picking in the orchards. Eat lots of apples with your family and friends!

Chorus: Apples! Apples! Full of energy! Apples! Apples! They're good for your body! Aomori apples aren't just delicious; they're also healthy and fun, we want everyone to know about them!

Outro: Brought to you from Aomori Prefecture with lots of love and energy! Apples are the best! Let's all eat some!

Outro: Next time you eat a delicious apple, sing along with enthusiasm! Aomori apples are the most delicious!

Other template examples

There are many suggested prompt templates.

Fukatsu Prompt System

There is a famous template commonly known as the "Fukatsu style," which was devised by Takayuki Fukatsu, the CXO of Note Inc. (as of January 2024).

#Orders
you Professional editor is.
Based on the following constraints and input statements: Best Summary Please output:

#constraints

  • The number of characters is about 300.
  • Easy to understand even for elementary school students.
  • Don't leave out any important keywords.
  • Keep your writing concise.

#Input statement
<Input document here>

#Output statement:

Will this dramatically change your work?! The latest in ChatGPT usage – from YouTube

This is a template that can be used to program the task of providing input data, processing it according to constraints, and outputting the data, much like programming in Japanese.

Since we had the chance, we tried inputting the "Ringo's Hip Hop" we created earlier directly into the "<Input document here>" section and summarizing it.

The appeal of Aomori apples is that they are rich in vitamin C, which makes them effective in preventing colds. They are also recommended for use in salads, pies, and smoothies, making them an essential fruit for your daily diet. Aomori has many apple orchards, where you can enjoy apple picking while taking in the beautiful scenery. We hope that children will also enjoy apples before they become adults, having fun peeling and removing the seeds. Apples from Aomori not only provide health but also fun. Let's all eat Aomori apples and get healthy!

The writing style is a little stiff, so it's not as easy to understand for elementary school students as I'd hoped, but the content was generally summarized as instructed.

It is expected to have the effect of guiding users.

While widely used templates are designed with consideration for formatting to make the content of ChatGPT and other formats easy to understand, generation AI is also constantly improving. It's likely that it will eventually be able to understand and output requests without needing to be written in a fixed format. However, the problem of humans not knowing "what to write" will remain.

ChatGPT cannot create output that takes into account information not provided in the input. For example, if you are thinking of a catchphrase for an apple, the background and circumstances of how it was created and why are information that ChatGPT cannot access or know.

Therefore, it is up to the user to write the necessary information properly, but some people may not be able to think of what to write. In such cases, templates can be effective in guiding users on "what to write."

We want our company to utilize our AI-generated content, but some people will be able to use it effectively on their own, while others won't. Templates will be useful in such situations to ensure widespread adoption.

Make templates suitable for your company's business into your company's assets

Also, if you create a template that effectively completes tasks in your company's business, you can share the template within the company and improve everyone's work efficiency. In other words, templates can become an asset to your company's business.

For example, let's rework the apple tagline from above to fit a specific situation.

Think of a sentence to tell your salesperson about the characteristics and merits of the apples you are shipping.

#position
We are in the position of selling apples wholesale to retailers who buy them.
Create the most understandable writing that will impress everyone.

#Purpose/Background
We will help the store staff understand the characteristics of the apples you will be purchasing this time.
When retailers sell apples in stores, they need to be provided with useful information and phrases on how to promote them.

#Characteristics of the apples being shipped this time

  • Sugar content: Low
  • Acidity: Refreshing acidity
  • Appearance: There are some scratches, but the taste is fine.
  • Price: A bit high, but considering it's early, it's still cheap
  • Recommended ways to eat: Eat it chilled and raw, or make it into an apple pie

#Output format
Please briefly explain to the store representative the characteristics and merits of this apple.
Next, when selling these apples in-store, what points should you promote and come up with some example catchphrases?

In this way, by having employees fill in the underlined parts as needed, anyone in the company can utilize the AI to generate output tailored to their specific business needs. Now, let's actually feed the above into ChatGPT.

Hello! I would like to introduce the apples that arrived this time.

【Features】

  • Although the sugar content is low, you can still feel the refreshing acidity.
  • The outside is a little damaged, but the taste is not affected at all.
  • The price is a bit high, but considering it's early, I think it's a great deal!
  • The recommended way to eat it is to chill it and bite into it whole, but it's also delicious in apple pie!

【point】

  • Because it has a low sugar content, it is also recommended for use in sweets such as apple pie.
  • There may be some imperfections on the outside, but we are confident in the taste!
  • Although the price is high, it is a great deal for apples at this time of year.

[Catchphrase]

  • "The blemishes are part of the flavor" - this is the idea behind these exquisite apples!
  • Eating this apple will give you lots of energy!
  • Low sugar content and a refreshing acidity! This is the real deal!
  • This much flavor at this price during this time!
  • Delicious Aomori apples in your hands!

What do you think? Just by filling in the underlined parts, an environment has been created where they can create explanatory and PR text that takes into account both the good and the bad. Some of the catchphrases are so good that you would want customers to see them as they are.

Also, this template was created by me as an example and is not designed to produce particularly excellent output, so if you use it in your work and continue to improve it, you should be able to create a template that automatically produces even better output.

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