Concepts
There are a few concepts that are involved in Dataworkz Agents and form the foundation of understanding how Agents function and how they can be built.
Tools
Tools introduce skills to an Agent. They allow the agent to perform a specific task or to interact with the external world. Tools provide an interface which comprises of the following information -
Name: A good name helps the Agent guess what the tool can do e.g. GetCustomerOrders, FetchCustomerProfile, ConvertCurrency. It also helps differentiate between different tools and helps the LLM refer and pick the right tool for the right job
Description: A good description helps the Agent understand what the tool does and when to use it compared to other tools
Input Parameters: A list of inputs to the tools tells the Agent what to pass to the tool. Each input has the following information
Name: The name of the input - a good consistent name helps the Agent map the right values
Type: The data type - more about this below
Description: The description of the parameter. It helps to provide any additional information such as possible values, formats, or any additional information the LLM can use to generate the right value, validate the value provided or to convert
Output: Each tool produces an output which is the result of the execution of the tool. This includes the following -
Name: A name of the output - it is useful for the Agent to understand the output and what to do with it in the plan
Type: The type of the result. This is important if tools are to be chained together in plan steps.
Description: The description of the result
Implementations
Tools need to be tied to an actual implementation that backs it up. E.g. GetCustomerProfile needs to make a REST API call from a system that provides customer profiles; GetCustomerOrders need to make a query to a MongoDB operational database to get orders of a customer. When we create a tool, we create it in the context of a specific system.
Dataworkz supports a growing list of Tool implementations -
Dataworkz Dataset
Dataworkz RAG Application
Relational Databases
MongoDB
Snowflake
REST API
GraphQL
LLM
Json
Each tool implementation has its own specific configuration that helps it connect to and query and retrieve data from the system it describes.
Type
The notion of Data Type is central to Agents. Because Agents deal with structured and unstructured data, we need to be able to describe the type of data. The types currently supported by Dataworkz Agents are -
string: a string of text
integer: an integer
boolean: a boolean type that takes values True and False
decimal: represents floating point numbers or fractional numbers
Objects with a name that can be composed of other types
A Type has the following properties -
name such as “string” or “CustomerProfile” or “OrderDetails”
description that describes the object - e.g. this is the unique id that represents a customer in the system. If you have a limited set of values that the object can take then you can list them here or describe them. E.g. This represents a day of the week OR value can be one of [‘CANCELLED’, ‘COMPLETED’, ‘INPROGRESS]
fields optional fields that lists other fields for a Type that is an object
To represent a list add [] to the type name - e.g. a list of strings can be represented using string[]
An example of an Object type -
Tools Repository
Dataworkz Tools are described via a JSON and stored in the Dataworkz Tools Repository. They can be created from the Tools Repository depending on their underlying type - e.g. MongoDB, REST API, etc. The Tools Repository is account specific and helps list and manage tools available to Dataworkz Agents. The Tools Repository is accessible from the AI Agents page and are tools are re-usable across Dataworkz Agents. .
Tool Execution Framework
The Dataworkz Agent reasons and creates a plan that involves tool invocations to solve a problem. It leverages the Tool Execution Framework to handle tool executions. This is an internal component that helps that can execute different tool implementations - such as making a Database query, calling a Dataworkz RAG Application or invoking REST API. It can handle tool invocation failures, configuration issues, and other availability issues and provide the Agent with appropriate feedback or specific messages. In addition, to help Tool Developer’s debug issues, it can capture invocations, monitoring details and provide information for audits and debugging, etc
Agents
Dataworkz Agents are software systems that are powered by LLMs and Tools and provide reasoning based problem solving coupled with tool execution to solve complex problems. Dataworkz Agents are enterprise-grade systems with robust capabilities around data security and access control. An extensive tool set enables Agent and Tool builders to build, test, introspect and manage Agent operations. A Dataworkz Agent is described using a JSON which captures all the configuration declaratively. This agent configuration is given a unique id and is used when leveraging the Agent API to invoke the agent.
Scenarios
Agents are composed of Scenarios. Scenarios are logical collections of use-cases that partition the question space and also the tool space of an Agent. Scenarios help the agent focus on a specific user intent and use a curated set of tools to satisfy the user's question.
The way to think about a scenario is to create scenarios that map to user intent. So if an agent is designed to get a list of orders and cancel an order you could treat these are two separate scenarios. You could also create a single scenario that encompases it but typically you would split them up.
Scenarios include a curated list of tools that are meant to be used by the Agent to solve the problems that the scenario is meant for. E.g. Listing past orders by a variety of search criteria is a good scenario. This scenario can be used to answer any number of related user questions around listing or searching for past orders such as -
What were the orders cancelled last month?
What are my pending orders?
What orders greater than 100$ were delivered in the past 3 months?
Were there any orders with shirts in them?
Are there any refunds pending for any orders?
All of these can be clubbed under the same scenario and provided with one or more tools that support the execution of the scenario. Scenarios help provide the reasoning engine with a smaller set of tools to choose from making it more robust and likely to make the right choices. They also provide guardrails so the Agent knows what questions it is meant to answer and it prevents users from getting answers to questions that are not in the scope of the Agent. A classifier determines which scenario a user’s question belongs to. In the future, additional strategies may be provided for scenario selection.
The description of the scenario is critical in helping the Scenario classifier to pick the right scenario based on the user intent. If you are noticing that the right scenario is not getting picked - it is usually because the description does not cover the user intent - consider rewording the description to include the missing user intent.
Last updated