Questions
Questions are the main way to collect information from the user through Q&A.
You can add a question below any text or event trigger, and your AI Agent can ask for single or multiple pieces of information from the user within a single dialog.
Ask only
Select ask only for simple data extraction.
You then need to fill the following fields:
-
Ask: The question to ask the user.
-
Save input in variable: The context variable key where the user's input is saved.
If the context variable where you want to save the user's information is already filled, the AI Agent will skip the question.
Check and ask
To add validation to your question, select Check and ask.
For these types of questions, you need to fill the following fields:
-
Ask: The question you want the AI Agent to ask. You can also set a reprompt question if the user's input does not meet the requirements.
-
Validation: The validation you want to perform. It can be one of the following types:
-
Entity: Checks the user's last message for an entity and asks if the entity is not present.
-
Input type: Checks the user's response to the question to be one of the following types:
- Text
- Number
- Phone
- URL
- Integer
-
Validate with guideline: Instead of using a fixed validation method, such as entities, you can use a guideline to validate the user's response using natural language. An LLM will be used to validate the user's response and extract the user's input in the correct format. This option will not be available if you're using an entity validation.
-
-
Guideline: The guideline to validate the user's response.
Example:
An ID number 10 digits long.
This validates that the user's response is a 10-digit number, regardless of whether they enter it as a string with dashes or spaces, and saves the value according to the input type.
-
Save input in variable: The context variable key where the user's input is saved.
noteWhen you choose to perform entity validation, a second variable is automatically generated. This variable has the suffix
_value
added to the defined key, and it stores the value of the entity that corresponds to the user's response.