Last updated
Last updated
The Query Data Source Block allows you to retrieve relevant information from a within your workflow. This block is essential for integrating custom data into your AI workflows through Retrieval Augmented Generation (RAG).
Select the Data Source you want to query. This is the collection of documents you have uploaded and configured in the Data Sources Folder.
Use the dropdown menu to select an existing Data Source.
Click New... to create a new Data Source if none are currently available.
Creates a variable where the query results will be stored. Enter a variable_name
to store the result of the query for later use in the workflow.
Define the number of results the block will retrieve from the Data Source. Each result will return a different chunk of retrieved text from the Data Source.
Enter the query prompt that instructs the AI on what information to retrieve. You can include {{variables}}
to make the query dynamic and context-aware.
Crafting effective queries is crucial for retrieving the most relevant and accurate information from your Data Sources. A well-written query ensures that your AI can efficiently locate and use the data needed for your workflow.
Familiarize yourself with the content of your Data Source. Knowing the structure, topics, and focus of the documents helps you write more precise queries.
Example:
If your Data Source contains product manuals, your queries should explicitly reference product names or sections like "warranty" or "setup instructions."
Write concise and focused queries to ensure the AI retrieves the most relevant results. Avoid overly broad or ambiguous prompts.
Examples:
Broad Query: Tell me about this product.
Specific Query: What are the warranty terms for the {{productName}}?
Include specific instructions or context in your query to guide the retrieval process.
Examples:
Tailor the query to focus on a specific part of the Data Source to improve accuracy. For large Data Sources, specifying a topic or section can yield better results.
Example:
Use actionable keywords like "retrieve," "explain," "summarize," or "list" to make the purpose of the query clear.
Examples:
Test your query with the to ensure it retrieves the intended results. Adjust the wording, variables, or focus as necessary.
Integrate custom data into your AI workflows using RAG