SYSTEM NOTICE

Auto translation by AI. Be sure, accuracy, nuances and authorial intent may not be fully reflected.
見出し画像

[With Examples] How to Master Chat-GPT: Decoding the [26 Principles of Prompt Input] Part 3

The "26 Principles" for optimizing interaction with Large Language Models (LLMs), published by a group of researchers at the Mohamed bin Zayed University of Artificial Intelligence (MBZUAI) in Abu Dhabi. I have been providing supplementary explanations for points 1 through 7.

This time, I will explain point 8.



8. Prompt Format: Start with "###Instruction###" and include "###Example###" or "###Question###" as appropriate -> ◎ Writing like "programming" is the best way


Simply put, this is a method for accurately conveying your wishes, questions, etc. when entering prompts into Chat-GPT.

How can you convey things "accurately"?

It is limited to conveying them "logically".

This is because Chat-GPT is an AI computer, so it is logic itself. Logical expressions are far better understood than abstract ones.

So, how do you convey things logically? It is best to write like "programming" created in computer language.

This is also the method I used in a template that is versatile and can be used for anything to some extent that I created previously (see the article below for details).

Prompt Template (Reprinted)

Please execute the #Request below.

# Request
You are a [#Role].
Please answer the [#Request Items] in the format of [#Format].
Please execute according to [#Steps].
Please execute while following [#Rules].
Please execute by referring to [#Reference].

# Role
- A public relations representative for a manufacturer promoting a new product on social media

#Request Items
- Create 5 product catchphrases of about 15 characters that are effective for promoting the new product.
- Write a promotional text for the product of about 200 characters based on the catchphrase.
- Create 5 sets of catchphrases and promotional texts.

# Format
- Use a table format
- Columns are [Draft Number] [Product Catchphrase] [Product Promotional Text]
- Rows are 5 rows. Display 5 [Product Catchphrases] and [Product Promotional Texts]

#Steps
1. Provide an answer. Once you have answered, ask me, "Is it okay to finish the answer?"
2. If I input YES, terminate the execution.
3. If I input NO, ask me, "Which draft do you like?"
4. Create 5 new drafts similar to the draft number I answered.
5. Return to step 1. However, automatically terminate after executing the #Steps 10 times.

# Rules
- Write casually to make the product feel approachable
- Write catchphrases and text that will be accepted by young people

# Reference
* If there is a reference text, copy and paste it here

The meaning of separating with "#"

By the way, I think some of you might have thought, "What is '#'?"

It doesn't have to be '#', but in programming languages, symbols like '#' or '{}' are often used to 'define' something, so these symbols are easily understood by it.

Example: How does the answer differ with '#'

So, how much of a difference is there? I will compare asking Chat-GPT using symbols like '#' versus asking without them.

I previously wrote an article about consulting Chat-GPT when I was struggling after being asked to 'teach an AI class to elementary school students'.

I will try this in two ways.

・When there is no '#'

Me
I have to teach a class about AI to elementary school students, so please tell me what kind of class I should teach.

GPT
When teaching elementary school students about AI, it is important to provide content that is easy to understand and engaging. Here are some ideas.

1. Introduction to basic AI concepts

  • What is AI: An explanation of computer systems that think and learn like humans.

  • History and evolution of AI: Explaining the evolution from simple games to today's advanced technology.

2. Examples of AI in daily life

  • Smartphone assistants: Voice recognition like Siri or Google Assistant.

  • Recommendation systems: Recommended videos on YouTube or Netflix, etc.

3. Interactive activities

  • AI conversation experience: Interaction with a simple AI chatbot.

  • Robot programming: Simple robot control using visual programming tools.

4. AI Ethics

  • Good and bad ways to use AI: Basic discussions regarding privacy and security.

  • Future of AI: A discussion on how AI will affect our lives in the future.

5. Creative projects

  • AI Art: A demonstration of using AI to create pictures and music.

  • Storytelling: Using AI to create stories and sharing them in class.

These activities help capture the interest of elementary school students and deepen their basic understanding of AI.


Hmm... If you feel that "Chat-GPT just isn't very useful," it is often because of inputs and responses like these, isn't it?

・When there is a "#"

So, what happens if you use "#"?

Me
You are [# Role]. Please answer the [# Request] in the format of [# Format]. Please execute according to the [# Procedure]. Please follow the [# Rules] to execute.

#Role
A teacher who teaches elementary school students about AI at an elementary school

#Request
Create a lesson plan about AI.

#Format
Number the lessons in order of progress and briefly write the content of each lesson

#Procedure
1. Provide an answer. After answering, ask me, "Is it okay to finish the answer?"
2. If I input YES, terminate the execution.
3. If I input NO, create another plan.
4. Return to step 1 of the procedure. However, automatically terminate after executing the #Procedure 10 times.

# Rules
・Do not use any difficult words so that elementary school students can understand.
・Make the content fun and exciting to listen to, so that children will be interested.
・There shall be five items of content.

GPT
Lesson Plan: "Introduction to AI for Elementary School Students"

Introduction: What is AI?
I will explain what AI (Artificial Intelligence) is in simple words.
For example, I will explain, "AI is like the brain of a computer, and it can think and learn just like a human."

  1. AI Examples: Let's find AI around us

    • I will introduce examples of AI that are around the students.

    • I will explain that smartphone assistants, self-driving cars, and online games use AI.

  2. Let's play with AI: AI game experience

    • We will play games using simple AI (e.g., rock-paper-scissors with AI, quiz games).

    • I will have the students experience how AI "thinks."

  3. AI Art: Let's have AI draw pictures

    • I will show a demonstration of AI drawing pictures.

    • We will do an activity where we have AI draw things that the children have thought of.

  4. Let's think together: The future of AI

    • We will discuss in class how AI might be used in the future.

    • We will debate fun topics, such as 'What would happen if AI became a school teacher?'

GPT
Are you finished with your response?

Me
No

GPT
Understood.I will create a lesson planusing a different approach.

GPT
Lesson Plan: 'Adventure! The Mysterious World of AI'

  1. The Beginning of the Adventure: Welcome to the AI Magic Forest!

    • I will introduce AI in the form of a story, 'AI is like a magic forest'.

    • I will explain how AI uses 'magic' in the magic forest, for example, 'the magic to understand language' or 'the magic to draw pictures'.

  2. AI Expedition: Let's Find AI!

    • As an expedition team, we will search for AI used at school and at home.

    • We will list examples of AI that children encounter in their daily lives, such as voice assistants and game AI.

  3. Chatting with AI: Let's Try Talking to AI

    • We will engage in an activity of talking with a simple AI chatbot.

    • We will have the children ask questions and enjoy seeing how the AI responds.

  4. Magic Artist: Making AI Draw Pictures

    • We will demonstrate AI drawing pictures.

    • We will have the children make the AI draw what they imagine and see what kind of picture it creates.

  5. Future Wizards: Let's Draw the Future Together with AI

    • Discuss in class how AI will impact the future.

    • Have the children imagine and draw a future where they live alongside AI.

GPT
Are you finished with your response?

Me
Yes


How does this compare to the lesson plan from the initial input? It has proposed a quite concrete and interesting lesson. If you take the best parts of both proposals, you should be able to create a great lesson.


High precision even in a single interaction

Basically, you cannot make good use of Chat-GPT with a "one-question, one-answer" approach.

However, if you find going back and forth many times to be a hassle, the method of using symbols like "#" as written this time to give logical instructions is very useful.

If you save it as a template in a notepad and copy and paste the template and then add or edit it according to your purpose when using Chat-GPT, you can get quite high-quality answers even in a single interaction.

To be continued next time.

* "26 Principles" for optimizing interaction with Large Language Models (LLM)

1. Omit politeness: Polite terms like "please" are unnecessary.
2. Specify the target audience: Clearly state who the response is for, such as "for experts."
3. Break down complex tasks: Divide complex tasks into simpler prompts.
4. Use affirmative instructions: Use positive language rather than negative words.
5. Instructions for clarification: Use phrases like "in simple terms" or "so that a middle school student can understand."
6. Offer rewards: Indicate that "there will be a reward for a good answer."
7. Provide examples: Use existing examples.
8. Prompt formatting: Start with "###Instruction###" and include "###Example###" or "###Question###" as appropriate.
9. Clear task instructions: Give instructions starting with "Your task is."
10. Mention penalties: State that "there is a penalty."
11. Request answers in natural language: Instruct the model to "answer in natural language."
12. Use leading words: Instruct the model to "think step-by-step."
13. Eliminate bias: Instruct the model to "be unbiased and not rely on stereotypes."
14. Encourage dialogue with the user: Have the model ask questions until the problem is solved.
15. Include testing: Have the model provide a test to check your understanding.
16. Assign a role to the model: Assign a specific role to the model.
17. Use delimiters: Use specific delimiter characters.
18. Use repetition: Use specific words or phrases multiple times.
19. Chain of thought: Generate intermediate steps and combine examples.
20. Use output primers: End the prompt with the beginning of the expected output.
21. Instructions for detailed text creation: Instruct the model to "write in detail."
22. Prevent style changes: Instruct the model "not to change the style."
23. Coding prompts for multiple files: To streamline coding tasks across multiple files, suggest creating a script that automatically creates new files and inserts the generated code into the appropriate files.
24. Continue with specific words: Instruct the model to "complete with the given words."
25. Specify requirements for the model: Clearly state the requirements the model must follow to produce content, in the form of keywords, regulations, hints, instructions, etc.
26. Text creation based on samples: Instruct the model to write in the same language as the sample.


いいなと思ったら応援しよう!