# User Inputs
This block allows you to specify the data you want to collect from users. Define the types of inputs required, such as text, selections, or files, to ensure your AI agent gathers the necessary information effectively and efficiently.
# A. Collect and Customize User Inputs for Your AI Agent
To effectively interact with AI agents, you must define specific inputs that users provide to trigger the AI agent's responses. Different types of inputs serve various purposes, such as:
- Typing instructions for blog creation.
- Entering the purpose for data analytics.
- Selecting different customer segments.
# B. Steps to Configure User Inputs:
- Navigate to the User Input block in the AI agent builder.
- Click "Add Input."
- Select and fill in the desired Input Type, Label Name, Options, Variable Name, and Max Character Length, and specify whether it is a Required field.
Note: Please refer to Key Input Fields to Customize for detailed explanations of each input field.
- Click "Save" to finalize the user input.
- To add more user inputs, repeat from step 2.
# C. Key Input Fields to Customize:
To create a highly functional and user-friendly AI agent, it’s essential to configure input fields effectively. Input fields allow users to provide specific information that triggers the AI’s execution. Each field plays a unique role, from defining what kind of data users can input to ensuring that the AI receives the necessary details for accurate processing.
Below, you’ll find a breakdown of the key input fields, along with an applied example for setting up an "AI Travel Planner".
# Key Input Fields Overview
Field Name | Description | Example | Additional Notes |
---|---|---|---|
Input Type | Specify the type of input to collect user data. | Text / Paragraph / Select | Choose based on the type of data you want to collect: - Text for short inputs like "Destination" - Paragraph for long inputs like "Preferences" - Select for predefined options like "Travel Budget" |
Label Name | Add a clear label to guide users on what to input. | Enter Destination | - This label is shown to users as a prompt for the input field. - For example, "Enter Destination" makes it clear that the user should specify a location. |
Options | Define selectable options if using Select as the input type. | Budget , Mid-range , Luxury | - Only applicable for the Select input type. - For example, the three sample options—Budget, Mid-range, and Luxury—allow users to choose a predefined value for "Travel Budget". |
Variable Name | Define a short, unique name for programmatic references. | travel_destination , travel_budget | Use programmatically-friendly names like travel_destination or travel_budget to ensure consistency in backend logic. |
Max Character Length | Set the maximum allowed length for text or paragraph inputs. | - 100 (for short inputs like "Destination") - 500 (for longer inputs like "Preferences") | - Only applicable for the Text and Paragraph input types. - Specify a limit to ensure manageable inputs. - For example, destinations are typically shorter, while preferences require longer descriptions. |
Required | Indicate whether the input field is mandatory or optional for the user. | Yes | Mark critical fields like "Destination" as mandatory to ensure the AI receives the necessary input for execution. |
# Key Input Fields Example
Here’s how the input fields could be configured for an AI Travel Planner that helps users design their ideal trips:
Destination:
- Input Type:
Text
- Label Name:
Enter Destination
- Variable Name:
travel_destination
- Max Character Length:
100
- Required:
Yes
- Input Type:
Travel Budget:
- Input Type:
Select
- Label Name:
Select Your Travel Budget
- Options:
Budget, Mid-range, Luxury
- Variable Name:
travel_budget
- Required:
Yes
- Input Type:
Travel Preferences:
- Input Type:
Paragraph
- Label Name:
Enter Your Travel Preferences
- Variable Name:
travel_preferences
- Max Character Length:
500
- Required:
No
- Input Type:
# D. Query Variable
TIP
You only need to configure this section if you've added knowledge for your Web App agent.
In knowledge base retrieval scenarios, the query variable represents the user's question or input. This variable is used to search the knowledge base for the most relevant text or information related to the user's query.
By leveraging the query variable, the system ensures it retrieves accurate and relevant answers from the knowledge base, which serves as the foundation of your AI agent's responses. To maximize precision, it’s important to include all relevant elements of the user's query in a single input field. This ensures the system can analyze the input context effectively and provide comprehensive answers.
# Sample User Input Configuration
If you have a form that lets users ask about product features, warranties, and support, you can configure a single input field like this:
- User Input: Features, warranty, and support of the product
# Steps to Configure Query Variable
Before configuring the query variable, please ensure that you have added knowledge for your Web App agent, and there is at least 1 user input configured.
- Click the "Select Query Variable" button.
- Choose the specific user input for which you would like your AI agent to retrieve knowledge.
- Click "Save".