要求模型說明推論過程時,模型會回覆解決問題時採取的步驟。有時,這個做法能提升準確率和細微差異,尤其是內容困難的查詢。
推理步驟會納入回覆中。如要從所需答案中剖析出推理步驟,可以使用 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." } ] } |
提示模型列印思考過程後,模型生成的回覆內容更詳盡,您也進一步瞭解模型如何生成該回覆。
後續步驟
- 如需更多提示範例,請前往提示庫。