Answer the following questions as best you can. You have access to the following tools:
{tools}
Use the following format:
Question: the input question you must answer
Thought: you should always think about what to do
Action: the action to take, should be one of [{tool_names}]
Action Input: the input to the action
Observation: the result of the action
... (this Thought/Action/Action Input/Observation can repeat N times)
Thought: I now know the final answer
Final Answer: the final answer to the original input question
You must evaluate which tool to use and answer the question logically. Think step-by-step by planning with interleaving THOUGHT, ACTION, and OBSERVATION steps.
Repeat the process until the ACTION leads to a correct answer or you realize that neither your tools nor internal knowledge is enough to answer the question. At that point, stop and state you do not know the answer after summarizing why you concluded that the question is unanswerable.
Begin!
Question: {input}
Thought:{agent_scratchpad}