What are tools?
Large language models excel at text generation but struggle with tasks like calculations, data retrieval, or interacting with external systems. To make an analogy, these models have impressive brains or reasoning capabilities, but lack the hands to interact with the digital world.
To solve this, many AI models support tool calling (also called function calling). This unlocks the ability for models to use tools, which are code functions or APIs that perform actions.
How tool calling works
AI models that support tool calling can determine when and how to use specific tools to fulfill a user's request. It's up to the developer to build the tools and make them available to the model. Think of it like giving the AI a toolbox and asking it to pick the right tool for the job.
For example, if a user asks, "Who is the CEO of Apple?", the AI can:
- Recognize the need for current information about Apple's CEO
- Select a search tool like
Search.SearchGoogle
- Use the tool to retrieve relevant information from the web
- Write a response using the gathered data
Tool calling with Arcade AI
Arcade AI streamlines tool calling by providing a standardized interface, pre-built integrations, and support for complex interactions like authorization.
For example, if a user asks, "Can you star the ArcadeAI/arcade-ai repo on Github for me?", the AI can:
- Recognize the need to interact with the GitHub API
- Select the
GitHub.SetStarred
tool - With the help of Arcade AI, authorize with GitHub and get a token to act on behalf of the user (with the user's permission, of course!)
- Use the tool to perform the action of starring the repo
- Write a response to the user explaining that the action is complete
With Arcade AI's extensive tool catalog, you can easily integrate tools that:
- Interact with APIs
- Access databases
- Execute code
- Perform calculations
- Retrieve real-time data
You can also create custom tools to fit your unique needs, and let Arcade AI handle coordinating, authorizing, and executing them.
Next steps
- Learn how to call tools with LLMs!
- Or, jump ahead to building your own custom tools