For the complete documentation index, see llms.txt. This page is also available as Markdown.

RAG App

The RAG App Tool connects a Dataworkz Agent to a Retrieval-Augmented Generation (RAG) Application — a backend system that retrieves answers from unstructured documents using a Large Language Model (LLM). Use this Tool when an Agent needs to answer questions from sources such as PDFs, Word documents, or HTML files.

Example:

Query: "What products cannot be returned?" Answer: The Tool retrieves the exact policy rules from the relevant document and returns a generated answer.


Key Concepts

RAG Application — A backend application that connects a document collection to a retrieval pipeline. The RAG Application must be created before configuring a RAG App Tool.

RAG App Tool — A Tool created inside an Agent that exposes a specific RAG Application to a Scenario. The Tool acts as the bridge between the Agent and the RAG Application.

LLM — The language model used to generate answers from retrieved content. Automatically selected based on the RAG Application chosen during configuration.

⚠️ Warning: Do not confuse a RAG Application with a RAG App Tool. The RAG Application is the backend pipeline that processes documents. The RAG App Tool is what connects that pipeline to an Agent. The RAG Application must exist before the Tool can be created.


When to Use

Use the RAG App Tool when an Agent needs to:

  • Retrieve answers from unstructured documents such as policies, manuals, or knowledge bases

  • Provide users with rules, procedures, troubleshooting steps, or glossary definitions

  • Leverage document metadata filters for more precise and partitioned retrieval


Prerequisites

Before creating a RAG App Tool, ensure the following:

  • A RAG Application already exists in your Dataworkz account

  • You have access to the Dataworkz Agent workspace


Creating a RAG App Tool

Go to AI Agents → Create Tool and select RAG App from the Tool type selector.

The creation flow has five sections:


About Tool

Field
Required
Description

Tool name

Yes

A descriptive name for the Tool — for example, getPolicyAnswers or troubleshootingGuide

Description

Yes

A clear explanation of what the Tool answers and when the Agent should use it. Example: "Use this Tool to answer troubleshooting questions about network connectivity"

Notes

No

Internal notes for documentation purposes — not used by the Agent during reasoning

💡 Pro tip: A specific and well-defined description improves AI responses in the Agent. Be explicit about the type of questions this Tool is designed to answer and the document source it draws from.


Configuration

Field
Required
Description

RAG Application

Yes

Select the RAG Application from the dropdown. This determines which document collection the Tool queries

LLM

Yes

Automatically populated based on the selected RAG Application. This is the language model that generates the answer from retrieved content

Type of search

Yes

Select the search mode — Query for standard question answering, or Enterprise Search for broader document discovery across the corpus


Input Parameters

The RAG App Tool includes a default input parameter automatically:

Parameter
Type
Description

query

String

The user's question to be answered by the RAG Application. Update the description to clarify the expected input for your specific use case

If metadata filters are defined in the RAG Application, they appear here as additional input parameters. These allow the Agent to filter the document corpus by metadata — for example, filtering by document category, product line, or region — for more accurate retrieval.

An Advanced parameters option is also available for additional configuration where supported by the RAG Application.


Output

The default output of the RAG App Tool is a String containing the generated answer:

Field
Value

Output type

String

Description

"The response for the question"

Update the output description to reflect the specific type of content this Tool returns — for example, "The policy rule retrieved from the employee handbook" — to help the Agent chain this Tool correctly within a larger Scenario.

Mark output as artifact — Enable this toggle if the Tool returns a file or document rather than a plain text answer.


Examples

Add sample queries that represent the kinds of questions this Tool is designed to answer. Examples help the Agent recognise when to invoke this Tool during reasoning.

Select from existing examples in your RAG Application or add new ones. For example:

  • "What is the return policy for damaged items?"

  • "List the steps to reset my account password."

  • "Which products are excluded from the annual discount?"


Testing the Tool

Use the Test panel on the right side of the page to validate the Tool before adding it to an Agent Scenario:

  1. Enter a sample query in the Query field of the Test panel

  2. Click Test → to run the Tool

  3. Review the response to confirm the Tool retrieves and generates the expected answer

💡 Note: Always test the RAG App Tool with representative queries before connecting it to an Agent. This confirms the RAG Application is returning relevant results and the LLM is generating accurate answers.


Saving the Tool

Once all sections are complete and the Tool has been tested, click Save & Close to save the Tool and return to the My Tools list, or Save to save without closing.

💡 Note: Once saved, the RAG App Tool is available to be referenced in any Agent Scenario within your Dataworkz environment.

💡 Note: If the same RAG Application needs to serve different types of questions — for example, policy questions and troubleshooting questions — create separate RAG App Tools with distinct names and descriptions, each focused on a specific use case. This helps the Agent select the right Tool accurately during reasoning.

Last updated