Dialog nodes
Last Updated: 25.10.2019
Last updated
Last Updated: 25.10.2019
Last updated
A dialog node is a branching dialog flow that defines how Hala responds when it recognizes the specified conditions (intent, entity, context, regex, or function). You use the dialog node editor to create meaningful dialogs with users, interact with the enterprise software, and for responding based on the conditions that you recognize in their input.
The dialog nodes is represented graphically in Hala as a tree.
Each dialog node contains, at a minimum, a condition and a response. You can think of the node as having an if/then construction: if this condition is true, then return this response.
Each dialog node includes the next objects: Name
, Condition
, Actions
, Context
, Output
and Behavior
.
Name. You can specify the node name to get more meaningful overview of the dialog nodes in the tree.
Condition. Specifies the information that must be present in the user input for the node in the skill to be triggered. A dialog node condition determines whether the node should be used in the conversation. If the condition of the dialog node is satisfied, then Hala will enter the node. More information here: Conditions
Actions. Action is a mechanism that allows you to call out to an external program based on something happening in your skills and dialog nodes. More information here: Actions
Context. During the conversation, you can store the information in the context variables and then reuse the variables to meet your needs. More information here: Context
Response. The text that your assistant uses to respond to the user. The response can also be configured to show an image, video, tables, forms, quick reply buttons, and analytics. More information here: Output
Behavior. After specifying the response, you can instruct what should be done next. More information here: Behavior
For example, the following root node is triggered if the natural language processing algorithm determines that the user input contains the intent.create_incident
intent. When the node is triggered, Hala responds with an appropriate answer.
A single node with one condition and response can handle simple user requests. But, usually, users have more complicated questions or want help with a more complex process. You can add child nodes that also have the condition and response. As a result, Hala asks the user to provide any additional information that your assistant needs.
Hala processes the skill that you create from the first root node in the tree to the last.
Hala is processing the skills and root nodes down the tree. If Hala finds a condition that is met, it triggers that root node in some particular skill.
Hala continues to work its way through the dialog tree from first to the last node, along with each triggered node, then from first to last child node, and along with each triggered child node until it reaches the last node in the branch, it is following.
Keep in mind that the order of the nodes and their sequence is essential because nodes are processing from first to last. The first root node whose condition matches the input will be triggered. Any nodes that come later in the tree is not included in processing.
When your assistant visits the last node in the tree or cannot find an appropriate child node that meets the condition, it jumps back for evaluation of all skills and their root nodes. And once again, your assistant processes the root nodes from first to the last. If none of the conditions evaluates to true, then the response from the last node in the tree, which typically has a special out_of_scope
system condition that always evaluates to true, is returned.
To add the dialog node, you need to go to Skill Kit, and open the skill.
You can click on the button "Add root node" to add the first root node. When the root node is added, then you can add more root nodes, or if you want to add the child nodes, then you need to use the dropdown list of the node settings for which you want to add the child node.
When you click on "Add child node," the system will create the child node. If you press the "Add node above," the system will add the new node above the selected node. And if you will press the "Add node below," the system will add the node below the selected node.
After any changes in the Skill, you need to press the button "Save changes."
To modify the node, open the needed node, make changes, and then press the button "Save changes."
To delete the node, find the needed node, go to the node settings and select from the dropdown list "Delete."