OpenAI Platform
GPT Best Practices: Strategies for Better Results
This guide provides strategies and tactics for improving the performance of GPT models. By following these methods, you can enhance the quality and accuracy of the model's responses.
Write Clear Instructions
To ensure that GPT models understand your requirements accurately, it is essential to provide clear and specific instructions. You can include details, ask the model to adopt a specific persona, use delimiters to separate different parts of the input, specify the steps required to complete a task, provide examples, and specify the desired length of the output.
Provide Reference Text
To improve the accuracy of the model's responses, you can provide reference text that the model can use to generate answers. By instructing the model to answer with citations from the reference text, you can ensure that the responses are based on reliable information.
Split Complex Tasks into Simpler Subtasks
Complex tasks can be challenging for GPT models to handle accurately. To mitigate this, you can break down complex tasks into simpler subtasks. By using intent classification, you can identify the most relevant instructions for a user query. Summarizing or filtering previous dialogue can also help in dialogue applications that involve long conversations. Additionally, summarizing long documents piecewise and constructing a full summary recursively can improve the model's performance.
Give GPTs Time to "Think"
GPT models can make more reasoning errors when they are rushed to provide immediate answers. Giving the models time to "think" or work out their own solutions can lead to more reliable and accurate responses. By instructing the model to work out its own solution before rushing to a conclusion, using inner monologue or a sequence of queries to hide the model's reasoning process, and asking the model if it missed anything on previous passes, you can improve the quality of its responses.
Use External Tools
To compensate for the limitations of GPT models, you can leverage external tools. Embeddings-based search can be used to implement efficient knowledge retrieval, allowing the model to retrieve relevant information. Code execution can be used for more accurate calculations or to call external APIs, expanding the model's capabilities.
Test Changes Systematically
To measure the effectiveness of any changes made to the model or instructions, it is important to have a comprehensive evaluation process. By evaluating model outputs with reference to gold-standard answers, you can track the performance improvements and ensure that the changes have a positive impact.
These strategies and tactics can be applied individually or in combination to improve the performance of GPT models and achieve better results.
The original article: https://platform.openai.com/docs/guides/gpt-best-practices