The AI Retrieval node lets your AI Agent pull relevant information from a knowledge base whenever a user asks a question. It finds and retrieves the most relevant training data, ensuring the response is accurate and contextually appropriate.
How to Setup AI Retrieval?
Follow these steps to set up AI Retrieval:
Step 1: Access AI Retrieval

Open the Studio, Go to your Scenario.
From AI category, add AI retrieval node.
Select the AI Retrieval block.
Step 2: Enter a Search Query

Input the search query that the AI Agent should use to fetch relevant knowledge base content.
The AI Agent will retrieve information based on this query.
Step 3: Filter Content by Tags
You can create and add tags to your training data from the training section.
Use Include or Exclude to refine search results:
Include: Matches any document that contains at least one of the specified tags.
Exclude: Retrieves all documents except those with the specified tags.
Click Add Tags to specify filters for more precise retrieval.
Step 4: Set Nodes Limit
The Nodes Limit slider controls how many pieces of information are retrieved.
Adjust this setting to balance response depth and efficiency.
Step 5: Choose Response Type
Raw: Retrieves direct text responses from the knowledge base.
JSON: Converts raw data into a structured JSON format based on the provided schema.
Step 6: Store Retrieved Data
Select a variable to store the retrieved information for further processing.
Step 6: Testing AI Retrieval
Use the Emulator to verify how the AI Agent retrieves and presents responses.
Adjust search queries, tag filters, and node limits as needed to refine results.
Example: AI Retrieval in a Food Ordering System
Scenario:
A restaurant uses an AI Agent to assist customers with their food orders. The AI Agent retrieves answers from a knowledge base containing menu details, ingredients, and special offers.
Example Implementation:
Search Query: A customer asks, "What are the vegetarian options available?"
Tag Filtering:
Include:
vegetarian
,vegan
,plant-based
Exclude:
non-vegetarian
,seafood
Nodes Limit: The AI Agent retrieves up to 5 relevant dishes.
Response Type:
Raw: Lists vegetarian dishes with descriptions.
JSON: Structures the response, categorizing dishes based on availability.
Final Response:
The AI Agent responds with:
"Here are some vegetarian options available today: Paneer Butter Masala, Veg Biryani, and Mushroom Pasta. Let me know if you need more details."
Related Articles
How to Debug Flows and View Execution Logs in Chatbot Studio?
Learn how to debug your flows, check flow execution logs, and view logs within the Chatbot Studio
Flow : Scenarios, Blocks, Steps & Connections
This article fully details how steps/nodes and blocks work, how to configure them, create paths and connections.
How to create and use forms in AI Studio?
This guide will walk you through the process of creating and using forms to improve the user experience with your AI agent
How to Create and Test Webhooks in Studio?
Learn how to create, configure, and test webhooks to Connect Your AI Agent with External Services
How to use Events in AI Studio?
This guide walks you through creating and using Events to enhance your agent's capabilities.
How to Add & Configure Text, Image, and File Messages in Studio
Learn how to send text, images, and files with your ai agent using studio.