Skip to content

Instructions Prompt

The Instruction Prompt explains the Tool Agent how to format its reasoning.
The Tool Agent uses a chain to decide when and which tool is the most appropriate to fulfill the user's needs.

By default, it is set to Langchain instructions format which looks like this:

instructions = """
To use a tool, please use the following format:

Thought: Do I need to use a tool? Yes
Action: the action to take, should be one of [{tool_names}]
Action Input: the input to the action
Observation: the result of the action

When you have a response to say to the Human, or if you do not need to use a tool, you MUST use the format:

Thought: Do I need to use a tool? No

AI: [your response here]"""

where the placeholder {tool_names} is replaced with the list of Python tools retrieved from the procedural memory.