Skip to main content
All CollectionsFlows
The AI Assistant Node
The AI Assistant Node

Learn how to use the AI Assistant node in flows

Alvaro Vargas avatar
Written by Alvaro Vargas
Updated over a week ago

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:

  1. Goals: Set the primary objectives for the interaction.

  2. Instructions: Provide specific guidance on how to handle the conversation.

  3. Role: Define the AI's persona or position.

  4. Response Style: Specify the tone and manner of communication.

  5. Limitations: Outline what the AI should do when faced with uncertainty.

  6. 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.

Chat until exit is triggered

When this checkbox is set to true, the conversation remains within the current AI Assistant node. It won't proceed to the next node in the flow automatically. Instead, the user continues to interact with this AI Assistant until one of two conditions is met:

  1. Another intent is triggered, routing the conversation to a new flow

  2. The conversation naturally concludes

Example: Imagine a customer support scenario for a tech company

  • Flow: "Technical Support"

  • AI Assistant Node: "Troubleshooting Assistant"

  • Setting: "Chat until exit is triggered" is checked

In this setup, the AI Assistant engages in an extended troubleshooting session with the user. It can ask diagnostic questions, provide step-by-step instructions, and respond to follow-up queries, all within the same node. The conversation only moves on if:

  1. The user expresses an intent like "I want to return my product," triggering a different flow.

  2. The issue is resolved, and the user ends the conversation.

This feature allows for more comprehensive, focused interactions within a specific context before moving to another part of the conversation flow.

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:

  1. Multiple Variables: You can select any number of variables to be captured.

  2. Variable Configuration:

    You can configure how your AI Assistant captures variables during conversations by selecting one of the following options:

    1. 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.

    2. 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.

    3. 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.

  3. 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.

  4. Automatic Exit: By default, once all selected variables are successfully captured, the conversation will automatically proceed to the next node in the flow.

  5. 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.

Did this answer your question?