OpenAI has updated the best practices guide for GPT, officially recommending the six strategies. These strategies, along with specific optimization methods and easy-to-understand examples, enable you to more effectively harness the power of GPT models.

Let's take a look at what these six strategies entail!

  1. Write Clear Instructions

    GPT can't read minds. If you feel like GPT is providing too much information, instruct it to be more concise. If the answers are too simplistic, ask for a more expert tone. If you dislike the format of the answers, specify the format you prefer. The clearer the instructions you provide to GPT, the more likely you are to get the desired response.

    For example, if you want GPT to summarize meeting minutes, the following example demonstrates a less effective result:

    // Example One
    Summarize meeting minutes
    ---
    [Meeting minutes]
    
    

    In contrast, Example Two provides clear instructions and is likely to yield better results:

    // Example Two
    Summarize the meeting minutes in a paragraph. Then, list the speakers in Markdown format along with their key points. Finally, list any suggested follow-up steps or action items by the speakers.
    ---
    [Meeting minutes]
    
    
  2. Provide Reference Text

    GPT sometimes confidently generates false responses or nonsense, especially when asked about obscure topics or when references and URLs are required. Just as notes can help students achieve better results in exams, providing reference text to GPT can help reduce fictitious answers.

    For example, you can instruct GPT to use reference articles and answer questions based on them:

    Use the articles provided below in triple quotes to answer the question.
    If the answer cannot be found in the articles, respond with "I cannot find the answer."
    ---
    """Article One"""
    """Article Two"""
    """Article Three"""
    
    Question: [Question]
    
    
  3. Split Complex Tasks into Simpler Subtasks

    Similar to breaking down a complex system into modules when programming, the same applies to GPT. Complex tasks have higher error rates, and these tasks can often be redefined as a series of simpler tasks. Chaining simple tasks as input is more likely to yield correct solutions.

    For example, you can use several strategies:

  4. Give GPTs Time to "Think"

    Just as you might not immediately know the answer to "what is 17 times 28," but could figure it out given some time, GPT operates similarly. Requesting immediate answers from GPT may lead to more errors. Prompt GPT to consider the thinking process before answering; this can help GPT reason out the correct answers more reliably.

    For example, you can guide GPT to think through the problem-solving process rather than providing an immediate answer:

    First, devise your own solution to the problem.
    Then, compare your solution with the student's solution and evaluate whether the student's solution is correct.
    Do not decide on the correctness of the student's solution until you have completed your own problem-solving.
    ---
    Problem Statement: XXX
    Student's Answer: XXX
    
    
  5. Use External Tools

    By providing the output results of other tools as input to GPT, you can complement GPT's weaknesses. Text retrieval systems can inform GPT about relevant documents. Code execution engines can assist GPT bots in performing mathematical calculations and executing code. If a task can be accomplished more reliably or efficiently by other tools, delegate it to that tool and then combine it with GPT to achieve the best of both worlds.

  6. Test Changes Systematically

    Sometimes, modifying prompt words may yield better results in certain isolated examples; however, in other more representative cases, we may end up with overall poorer performance. Therefore, when determining prompt word modifications or strategies, it is necessary to define a comprehensive test and systematically evaluate it to ensure that the prompt words are optimal and that the change has an overall positive impact.