Multi-step Tool Use (Agents)
Multi-step Tool Use (Agents)
Multi-step Tool Use (Agents)
Tool use is a technique which allows Cohere’s models to invoke external tools: search engines, APIs, functions, databases, and so on. Given a list of tool definitions, the model will generate a plan of action and decide which tools to use, in which order, and with what parameters.
For example, given the web-search tool, the model can start answering complex questions that require performing internet searches.
Notice that the model learned information from the first search, which it then used to perform a second web search. This behavior is called “multi-step” because the model tackles the task step by step.
Also, note that multi-step is enabled by default.
Here’s an outline of the basic steps involved in multi-step tool use:
In single-step tool use, the model is also equipped with access to a bevy of tools to answer a question.
That said single-step tool use only facilitates the model calling multiple tools during a single step. The model cannot execute a sequence of steps, and it cannot use the results from one tool call in a subsequent step.
For more complex queries it’s probably better to operate in multi-step mode, which is the default (you can operate in single-step mode by setting force_single_step=True). In multi-step mode, the model can reason across steps and select multiple tools to answer a question completely.
Tool use is a natural extension of retrieval augmented generation (RAG). RAG is about enabling the model to interact with an information retrieval system (like a vector database). Our models are trained to be excellent at RAG use cases.
Tool use pushes this further, allowing Cohere models to go far beyond information retrieval, interact with search engines, APIs, functions, databases, and many other tools.