Dynamic Workflow node for Voicebot

Updated 

Note: This node is part of Sprinklr AI+. Enable this node by raising a support ticket at tickets@sprinklr.com.

Overview

The Dynamic Workflow Node(DWD) is a component in a chatbot's dialogue tree, designed to enhance the chatbot's conversational capabilities and create more human-like interactions. This GPT-powered node efficiently bifurcates intents/entities, collects customer inputs, and processes data to generate responses within a single dialogue tree, eliminating the need for multiple trees with different bot replies. 

Configure the Dynamic Workflow Node 

To configure the dynamic workflow node, follow the below steps :

  • Click the Addition icon within your dialogue tree and select Dynamic Workflow

  • Enter a Name for the node according to the use case. 

  • Define the Workflow Goal in the pop-up window to outline your use case. The workflow goal serves as guidelines for Gen AI to achieve the desired outcome for your bot. You can specify the information to be captured by the bot and incorporate variables and custom fields using the resource picker to create a dynamic workflow. Additionally, you can utilize Sprinklr AI+ to generate a workflow goal. 

Best Practices & Tips for creating

Dynamic Workflow Nodes

  • Define a persona for the bot  

  • Provide explanation for each of the variables

  • Handle fallback scenarios like transfer to agent using hardcoded functions 

  • Define prompt guardrails to ensure the bot only does what it is instructed to do

  • For assistance, refer to resources like OpenAI's Cookbook and OpenAI's Prompt Engineering Guide for a more comprehensive understanding of prompt engineering. 

  • Next, include the user inputs necessary for the bot . The below table explains the input name , descropion and guidelines around inputs values .

    Image of dynamic workflow node.

Input Name

Description

Display Name

This name is used by Sprinklr AI+ to understand the meaining of the variable and the kind of data it will store. Ensure that the Display Name is intuitive for GPT to understand.

For example, if the bot is assisting with
an address change and requires details such as Product ID and House Number, add
two inputs with associated variables (e.g., "Prod_ID" for Product ID and "House_Number" for House Number) to store this data. You can also designate them as mandatory.

Variable

This variable is created within the Dialogue Tree to store the collected information and to be used later in the
flow. Ensure that this variable name is in accordance with Sprinklr DT variable naming conventions like -

  1. Variable name should consist of only
    letters (A-Z)/(a-z), digits (0-9) and _

  2. Variable names are case sensitive

  3. Variable names should not start with
    digits

Format

This field helps Sprinklr AI+ understand the format in which data needs to be stored. For instance, if you need a PNR
number to check the flight status, you can define the format as a 6-digit alphanumeric code. If the user input doesn't match the specified format, the bot prompts the user with an invalid reply message and requests them to provide
the correct input.

Required(Checkbox)

This helps Sprinklr AI+ understand whether this is a mandatory or a non-mandatory field. The Dynamic Workflow node will not exit successfully unless it has all the mandatory inputs.

(Note: The bot will exit with an
error state if it does not receive any of the mandatory inputs for 2 consecutive tries.)

Previous Message History Length

This helps Sprinklr AI+ gather context on the conversation that happened prior to its invocation. You can use this
feature to define the number of prior message that you want to be passed to Sprinklr AI+ as context before initiating the conversation as per the defined prompts. Required data points can also be gathered from the Previous Message
History, enabling you to reduce the AI+ handling time.

Functions required for Skill

This helps Sprinklr AI+ carry out actions (Example:Calling an API, Sending a Text etc) amidst conversation. Functions required by the node can be configured on the ConvAI app and referenced here. These functions can then be referenced in the prompt dynamically

  • Click Save to save the node.

    Note: Raise a support ticket to request changes to the backend prompts and ensure that the
    chatbot's interactions align with your branding, messaging, and user experience
    objectives

Additional Functions

There are specific hardcoded functions which are triggered based on Bot Replies published by the dynamic workflows. They can be used to manage its behavior during user interaction. These include :

  • BOT_COMPLETED: Whenever the Dynamic Workflow node tries to publish this exacttext, it is blocked by our backend functions and the bot workflow exits successfully from this node. This can be helpful to exit the node whenever a certain set of conditions are met during the bot conversation. It can also be used to create or assign values to local variables upon exit by defining it in a JSON format.

    For example: You want to collect 6-digit PNR from the user. In the case where the user does not want to talk to a bot and wants to continue with an agent, the Dynamic Workflow node will be confused and not know how to proceed with the request. Here, we can direct the node in the prompt itself, “Whenever user asks for an agent, reply “BOT_COMPLETED {“agent_flag”:true}”. This command will help the node successfully exit the node, setting the variables as instructed in the JSON.

  • BOT_ABORT: Similarly, the node can reply with "BOT_ABORT" in situations where the conversation abruptly ends due to specific conditions or errors detected during the interaction. For example, if the user's input is unclear or invalid, you can set up the bot to abort and exit the dynamic workflow node. The DYNAMIC_CHAT_ERROR is a backend system variable that is automatically set to true whenever the bot unexpectedly aborts.

    Choosing AI+ version

    Image of Additional settings in DWD node.

    While designing your bot, you can select the AI model it needs to be built on. Follow the below steps to select your desired AI model -

  • Under Miscellaneous Settings of ConvAI App, select Additional Settings.

  • Select the “AI Version” option . This lets you select the AI version that is utilised by your DWD Node and allows for managing custom branches, and use-case based complexity abstraction.