用連鎖思維找出推理過程
你拿到一個常見的數學題,要判斷籃子裡有多少水果。你希望 ChatGPT 幫你解題,並且提供逐步的推理過程。
與 ChatGPT 溝通用的 get_response() 函式已為你預先載入。
本練習屬於課程
Python 的 Explainable AI
練習說明
- 完成
prompt,讓模型以連鎖思維方式針對此問題提供逐步推理。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Complete the chain-of-thought prompt
prompt = "In a basket, there are twice as many apples as oranges and three times as many oranges as bananas. If there are 6 bananas in the basket, how many fruits are there in total? ____"
response = get_response(prompt)
print(response)