OpenAI official guide for successfully drawing out answers from the language model 'GPT' used for 'ChatGPT'

The interactive AI 'ChatGPT' receives human words and returns natural sentences, but a little trick is required to successfully draw out the answers that humans seek. OpenAI, the developer of ChatGPT, has published six strategies for obtaining better results from the model 'GPT' used in ChatGPT, titled 'GPT Best Practices'.

GPT best practices - OpenAI APIs

The six strategies proposed by OpenAI are:
- Write clear instructions
・Provide reference text
-Break complex tasks into simpler subtasks
・Give GPT time to think
・Using external tools
・Performance testing

◆ 1: Write clear instructions
To get relevant answers, users need to correctly provide key information as they type their sentences. For example, rather than the question ``Who is the president?'', the question ``Who will be the president of Mexico in 2021? is transmitted to

Also, using delimiters such as triple quotes and XML tags makes it easier for GPT to understand how to handle characters. For example, 'Please summarize your paper and give it a title. Title: Enter your title here. Abstract: Enter your abstract here.' It is important to teach them what to do. The more complex the task, the more important it is to have clear instructions.

In addition, it is also helpful to specify specific steps. For example, 'Step 1, the user will provide a sentence enclosed in triple quotes. Please prefix this sentence with 'summary:'' and 'Step 2, the summary of step 1 in Spanish Translate it and prefix it with 'Translate:''. In addition, it is also effective to present specific numbers and give instructions, such as 'Please summarize in about 50 words' or 'Please summarize in 3 bullet points.'

◆2: Provide reference text
If you can provide GPT with systematic information, such as ``Please answer the question using only the sentences in the following papers,'' GPT will attempt to construct an answer using the information provided. About. However, since the number of characters in the sentence that can be given to GPT at once is limited, it is recommended to use a relevance search system called '

embedding ' provided by OpenAI.

◆ 3: Divide complex tasks into simpler subtasks
Instead of having GPT receive vague and complicated questions from users as they are, it is possible to keep the error rate low by splitting the questions and telling them to GPT. For example, if you are asked, 'I want to be able to use the Internet again,' the problem can be solved step by step by teaching the robot to output answers such as 'Is the cable connected? I tried restarting.' You can continue

◆ 4: Give GPT time to think
Rather than asking GPT, 'The student gave me this answer for a certain assignment. Is this correct?' Please judge whether it is correct or not.' Giving GPT time to think will reduce mistakes.

◆ 5: Use external tools
Since GPT alone cannot process long sentences and calculation formulas, it is also effective to output answers using the aforementioned 'embedding' or external service APIs.

◆ 6: Conduct a performance test
If you add a new question while the existing questions are getting the desired answers, it is possible that the quality of the existing answers will be degraded by asking that question. If it is difficult to tell if these changes make the system better or worse, you can use evaluation tools such as OpenAI Evals to explore variations of effective questions.

in Software, Posted by log1p_kr