Data Source Basics
A Data Source is an uploaded file or group of files that can be referenced by the AI. A Data Source can be queried at a specific point in your apps Workflow, or referenced after every user message using Retrieval Augmented Generation (RAG).
How to Create a Data Source
To create a Data Source, select the (+) icon next to the Data Source folder in the Explorer. Everytime you create a new Data Source you will be able to access that Data Source from this folder.

Next, name your Data Source, and upload your files. When uploading your files, please note that they must be text based files. Your application will not recognize images uploaded as a Data Source. MindStudio accepts the following file types:
- CSV
- XLSX
- TXT
- HTML
- DOCX
Using the Data Source
Now that your Data Source has been created, you can set up your app to make direct queries or reference the Data Source after every user message.
Query Data Block
Use the Query Data block in your Automation Workflow to instruct the AI to make specific queries to a Data Source. Once you’ve added the block, select the Data Source you want to query, provide a Variable name for the output and set the max results of the query.
Type your query into the Query Template. You can utilize Variables in your query by using double braces around the Variable name. Example: {{MyVar1}}.

Retrieval Augmented Generation (RAG)
Retrieval Augmented Generation, or RAG, is a technique that combines data retrieval with text generation. In MindStudio, RAG allows you to reference Data Sources upon every message received by a user.
You can enable RAG by configuring Message Processing in the Terminator block of your Automation Workflow.

Select the Data Source you want to use and set the Max Results.
For more information on using Data Sources, check out our guide on querying a knowledge base.