Tool Use
Integrating and using tools with LLMs
Overview
Tools enhance the capabilities of language models, allowing them to perform specific tasks or access external information. In ModelBench, tools are defined using JSON schema and can be easily integrated into your prompts.
Adding Tools
To add a tool in the ModelBench Playground:
- Navigate to the tool section.
- Paste the JSON schema of your tool.
- Press “Save Changes” to make the tool available to your selected models.
Example Tools
Here are two example tools you can use in your prompts:
1. Get Weather Tool
This tool allows the model to fetch current weather information for a given location.
2. Fetch URL Tool
This tool enables the model to fetch content from a given URL.
Using Tools in Prompts
Once a tool is added, you can instruct the model to use it in your prompt. For example:
Remember to provide clear instructions on when and how to use the tool in your prompt.
Best Practices
- Only add tools that are necessary for your specific use case.
- Provide clear instructions in your prompt on how and when to use the tools.
- Be aware of any limitations or potential issues with tool use, such as rate limits or content restrictions.
- Test your prompts with tools thoroughly to ensure they’re being used correctly and effectively.
By leveraging tools effectively, you can significantly expand the capabilities of your LLM applications.