Tools
Introduction
Tools are the mechanism by which we can provide skills and access to the external world to an agent. Without tools, agents won't be able to query data or do anything real. Tools can be used to query databases, read files, call other LLMs, call REST APIs and pretty much anything else you can think of.
Concepts
A tool is created for a specific purpose. E.g. Send an Email, Perform a search, Query a database table, etc. Tools can be written so they are parameterized so they can operate on different arguments. E.g. a tool that gets order details by querying a database table can parameterize the orderId so it can be applied to different orderIds.
An Agent is provided with a toolbox of tools. In Dataworkz Agents, the toolbox is with the Scenario. The agent uses the tools specified in the Scenario to solve the user's question. This will require the agent to reason over the problem and identify the sequence of tools that should be called and which what arguments in order to achieve the answer to the user's question. In order to create a logical plan that actually solves the problem, the agent needs good information. It is imperative to keep these guidelines in mind when creating Tools and Agents -
Use good names for tools such that the name indicate the meaning of the tool. e.g. getOrderDetails is better then getO or doSomething. The Agent will use tool names to help improve its understanding of the tool during reasoning. So good names can help a lot.
Provide good descriptions for tools, parameters and return fields
Descriptions help the Agent understand what exactly the tool does and anything it should know about the tool. You can provide information such as special cases, or instructions that the Agent should keep in mind. Typically, the Agent does not need to know the implementation mechanics of the tool - i.e.g whether it is Database query or a REST API call.
e.g. getOrderDetails returns an Order object for the specific orderId. orderId is required. If not provided, it must be requested.
Be consistent
Like us, Agents can get confused if terminology is inconsistent or different names are used to mean the same thing. e.g. if you are using model number then don't refer to it as part number elsewhere. The Agent might not be able to understand that they are the same.
Mention special requirements
Specific formats such for dates or ids should be mentioned so the Agent can follow them
Abbreviations or commonly used alternative terms can also be mentioned
Special cases can be specified by describing the situation in plain language
Enums can be specified by providing a list of possible values
Provide examples
If you have specific formats, or specific requirements, examples go a long way in helping the Agent understand what you might want. If an id has a specific format even though it is a string, you can provide the format and examples in the description.
Dataworkz supports a lot of tools and is constantly adding new ones. All tools have a common structure -
Name
Description
Input Parameters: A list of input parameters that can be used while implementing the tool. The Agent will populate these values to the best of its ability based on the user's question and the conversation history and any other information available.
Output: An object or a list of objects that is returned by the tool
Each tool type that supports a particular implementation - such as MongoDB, Snowflake, etc - has other configuration specific to them. You should refer to their documentation for their specifics.
Parameters
Most tools provide named parameters e.g. customerId. Parameters have a name, a type and a description. Parameters can be used as template substitution in many tools using the format - ${<parameter-name>} e.g. the parameter customerId above can be referenced using ${customerId}. This can be used in various tools in different ways - e.g. in queries or as a header or path substition in REST API Tool. Refer to the tool's documentation on what is possible.
Testing
All Dataworkz Tools support testing. You can test a tool by providing its arguments in the Edit/Create page of that tool.
Last updated

