ChatGPT prompt word skills

Since the advent of computers, the way humans interact with computers has gone through several important stages:  

  1. Command-based Interaction

Early computer systems mainly adopted instruction-based interaction, and users needed to input specific commands or codes to complete various tasks. Although this interactive method is powerful, for ordinary users, the threshold is high and the operation is not intuitive enough.  

  1. Graphical User Interface (GUI)

With the development of technology, the graphical user interface (GUI) came into being. By introducing visual elements such as images, icons, and windows into the interactive interface, GUI makes computers more accessible and easy to use. Users can intuitively complete tasks through operations such as mouse clicking and dragging, which greatly reduces the threshold for using computers  

  1. natural language processing

Since the advent of GPT, the general argument is that the interaction between humans and computers has entered the stage of natural language processing, that is, the interaction between humans and computers has become a series of tasks through natural language interaction and instruction transmission.    

In the graphical user interface stage, there is an intermediate layer, that is, the developer completes the development and packaging of the application instead of the user, so that the user sees a simple and easy-to-use interface. Under the natural language processing method, ordinary users also have the ability to directly interact with the computer. With the improvement of various capabilities, it is possible to generate a browser plug-in or website that can be used by interacting with GPT-4. The OpenAi official website lists Dozens of different usage examples  

 The use of ChatGPT is the same as communicating with people. How to obtain high-quality results also requires skills. This technique is called Prompt (prompt words). The difference is that with girlfriends, friends, relatives, subordinates and bosses, each role has Different communication skills are required. You can’t just tell your girlfriend to drink more hot water, and you can’t tell the boss what to do. You have to consider the role identity, environment, communication content, and the emotions of the communication partner. The communication skills with ChatGPT are much simpler. There is one and only way to describe the requirements clearly in a simple way. This article will not discuss why the skills are effective, but only discuss how to clearly describe the requirements that ChatGPT can understand.

If you have a mathematical equation that you want a language model to solve, you can create prompt words by asking "what is an equation".  

For a given problem, your full prompt might look like this:  

1,000,000 * 9,000等于几?   

 

For this prompt, GPT-3 (text-davinci-002) sometimes answers 9,000,000 (wrong). This is where hint engineering comes in.  

If instead of asking what is 1,000,000 * 9,000?, we asked what is 1,000,000 * 9,000? Make sure to enter the correct number of zeros, even if there are many: , GPT-3 will answer 9,000,000,000 (correct). This is also the purpose of Prompt, to increase the success rate of generating high-quality and correct information.  

We can think of ChatGPT as a kindergarten student (for the time being, he already has the mind of a 9-year-old child), you are the kindergarten teacher, how to educate children, and you can use this role to talk to him, the skills in the article are almost It can be used to communicate with children...  

  1. Encourage him that you are a good boy (define the role)

  2. What needs to be done (clear instructions)

  3. How would you like to do this (desired outcome)

  4. for example

  5. Guided step by step to help him break down (Chain of Thought)

……  

The above methods are all techniques that can produce high-quality responses. Currently, there is no prompt word dictionary for prompt word techniques. These techniques have different effects in different scenarios. It is also a good method to mix multiple techniques.  

Universal Formula - Two Standard Frameworks

The first universal formula is from the framework summarized by Elavis Saravia (https://github.com/dair-ai/Prompt-Engineering-Guide/blob/main/guides/prompts-intro.md), in his method Prompt It needs to contain the following elements:  

  • Instruction (required): Instruction, that is, the specific task you want AI to perform, such as translating or writing a paragraph of text.

  • Context (optional): background information, giving AI more background information to guide the model to make a reply that is more suitable for the needs.

  • Input Data (optional): Input data to inform the model of the data that needs to be processed.

  • Output Indicator (optional): The output guide tells the model the type or style we want to output.

As long as you write the prompt according to this framework, the results returned by the model will not be bad.  

The second universal formula is what I often use. It is somewhat similar to the previous framework. In order to facilitate the replacement of the Context background information in the Elavis Saravia framework with roles (defining roles is one of the convenient techniques for describing background information)   

role + instruction + expectation + content     

 write a movie review  

Many AI applications, such as the weekly report generator and Xiaohongshu copywriting generator, call the API interface of GPT, and prefabricate some prompt effects. In all scenarios, the four elements in the universal formula must be input, which can be combined arbitrarily. There are many other techniques depending on the usage scenario.

 

Take on the role

This method is the most commonly used and simplest technique. By defining a role for AI to complement the background, you can define him as a teacher, translator, author, doctor, development expert, etc., so that he can fully understand background of the requirement. In addition to defining the AI's role, you can also define your own role.  

 

 Chain of Thought Prompting

Chains of thought are a hint method that helps it break down the steps, and it encourages large language models to explain its reasoning. The figure below shows a comparison of general prompts (left) and thought chain prompts (right).  

 

Zero Shot Chain of Thought

The Zero-Sample Thought-Chain Prompt is a follow-up to the Thought-Chain cue word, introducing a very simple zero-shot cue. They found that by appending the words "Let's think step by step." at the end of the question, the large language model was able to generate a chain of thoughts that answered the question. From this chain of thought, they were able to extract more accurate answers.  

 

Desired result

 By adding qualifiers to tell the model what the expected result is or what it is not, the efficiency of the reply can be further improved. If you do not add the expected result, you may need multiple rounds of dialogue to get the information you need  

for example

The above cases are specific expression skills to describe the needs clearly, but in some scenarios, it is difficult to express clearly in words what we want AI to do. At this time, we can use examples to add a few prompt words Example to help ChatGPT better understand this requirement  

Use ### or """ to distinguish between instructions and content 

In some scenarios, when we need AI to help us with translation, summary and other optimization work, the content will be provided in the prompt word. By adding ### or """ before and after the content, it can help AI distinguish  

Error demonstration ❌:  

   Summarize the text below as a bullet point list of the most important points.{text input here}                  

Proper demonstration ✅:  

   Summarize the text below as a bullet point list of the most important points.Text: """{text input here}"""                  

The techniques described in this article have basically been recognized by users, but they cannot be guaranteed to be applicable to all scenarios. If you want to use ChatGPT prompt words well, you need to develop the habit of tuning according to the reply, and use a variety of techniques in combination.


Recently , I stayed up all night to prepare a very complete summary of ChatGPT efficient commands [full version] for everyone . If you need it, you can get it for free by private message!

 

Guess you like

Origin blog.csdn.net/2301_77531618/article/details/130674296