OpenAI's GPT-3.5 and GPT-4 models are prompted. In the case of a prompt-based model, the user interacts with the model by enteringa prompt text, to which the model responds with a semi-automatic input. This semi-automatic input is a continuation of the input text by the model.
Although these models are extremely powerful, their behaviour is also very sensitive to the prompt.The construction of the prompt is at an important competence to develop.
In practice, the prompt works to configure model weights to complete the desired task. However, it is more an art than a science, which often requires experience and intuition to create a Russian invite. This article is intended to help you familiarize yourself with this training process. It attempts to present general concepts and models that apply to all TPM models. However, it is important to understand that each model behaves in its own way, so that the training may not be applied in the same way to all models.
This section describes the basic concepts and elements of GPT prompts.
Text prompts are how users interact with GPT models. Like all general language models, GPT models try to produce the series of words that are most likely to follow the previous text. It is as if we say "What is the first thing that comes to mind when I say<prompt>
?Â". The examples below illustrate this behaviour. When it encounters the first words of famous content, the model is able to continue the text accurately.
Type of instruction | Prompt | Completion |
---|---|---|
Simple instructions | Request an introduction for a weekly newsletter. | Welcome to our weekly newsletter. This week, we will focus on productivity. We will share tips and tricks to improve your productivity in every area of your life. We hope they will be helpful. Don't hesitate to share them with your friends! |
Complex instructions | Request an introduction for a weekly newsletter to my company called Spark. She must mention the great meeting we had last week and thank the team for their hard work in recent months. | Welcome to Spark's weekly newsletter! Last week, we had a great meeting and I would like to take this opportunity to thank the team for its hard work in recent months. Our future is bright and I am confident that we will achieve great things through the dedication and commitment of our team. Thank you for being part of our team and I look forward to working with you in the weeks and months to come. Bestly, [Your name]. |
Complex instructions | Request an introduction for a weekly newsletter, which contains the following: - My company is called Spark - grandiose greetings - Thanks to the team for their hard work in recent difficult months - Positive outlook for the coming quarter - Signature of management | Hello to all members of the Spark team! I would like to thank you for all the work you have done in recent months. This period was difficult, but you all did an incredible job. I am very proud of each of you. As the next quarter approaches, I am filled with confidence. I sincerely believe that we are going to do great things. Thank you again, the management. |
Prompt | Completion |
---|---|
Can you please tell me how to get to the museum? Translate into French: | Can you please tell me how to go to the museum? |
In computer science, the time complexity is the computational complexity that describes the amount of computer time it takes to run an algorithm. Time complexity is commonly estimated by [...] Summarize the previous text in a few sentences: | Time complexity is a measure of how long an algorithm takes to run. It is typically expressed as a function of the size of the input. The most common measure is worst-case time complexity, which is the maximum amount of time required for inputs of a given size. |
Successful prompts often rely on learning practice "in one shot" or "in a few moves". This principle refers to the inclusion of one or more examples of the desired behaviour of the model, generally including entry and exit pairs. This is not learning in the sense that the model is permanently modified. Instead, the examples condition the model to be answered as desired only for the current occurrence. The use of prompts without examples is sometimes referred to as "Zero coup" learning. With the Chat Completion API, learning examples in a few moves are generally added to the message table as examples of user/wizard interactions after the initial system message.
Type of learning | Prompt | Completion |
---|---|---|
Zero blow | Title: The coach confident that the injury will not disrupt the Warriors Heading: | The coach is confident that the injury will not disrupt the Warriors season. The team remains focused on its goals and will continue to work hard to achieve them. |
A few shots | Title: Correa des Twins will appeal to a free agent Section: Baseball Title: World Cup deposit areas in Qatar Heading: Football Title: Yates: Fantasy Football News - Week 6 Heading: American Football Title: The coach confident that the injury will not disrupt the Warriors Heading: | Basketball |
Signals serve as a "kick" for the model output, which helps direct the model to the desired output. This is often a prefix that serves as the basis for the model. In the example below, we show the signal that leads the story to include key elements. Signals are often, but not always, used with instructions. In the examples below, the model is used to summarize a long ad mail. One indicator is used in one case to help you target model output and suggest a specific output format (chips) in the other.
In the context of the Chat Completion API, instructions take the form of the system message, and examples in a few moves are provided by providing a series of examples of user/wizard interactions to help start the model.
Number of indicators | Prompt | Completion |
---|---|---|
0 0 0 | Performance evaluation is an essential component of Spark's Performance and Development approach. […] Summarize the above letter: | The purpose of this mail is to inform employees of recent changes to the Performance Assessment, which is part of Spark's Performance and Development approach. Changes include improved structure, user experience in the upgraded tool, and targeted prompts. In addition, there is now an optional conversation trigger section that allows employees to report topics they wish to discuss with their managers. |
1 | Performance evaluation is an essential component of Spark's Performance and Development approach. […] Summarize the above letter: The main information of the message is | Spark improve performance evaluation experience by making it more focused on priorities, expectations and impact. In addition, the user experience in the tool is upgraded with tips, resources and instructions. Finally, the message contains instructions on enabling fundamental priorities across the enterprise. |
2 | Performance evaluation is an essential component of Spark's Performance and Development approach. […] Summarize the above letter: Key points: • | Spark introduces changes to the performance evaluation experience following employee feedback. • The amendments include a new perspective on priorities, expectations and impact, upgraded user experience, and new instructions on fundamental priorities across the enterprise. • Performance assessment is the time to refuel past performance and learning, as well as to plan future growth priorities and opportunities. • Employees must reiterate their comments prior to the performance evaluation meeting. • There should be at least two performance evaluations per year. • The time spent on each evaluation must remain the same. |