モデルに推論方法を説明するように指示する

モデルに推論方法を説明するよう指示すると、モデルは問題の解決に使用するステップを回答します。このプロセスを実施すると、特に難しいクエリの場合に精度とニュアンスが向上することがあります。

推論手順はレスポンスの一部として含まれます。求める回答から推論手順を解析するには、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."
        }
      ]
    }
    

思考プロセスを出力するようモデルに指示することで、モデルはより詳細なレスポンスを生成しました。また、レスポンスの生成方法の詳細についても学習しました。

次のステップ