Skip to content

Node Types

lvanderlyn edited this page Feb 23, 2023 · 10 revisions

Overview

There are five types of nodes which can be used to create dialog trees (an example of each is shown below). In the following sections, each node will be investigated in more detail.

Bildschirm­foto 2023-02-23 um 15 00 30

Nodes

Dialog Nodes

Bildschirm­foto 2023-02-23 um 15 06 39

Dialog nodes are the fundamental building blocks of the dialog graph and allow branching dialog flow. These nodes allow you to define a system utterance (some type of information or questions that should be given to the user) and a finite set of possible end-user answer prototypes (a list of the different replies a user could give to this node).

Each of the user responses you list can then be matched with a user's actual input at runtime in order to select which one is the best match, and by extension which node in the graph to visit next.

In case the intent-recognition fails, you can add synonyms for a user response by adding another possible answer with different text and connecting it to the same follow-up node.

Information Nodes

Bildschirm­foto 2023-02-23 um 15 18 44

Information nodes output information to the user without asking for any response. As such, can only be directly connected to a single follow-up node.

You can use them to tell the user something, e.g., giving hints or warning, when a decision/response is not necessary. In this way, they can be used to split up long system answers into shorter, easier to read chunks to avoid overwhelming an end-user. For such use-cases you could combine one or more information nodes with a single dialog node or variable, to split up a long text before asking a question.

Variable Nodes

Bildschirm­foto 2023-02-23 um 15 25 49

Variable nodes let you ask for user input and store their answer as in a variable for later use. They are similar to Dialog Nodes in that they allow you to define a system utterance and that they expect a response from the end-user. However, in contrast to Dialog Nodes, you won't define a set of expected responses. Instead you just need to choose the type of answer you expect, e.g., number, text, or yes/no, and specify the name of the variable which will store the user's answer.

The answer stored inside a variable and can be used either to fill a template (see here for more details on templates) or as part of more complex logical control.

Variable nodes, like Information Nodes, can only be connected to a single follow-up node, but the values stored within the variable can be accessed at any point later in the dialog.

For more information on how to define variable nodes, see here

Note: if you use a variable, make sure that it is defined in all branches of the dialog which make use of it. Additionally, if you delete a variable node or update the variable name, make sure to update all logic nodes, variable update nodes, and templates which made use of that variable.

Variable Update Nodes

Bildschirm­foto 2023-02-23 um 15 29 51

Variable update nodes are a way for you to either update the value of existing variables or create hidden variables which can be used to control the dialog flow, e.g., as loop counters or comparisons. They do not provide output to the end-user.

For more information on how to define variable update nodes, see here

Logic Nodes

Bildschirm­foto 2023-02-23 um 15 31 27

Logic nodes are purely used for dialog flow control, allowing the dialog to branch in different ways based on the values stored in variables.

This node does not provide any output to the end-user.

Given a variable, Logic Nodes allow you to define a series of logical conditions based on the value of that variable. Each of the conditions can then be connected to a different follow-up node, personalizing the dialog based on previous end-user input. For more complex logic, Logic Nodes can also be connected to each other to define branches that require more than one condition or more than one variable.

For more information on defining a logic node, see here

Note: When creating a logic node, don't forget to specify which variable you plan to base the different branches on. And if that variable is changed or deleted, don't forget to also update the logic node.