Created
May 19, 2023 13:31
-
-
Save Jensssen/c08df9015bddf16c64be3b55c4e0263f to your computer and use it in GitHub Desktop.
LangChain Agent Format Instructions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
agent_chain = initialize_agent(tools, | |
llm, | |
agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION, | |
verbose=True, | |
agent_kwargs={"format_instructions": "Use the following format: \n\n" | |
"Question: the input question you must answer \n" | |
"Thought: you should always think about what to do \n" | |
"Action: the action to take, should be one of [{tool_names}] " | |
"Action Input: the input to the action \n" | |
"Observation: the result of the action\n... " | |
"(this Thought/Action/Action Input/Observation can repeat N times) \n" | |
"Thought: I now know the final answer \n" | |
"Final Answer: the final answer to the original input question, translated to German!"} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment