What Are Tools?
Tools, also known as function calling, enable Large Language Models (LLMs) to invoke external functions or APIs to enhance their responses.
Function calling transforms LLMs from static responders into interactive agents capable of executing tasks. This capability makes LLMs better suited for real-world applications such as customer support, automation, and data retrieval.
When to Use Tools?
Using tools is beneficial when you need your LLM to:
Retrieve up-to-date information that is not included in its training data.
Perform specialized computations or data transformations.
Interact with external APIs, databases, or third-party services.
Generate responses based on real-time inputs.
Tools in Arato
Arato helps you build GenAI applications using tools by providing the following experiment scenarios:
1. Testing Model Responses
Goal: Ensure the model correctly understands and utilizes the tool definitions.
How it Works: Given a prompt and a tool schema, the model should generate an appropriate tool call(s). Arato helps validate that the model:
Recognizes the correct tool
Calls the function correctly
Passes the right parameters
2. Processing Tool Results
Goal: Validate how the model incorporates external tool results in its final response.
How it Works: Given a prompt, a tool schema, and tool pair messages (tool call and tool result), the model should use the tool result (external system data) to generate the final response. Arato ensures the model correctly integrates the tool response into its output.
Applying Tools in a Prompt Run
To apply tools in a Prompt Run, follow these steps:
Navigate to a Prompt where you want to experiment with tools.
Open the Model Configuration modal and toggle the Tools button.
In the right pane, write or paste your tools schema.
Click Save to store your tool schema configuration and close the modal.
After adding the tool schema, the option to add Tool Messages (tool call and tool result) will become available for your prompt.
Note: Arato uses the Vercel tool schema format for defining tools and tool messages. Only schemas that follow the defined format can be used.
Run your experiment and observe the tool calls and model response.
Examples
Tools schema example - to be used in the Tool Schema configuration screen:
{
"getPopulation": {
"description": "Get the population of the given country",
"parameters": {
"type": "object",
"properties": {
"country": {
"type": "string"
}
},
"required": ["country"]
}
},
"getArea": {
"description": "Get the area of the given country",
"parameters": {
"type": "object",
"properties": {
"country": {
"type": "string"
}
},
"required": ["country"]
}
}
}
Tool pair example - to be used in your prompt:
Tool call -
{
"type": "tool-call",
"toolCallId": "toolu_011n3T6TJnwZLyR4G8h1ZcMz1",
"toolName": "getPopulation",
"args": {
"country": "{{country}}"
}
}
Tool response -
83 million