What is a tool?
LLMs are trained on vast general corpus data (like web data and books), which gives them broad knowledge but limits their effectiveness in tasks that require domain-specific or up-to-date knowledge. However, because LLMs are good at reasoning, they can interact with the external environment through tools—APIs or interfaces that allow the model to interact with the external world. These tools enable LLMs to perform specific tasks and receive feedback from the external world.
When using tools, LLMs perform three specific generation tasks:
- Choose a tool to use by generating special tokens and the name of the tool.
- Generate a payload to be sent to the tool.
- Generate a response to a user based on the initial question and a history of interactions with tools (for this specific run).
Now it’s time to figure out how LLMs invoke tools and how we can make LLMs tool-aware. Consider a somewhat artificial but illustrative question: What is...