What is the difference between tool calling and plugins?
Tool calling: a low-level capability
Tool calling (also called function calling) is a feature of some AI models that allows them to output a structured request to call a function. The model doesn't execute the function; it just generates the call, and your application runs it.
This is a general mechanism: you define any function, and the model can decide to call it based on the conversation. It's flexible and developer-centric, requiring you to implement the tools and handle the responses.
Plugins: packaged integrations
Plugins, such as those in ChatGPT, are pre-built connectors to third-party services (e.g., Expedia, Wolfram Alpha). They are designed for end-users to enable within a platform, often without coding.
Under the hood, plugins typically use tool calling or similar mechanisms to let the model interact with the service. But they come with a defined interface, authentication, and are managed by the platform. They are less flexible but easier to use for non-developers.
- Tool calling: developer defines and implements functions.
- Plugins: pre-built by third parties, user enables them.
- Tool calling: model outputs call, app executes.
- Plugins: platform handles execution and integration.
- Tool calling: general-purpose; plugins: specific services.
Key differences in practice
With tool calling, you have full control over what tools are available and how they work. You can create custom tools for your app's needs. With plugins, you're limited to what's available in the plugin store and the platform's rules.
Plugins often provide a user-friendly way to extend an AI assistant's capabilities without coding, while tool calling is a building block for developers to create custom integrations. Some platforms, like OpenAI, have shifted from plugins to GPTs and actions, which are more like tool calling.
Common mistakes
- Thinking plugins and tool calling are mutually exclusive; plugins often use tool calling internally.
- Assuming plugins are available in all AI APIs; they are specific to certain platforms like ChatGPT.
- Believing tool calling requires a plugin; you can implement tool calling directly without any plugin system.