format. Additionally, we currently require an agent_scratchpad input variable to put notes on previous actions and observations. This should almost always be the final part of the prompt. However, besides those instructions, you can customize the prompt as you wish.To ensure that the prompt contains the appropriate instructions, we will utilize a helper method on that class. The helper method for the ZeroShotAgent takes the following arguments:tools: List of tools the agent will have access to, used to format the prompt.prefix: String to put before the list of tools.suffix: String to put after the list of tools.input_variables: List of input variables the final prompt will expect.For this exercise, we will give our agent access to Google Search, and we will customize it in that we will have it answer as a pirate.from langchain.agents import ZeroShotAgent, Tool, AgentExecutorfrom langchain.llms import OpenAIfrom langchain.utilities import SerpAPIWrapperfrom langchain.chains import LLMChainsearch = SerpAPIWrapper()tools = [    Tool(        name="Search",        func=search.run,        description="useful for when you need to answer questions about current events",    )]prefix = """Answer the following questions as best you can, but speaking as a pirate might speak. You have access to the following tools:"""suffix = """Begin! Remember to speak as a pirate when giving your final answer. Use lots of "Args"Question: {input}{agent_scratchpad}"""prompt = ZeroShotAgent.create_prompt(    tools, prefix=prefix, suffix=suffix, input_variables=["input", "agent_scratchpad"])In case we are curious, we can now take a look at the final prompt template to see what it looks like when its all put together.print(prompt.template)    Answer the following questions as best you can, but speaking as a pirate might speak. You have access to the following tools:        Search: useful for when you need to answer questions about current events        Use the following format:        Question:
This notebook goes through how to create your own custom MRKL agent.
This notebook goes through how to create your own custom MRKL agent. ->: format. Additionally, we currently require an agent_scratchpad input variable to put notes on previous actions and observations. This should almost always be the final part of the prompt. However, besides those instructions, you can customize the prompt as you wish.To ensure that the prompt contains the appropriate instructions, we will utilize a helper method on that class. The helper method for the ZeroShotAgent takes the following arguments:tools: List of tools the agent will have access to, used to format the prompt.prefix: String to put before the list of tools.suffix: String to put after the list of tools.input_variables: List of input variables the final prompt will expect.For this exercise, we will give our agent access to Google Search, and we will customize it in that we will have it answer as a pirate.from langchain.agents import ZeroShotAgent, Tool, AgentExecutorfrom langchain.llms import OpenAIfrom langchain.utilities import SerpAPIWrapperfrom langchain.chains import LLMChainsearch = SerpAPIWrapper()tools = [    Tool(        name="Search",        func=search.run,        description="useful for when you need to answer questions about current events",    )]prefix = """Answer the following questions as best you can, but speaking as a pirate might speak. You have access to the following tools:"""suffix = """Begin! Remember to speak as a pirate when giving your final answer. Use lots of "Args"Question: {input}{agent_scratchpad}"""prompt = ZeroShotAgent.create_prompt(    tools, prefix=prefix, suffix=suffix, input_variables=["input", "agent_scratchpad"])In case we are curious, we can now take a look at the final prompt template to see what it looks like when its all put together.print(prompt.template)    Answer the following questions as best you can, but speaking as a pirate might speak. You have access to the following tools:        Search: useful for when you need to answer questions about current events        Use the following format:        Question: