The AI Assistant node is a key component in flows. It's flexible as it can process a single message or engage in a conversation with the end user. For example:
Engage in Conversation:
The true strength of the AI Assistant node lies in its ability to engage in dynamic conversations with users. It's particularly effective when paired with specific goals, such as capturing essential variables before transitioning to the next node.
For instance, if a user triggers the "Where's my order" intent, you can instruct the AI Assistant to capture the Order Number variable through a natural conversation. This versatile approach can be applied to various scenarios, including:
Gathering lead information
Conducting interviews with potential candidates and storing responses
Collecting customer feedback
Once the AI Assistant has successfully captured the required variables, the conversation seamlessly progresses to the next node. For example, it might move to an API Call node to retrieve the "order status" and then craft a personalized message to the user about their order.
This process allows for a more natural, context-aware interaction, enhancing the user experience while efficiently collecting necessary information.
Single Message:
An AI Assistant can process a single message following an API response. For example, if an API returns an order status as "Delivered" along with details like "Delivery Time" and "Delivery Address", you can utilize this information. Add the variable "last_api_response" plus explain the API response schema in your instructions. Then, prompt the AI Assistant to draft a complete message to the user. A sample output might be:
"Great news! Your order has been delivered. It arrived at 123 Main St. at 2:30 PM today. Is there anything else you'd like to know about your order?"
After outputting this message, the conversation will proceed to the next node or exit the flow, reverting to the main AI Assistant for further interaction.
Configuration Tab
Instructions
In this section, you define how your AI Assistant interacts with users. You can customize various aspects of its behavior:
Goals: Set the primary objectives for the interaction.
Instructions: Provide specific guidance on how to handle the conversation.
Role: Define the AI's persona or position.
Response Style: Specify the tone and manner of communication.
Limitations: Outline what the AI should do when faced with uncertainty.
Character: Establish the overall demeanor of the AI.
Example Configuration:
Goal: Help users locate their order
Instructions: Begin by requesting a 6-digit order number. If users can't find it, direct them to "profile > my orders".
Role: Customer Support Representative
Response Style: Clear, professional, and concise
Limitation: Respond with "I'm not sure" when uncertain and offer to transfer to a team member
Character: Maintain a professional and courteous demeanor
Adding Context with Variables:
Enhance your AI's responses by incorporating variables like "last_api_response". To add a variable, type "{" to open a suggestion list of available options. Use the syntax {variable_name} in your instructions.
To learn more about instructions, click here.
Model
Here, you choose the AI model. Different models have different strengths, so select the one that fits your needs. GPT4o, GPT4o Mini and GPT3.5 are available on all plans. GPT4 and GPT4-turbo are available only on paid plans.
Temperature
This controls how creative or deterministic the AI's responses should be. A higher temperature means more creative responses, while a lower temperature makes responses more predictable and accurate.
Exit Strategy of the AI Assistant Node
The Exit Strategy in the AI Assistant node offers flexibility, allowing you to control when the node transitions to the next step in the flow. You can now select from three distinct options:
1. All variables are captured:
The node will only exit once all required variables have been successfully captured from the user. This ensures that essential data is gathered before proceeding to the next step.
2. Any variable is captured:
The node will exit as soon as any one of the required variables is captured. This can be useful in scenarios where capturing even a single piece of information is sufficient to trigger the next action in the flow.
3. Another flow or an exit is triggered:
The user will continue interacting with the AI Assistant node until another flow is triggered or an exit condition is met. This option allows for extended conversations within the current node.
These options provide greater control over how and when the conversation progresses, ensuring a more tailored experience for the user based on the specific requirements of the interaction.
Capture Variables Tab
This tab allows you to specify which variables the AI Assistant should collect during its interaction with the user. Key points to remember:
Multiple Variables: You can select any number of variables to be captured.
Variable Configuration:
You can configure how your AI Assistant captures variables during conversations by selecting one of the following options:
Always Capture:
This is the default setting. The AI Assistant will capture the variable every time the corresponding node is executed, even if it was captured earlier in the conversation.
Capture on Every Flow Execution:
The AI Assistant will capture the variable each time a flow is executed. If the variable was captured earlier in the same flow, the stored value will be used, and it will reset once the flow is exited.
Capture Once per Conversation:
The AI Assistant will capture the variable only if it hasn’t been captured previously in the conversation. For example, if the first and last name of a contact was captured during another flow, those values will be reused without being prompted again.
Instructions Are Crucial: Make sure to include clear instructions in the AI Assistant's configuration, guiding it on how to naturally obtain these variables during the conversation.
Automatic Exit: By default, once all selected variables are successfully captured, the conversation will automatically proceed to the next node in the flow.
Extended Conversations: If you've enabled the "chat until exit is triggered" option, the conversation will continue within this node even after all variables are captured, until another exit condition is met.
Example: For a customer support scenario, you might select variables like:
Customer Name
Order Number
Issue Description
Your instructions to the AI might include: "Politely greet the customer and ask for their name. Then, request their order number. Finally, ask them to describe their issue in detail. Ensure all this information is captured naturally within the conversation."
This approach ensures that the AI collects necessary information while maintaining a smooth, conversational interaction with the user.