Skip to content

Lesson 6 of 7 · 7 min

Tools to act

A model only writes. Tools are what make it search, calculate, read a file or send a message.

A language model produces only text. To search the web, do an exact calculation, read a file or send an email, it relies on tools. The principle is simple: the model writes a tool call request with its parameters, the system runs the tool and places the result in the context, then the model continues.

In 2022, the ReAct approach showed that a model that alternates reasoning and action, writing what it intends to do, acting and then observing the result, solves search and decision tasks better than if it only reasons or only acts. Work on Toolformer showed in 2023 that a model can learn when a tool is useful to it.

  • A calculation handed to a tool is exact, whereas the model alone can get a figure wrong.
  • A search brings back dated, citable information rather than something the model remembers.
  • Every tool call is visible in the task’s plan, and so it can be checked.

A tool that reads poses no risk to the outside world. A tool that acts, by sending, publishing or deleting, can do damage if it is called wrongly, or hijacked by manipulated content. That is why Learnya asks for your approval before any action that commits you, and why the administrator can reserve these tools for the assistants that need them.

References

  1. Yao, Zhao, Yu et al. (2022). ReAct: Synergizing Reasoning and Acting in Language Models. International Conference on Learning Representations (ICLR 2023). arxiv.org/abs/2210.03629
  2. Schick, Dwivedi-Yu, Dessì et al. (2023). Toolformer: Language Models Can Teach Themselves to Use Tools. Advances in Neural Information Processing Systems 36. arxiv.org/abs/2302.04761