Using the Dialog Builder Tool

This topic describes the user interface for creating a conversational flow between a user and a Bot in a dialog task using the Dialog Builder tool in Kore.ai Bot Builder.

In the Search field, you can search component titles for any letters or words using find-as-you-type. Search matches are highlighted in the component titles.

Adding Dialog Task Components

When you create a dialog task, by default the first component created and displayed is a user intent node, or user intent component of a dialog task. The user intent is how the dialog task is identified by the end-user, for example, Search for a Flight, or Create a Ticket.

Additional components in the dialog task are added to perform the intent requested by the end-user. For example, for the Search for a Flight dialog, you should add additional components to query the user for the departure airport, arrival airport, and date.

To add a component, simply click either of the Add Component icons as shown in the following illustration.

On the command menu displayed, select one of the component types, and then either select an existing component or create a new component as shown in the following example of Create new entity node.

When create new is selected, the component is added to the dialog task with default data that can be modified in the Properties panel.

When adding an entity node, an entity node is added with a default name say Entity0001, default Type set to String, and default User Prompt set to Sample prompt message for Entity0001. After adding a new component, define the component properties as required in the Properties panel. From the Properties Panel you can set:

About the Options Menu

The Options menu is your access to Dialog Builder tool settings and commands such as view settings, dialog task settings, and dialog import and export. To access the commands on the Options menu, click the Ellipses icon located on the upper rightmost side of Dialog Builder as shown in the following illustration.

Using Display Options

You can also set Display Options for your dialog task. Click the Ellipses icon to display the Display Options menu command for nodes in your dialog task. You can use Display Options to reduce unnecessary node information and better utilize screen real estate.

You can show or hide some or all of node type, node details, or connection details shown in Dialog Builder. For example, all details are shown in the following illustration for Show All.

Using Zoom Controls

On the Options menu, click the Ellipses icon to display Zoom Options for:

Fit to page – Resizes Dialog Builder components and connections to fit within the display screen resolution for a single, non-scrolling page.

Reset Zoom – Resets zoom settings to actual size.

Additional Zoom Option controls are available in the lower leftmost side of the Dialog Task builder shown in the following illustration.

Dialog Settings

On the Options menu, click the Ellipses icon to display Dialog Settings for your dialog as shown in the Dialog Task Settings dialog. You can modify the dialog task basic settings, and if desired, set the visibility of a dialog to create a hidden dialog task that is available for use, but not shown as a bot task.

Add or modify the following settings for each dialog:

Name – The Name of your dialog task, usually the main user intent, for example, Pay Bills.

Sub intent only dialog – Task can be invoked only as a sub-task when another task is in progress. The task will not be presented as a bot task when the user requests for help.

Hide from help – Task will not be presented as a bot task when the user requests for help. Users can invoke this task anytime while talking to the bot. Note this option will be selected automatically when the previous option is selected.

Follow-up Task – Follow-up task array will contain all the intents detected from user utterances from this dialog. You can either

handle the follow-up tasks as part of node connections (default setting), or

let the user select the follow-up task.

Task Execution Failure – Define bot behavior when there is any error in task execution. It can be either

same as the Bot Level behavior

specific to this task – initiate a task, run script or show message

Importing and Exporting Dialog Tasks

You can export a complete dialog task, and then import the dialog into another instance of Dialog Builder tool.

Exporting a Dialog

On the Options menu, click the Ellipses icon to display the Export command. Click Export. A .json file is downloaded to the default download directory for your web browser.

The follow JSON example is an exported file for a Dialog task with a single node.

Importing a Dialog

After you have exported a dialog, you an import the dialog to the same, or another instance of Dialog Builder tool. When a file is imported, the data is validated to ensure the intent of the dialog is the same as the import file. Any new nodes or changed settings in the imported dialog is propagated to all other dialog components of the task.

To import a dialog

On the Options menu, click the Ellipses icon to display the Import command.

Click Import, and then in the Import a Dialog dialog, click Choose File.

Navigate to your previously exported dialog, and then click Import.

The Import Successful dialog and the results of the import are displayed as shown in the following illustration.

Color Coded Connections

The conditions, or transitions from one component to another are labeled by a colored arrow showing the path to the next node based on the connection condition defined. In the following color chart, the order of connection color assignment is shown.

When multiple conditions are defined with multiple connection options to other components, the colored arrows help you visualize the flow as shown in the following illustration.

Troubleshooting Your Dialog Task

A real-time set of errors and warnings is available as you define your dialog task located in the upper rightmost corner of Dialog Builder. Click the information icon to display any errors or warnings as shown in the following illustration.

In addition, you can view the flow of your dialog task from the start of the root intent to a selected component by using the Show Trace icon as shown in the following illustration.

In the previous illustration, any components of the dialog task that are not directly in the dialog flow for the selected component are grayed out. Using the trace feature you can look for a broken flow or conditional transition issues. Click ShowTrace again to remove the trace.

The Bots Platform also provides validation of your dialog task at the task level when you exit the Dialog Builder or use the Talk to Bot tool.

You can click the the Talk to bot icon in Dialog Builder located in the lower rightmost corner to display the Talk to Bot pane. You can chat with your Bot to test recognition, performance, and flow without leaving Dialog Builder as shown in the following illustration of the Kore.ai Banking Bot locating bank branches for the user.

Using Debug Log

For additional troubleshooting, you can open the Debug Log window shown in the following illustration from the Talk to Bot pane when you click the Debug Log icon located on the title bar shown in the previous illustration.

In the upper panel of the Debug Log window, a sequential list of dialog task components is displayed. You can also view the dialog flow in the Session Context & Variables panel as an expandable panel of dynamically populated Context object and session variables updated at each processed component in Dialog Builder. For more information, see Using Session and Context Variables in Tasks and Context Object.

Logging

In the log, you can view the sequential progression of the dialog task from a state of started to a state of finished along with the following status for each component step as:

processing – The Bots Platform begins processing of the node

processed – The node and node connections are processed, a following node is found but the dialog has not yet moved to that node.

waitingForUserInput – The user was prompted for input

pause – The current dialog task is paused while another task is started.

resume – The current dialog with status of pause continues at the same point in the flow after completion of another task that was started.

waitingForServerResponse – The server request is pending an asynchronous response.

error – An error occurred, for example, the loop limit is reached, a server or script node execution fails.