引導模型說明推論過程

要求模型說明推論過程時,模型會回覆解決問題時採取的步驟。有時,這個程序可以提升準確度和細微差異,尤其是在查詢內容困難的情況下。

回應中會包含推理步驟。如要從所需答案中剖析推理步驟,您可以使用 XML 或其他分隔符指定輸出格式。

範例

舉例來說,假設您正在撰寫烹飪網誌,希望模型能告訴您讀者如何解讀網誌的不同部分。如果您沒有指示模型說明原因,模型的回應可能就不會像您預期那樣實用:

沒有推理過程
    What is the most likely interpretation of this sentence?
    
    The sentence: "The chef seasoned the chicken and put it in the oven because it looked pale."
    
    The chef seasoned the chicken and put it in the oven because it lacked color and needed cooking.
    

您已瞭解模型如何預測讀者可能如何解讀句子,但進一步瞭解模型做出特定預測以產生回應的過程,可能會更有幫助。如以下範例所示,回應品質也可能會提升:

說明推論過程
    What is the most likely interpretation of this sentence? Explain your reasoning
    
    The sentence: "The chef seasoned the chicken and put it in the oven because it looked pale."
    
      Interpreting "The chef seasoned the chicken and put it in the oven because it looked pale."

      The most likely interpretation is that the chef seasoned the chicken to add flavor and color, then put it in the oven to cook it.

      Here's the reasoning:

      - Seasoning is typically used to enhance the flavor of food. Chefs often use spices, herbs, and other ingredients to make their dishes more appealing.
      - "Pale" suggests the chicken lacked visual appeal before being seasoned. This could imply it was unseasoned or simply lacking color from spices.
      - Putting the chicken in the oven is a common cooking method. The sentence implies the chef's intention is to cook the chicken, not just season it.

      Therefore, the chef's actions are likely aimed at both improving the taste and appearance of the chicken through seasoning and then cooking it in the oven.
    

另一種可用來改善模型回應的方式,是指示模型逐步思考並說明推理過程。這需要模型將輸入內容分解為步驟,並提供解決問題的推論:

逐步思考
    What is the most likely interpretation of this sentence? Think step by step and print out
    the thinking process.

    Please output in JSON format with final answer in 'answer', and thinking steps in 'think' fields.
    
    The sentence: "The chef seasoned the chicken and put it in the oven because it looked pale."
    
    {
      "answer": "The chef seasoned the chicken to enhance its flavor and put it in the oven to cook it because it appeared to be undercooked.",
      "think": [
        {
          "step": 1,
          "thought": "The chef seasoned the chicken. This suggests that the chef is preparing the chicken for cooking."
        },
        {
          "step": 2,
          "thought": "The chef put the chicken in the oven. This indicates that the chef is cooking the chicken."
        },
        {
          "step": 3,
          "thought": "The sentence states that the chicken looked pale. Pale chicken is often undercooked."
        },
        {
          "step": 4,
          "thought": "Combining these observations, it is most likely that the chef seasoned the chicken to enhance its flavor and put it in the oven to cook it because it appeared to be undercooked."
        }
      ]
    }
    

透過提示模型列印其思考過程,模型便能產生更完整的回覆,您也能進一步瞭解模型如何產生該回覆。

後續步驟

  • 如要查看更多提示範例,請前往提示庫