The com.globant.geai.chat_with_rag Tool is a Public Tool provided by The Lab. It is available by default in every Agent from the AI and Tools Tab of an Agent.
You can use this Tool to connect to existing RAG Assistants within the same Project and retrieve contextual answers based on uploaded documents.
To use this Tool effectively, ensure that:
-
You have already created and configured the RAG Assistants with the appropriate data sources and settings.
-
Your Agent is properly configured, especially the Guidelines, which define when and how the Tool should be invoked.
-
The Guidelines provide clear instructions to help the Agent determine which RAG Assistant to use, based on the context of the consumer's request.
When defining an Agent that will use the RAG Tool, consider that it may fall into one of the following scenarios:
- Using One RAG Assistant: The Agent is linked to one specific RAG Assistant.
- Using Multiple RAG Assistants: If several RAG Assistants are available, the Agent selects the appropriate one based on the consumer's request or other criteria.
- Using Different Query Parameters: You can fine-tune the Agent's behavior by specifying additional parameters—such as filters or variables—that influence how the query is processed and how the response is generated.
To use a specific RAG Assistant, you can create an Agent that uses the com.globant.geai.chat_with_rag Tool. The Agent can be defined using either of the following methods:
-
Manual Creation: You define the Agent and its Guidelines manually. In this case, you need to define the following in the Guidelines:
You are an agent that can chat with RAG assistants:
- RAG_NAME : A description of what this RAG does
You are an agent that can chat with RAG assistants:
- MyRagAssistant: A RAG Assistant that helps end users understand the different capabilities of Globant Enterprise AI by answering questions based on its official documentation.
-
Assisted Creation: You use the assisted creation method guided by Iris. In this case, you can use a prompt like this:
Please create an agent that lets me interact with a knowledge base through RAG Assistants called MyRagAssistant using the RAG tool
Please create an agent that lets me interact with the official documentation of Globant Enterprise AI using the RAG Assistant called MyRagAssistant and the RAG tool.
Iris will then guide you through the process of configuring the Agent and its Guidelines.
In this case, it's optional to configure a Reasoning Strategy in the AI and Tools Tab of an Agent.
To enable your Agent to use multiple RAG Assistants, you can define the Agent using either of the following methods:
-
Manual Creation: You define the Agent and its Guidelines manually. In this case, you need to define each RAG Assistant in the Guidelines, including its name and a brief description. For example:
You are an agent that can chat with RAG assistants:
RAG_Name1 : Description of what the RAG_Name1 does
RAG_Name2 : Description of what the RAG_Name2 does
According to the user request, you must decide which RAG you will use.
Then, you must use the tool com.globant.geai.chat_with_rag
You are an agent that can chat with RAG assistants:
- RAG_Developers: A RAG Assistant focused on APIs.
- RAG_Builders: A RAG assistant that helps configure Lab features.
- RAG_EndUsers: A RAG assistant that provides guidance on the workspace.
- RAG_Troubleshooting: A RAG Assistant designed to help resolve common issues.
Based on the end user's request, decide which RAG Assistant to use.
Then, invoke the com.globant.geai.chat_with_rag
-
Assisted Creation: You use the assisted creation method guided by Iris. In this case, you can use a prompt like this:
Please create an agent that uses the RAG tool; these are RAG Assistants I need the agent to map:
RAG Assistants:
RAG_Name1
RAG_Name2
RAG_Name3
Input: User Question
Output: Information retrieved from the tool using one or more than one of the RAG Assistant listed above
Please create an agent that lets me interact with the documentation of Globant Enterprise AI using the rag tool and the following RAG Assistants:
- RAG_Developers
- RAG_Builders
- RAG_EndUsers
- RAG_Troubleshooting
Input: End user query
Output: A detailed answer using the most suitable RAG Assistant based on the query context
Iris will generate a draft of the Guidelines. You should always check the content and modify it if necessary, adding any additional details you consider relevant in the instructions.
Choose an appropriate Reasoning Strategy in the AI and Tools Tab of an Agent such as Chain of thought.
You can also combine this Tool with other available Tools.
RAG Assistants support additional parameters that allow you to fine-tune the Agent's response. All these parameters are supported by the com.globant.geai.chat_with_rag Tool; to use them properly, you must define them in the Guidelines.
The following block is the complement you need to include in the Guidelines to enable the Agent to interpret and apply all supported parameters:
The tool accepts these following parameters
ragName -> The name of the RAG Assistant to use
query -> The user query to be processed
filters -> Is a list of dictionaries with the structure: key, value, operator. The operators are the following:
$eq: Equal (default)
$ne: Not Equal
$gt: Greater than
$gte: Greater than or equal
$lt: Less than
$lte: Less than or equal
Filters allow narrowing down results by returning only documents that match the specified conditions; the user must explicitly specify the desired filters.
variables -> A dictionary of key-value pairs that correspond to dynamic variables used in the RAG system prompt. The user must explicitly provide the values for these variables.
threadId -> A string representing the conversation thread ID the user wants to continue
Response format
Always respond with the next structure:
response:
documentName:
documentPage:*
The tool accepts the following parameters:
ragName -> Use "MyRagAssistant" to access the official documentation of Globant Enterprise AI.
query -> For example: "How can I create an agent in the AI Lab?"
filters -> For example: {"key": "upgrade", "value": "June 2025", "operator": "$eq"}
variables -> For example: {"user": "Developer"}
threadId -> For example: "thread-98765"
Response format:
Always respond using the following structure:
response:
documentName:
documentPage:
Also, specify in the Guidelines that the Agent must include, at the end of each response, the source of the documents used to generate the answer.
Once this is defined in the Guidelines, the Agent will be able to dynamically process combinations of these parameters. For example:
Search for how to create an Agentic Process via API using the Lab. Use variable user: Builder and filter only documents from upgrade June 2025.
According to the Guidelines, the Agent will:
- Choose the appropriate RAG Assistant.
- Apply the variable user: Builder.
- Apply a filter where upgrade = June 2025 using the operator $eq.
Since version 2025-07.