Reason Only:这种方法采用"Chain-of-thought"做出多步推理。为了鼓励模型进行连贯思考,它在问题输入前加入“Let’s think step by step”的提示词,而不是直接呈现答案。然而,其明显的缺陷在于,Reason Only 只专注于内部的推导过程,并未与外部世界产生交互,因此可能会依据错误或过时的信息进行推理。
Answer the following questions as best you can. If it is in order, you can use some tools appropriately. You have access to the following tools: {tools} Use the following format: Question: the input question you must answer1 Thought: you should always think about what to do and what tools to use. Action: the action to take, should be one of {toool_names} Action Input: the input to the action Observation: the result of the action ... (this Thought/Action/Action Input/Observation can be repeated zero or more times) Thought: I now know the final answer Final Answer: the final answer to the original input question Begin! history: {history} Question: {input} Thought: {agent_scratchpad}
Answer the following questions as best you can. If it is in order, you can use some tools appropriately. You have access to the following tools: google-search: 用谷歌Search搜索网络开源信息的工具 llm-calc: 用大模型和Python做数学运算的工具 Use the following format: Question: the input question you must answer Thought: you should always think about what to do and what tools to use. Action: the action to take, should be one of [google-search, llm-calc] Action Input: the input to the action Observation: the result of the action ... (this Thought/Action/Action Input/Observation can be repeated zero or more times) Thought: I now know the final answer Final Answer: the final answer to the original input question Begin! history: Question: 目前的黄金价格是多少?如果我想在这个价格上加价20%,我应该怎么定价? Thought:
Answer the following questions as best you can. If it is in order, you can use some tools appropriately. You have access to the following tools: google-search: 用谷歌Search搜索网络开源信息的工具 llm-calc: 用大模型和Python做数学运算的工具 Use the following format: Question: the input question you must answer Thought: you should always think about what to do and what tools to use. Action: the action to take, should be one of [google-search, llm-calc] Action Input: the input to the action Observation: the result of the action ... (this Thought/Action/Action Input/Observation can be repeated zero or more times) Thought: I now know the final answer Final Answer: the final answer to the original input question Begin! history: Question: 目前的黄金价格是多少?如果我想在这个价格上加价20%,我应该怎么定价? Thought: 我应该使用搜索工具来查找答案,这样我可以快速地找到所需的信息。 Action: google-search Action Input: 黄金当前价格 Observation: 根据网络资料显示,每克黄金的价格为60美元。 Thought:
Answer the following questions as best you can. If it is in order, you can use some tools appropriately. You have access to the following tools: google-search: 用谷歌Search搜索网络开源信息的工具 llm-calc: 用大模型和Python做数学运算的工具 Use the following format: Question: the input question you must answer Thought: you should always think about what to do and what tools to use. Action: the action to take, should be one of [google-search, llm-calc] Action Input: the input to the action Observation: the result of the action ... (this Thought/Action/Action Input/Observation can be repeated zero or more times) Thought: I now know the final answer Final Answer: the final answer to the original input question Begin! history: Question: 目前的黄金价格是多少?如果我想在这个价格上加价20%,我应该怎么定价? Thought: 我应该使用搜索工具来查找答案,这样我可以快速地找到所需的信息。 Action: google-search Action Input: 黄金当前价格 Observation: 根据网络资料显示,每克黄金的价格为60美元。 Thought: 我需要计算在这个价格基础上加价20%的新价格是多少。 Action: llm-calc Action Input: 60*1.20 Observation: 72 Thought:
得到输出后解析,获取Thought、Action和Action Input:
Thought: 我知道最终答案了。 Final Answer: 如果想在当前价格上加价20%卖出黄金,应该定价为每克72美元。