vania-janet/multiturn-rag-retrieval-data huggingface dataset:
This choice prevents you from having to edit the current node's settings when you remove or reorder the child nodes being jumped to. See [Defining what to do next](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overviewdialog-overview-jump-to).
* Before you enable digressions away from a node, test the most common user scenarios. And be sure that likely digressed-to nodes are configured to return. See [Digressions](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-runtimedialog-runtime-digressions).







 Adding responses 



* Keep answers short and useful.
* Reflect the user's intent in the response.

Doing so assures users that the bot is understanding them, or if it is not, gives users a chance to correct a misunderstanding immediately.
* Only include links to external sites in responses if the answer depends on data that changes frequently.
* Avoid overusing buttons. Encouraging users to pick predefined options from a set of buttons is less like a real conversation, and decreases your ability to learn what users really want to do. When you let real users ask for things in their own words, you can use the input to train the system and derive better intents.
* Avoid using a bunch of nodes when one node will do. For example, add multiple conditional responses to a single node to return different responses depending on details provided by the user. See [Conditional responses](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overviewdialog-overview-multiple).
* Word your responses carefully. You can change how someone reacts to your system based simply on how you phrase a response. Changing one line of text can prevent you from having to write multiple lines of code to implement a complex programmatic solution.
* Back up your skill frequently. See [Downloading a skill](https://cloud.ibm.com/docs/assistant?topic=assistant-skill-tasksskill-tasks-download).







 Tips for capturing information from user input
[Shows a node that shows a user ask, Where are you located, and the dialog has three different responses depending on conditions that use info from the $state context variable to specify locations in those states.](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/multiple-responses.png)

This single node now provides the equivalent function of four separate nodes.

To add conditional responses to a node, complete the following steps:



1. Click Customize, and then set the Multiple conditioned responses switch to On.

The node response section changes to show a pair of condition and response fields. You can add a condition and a response into them.
2. To customize a response further, click the Edit response![Edit response](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/edit-slot.png) icon next to the response.

You must open the response for editing to complete the following tasks:



* Update context. To change the value of a context variable when the response is triggered, specify the context value in the context editor. You update context for each individual conditional response; there is no common context editor or JSON editor for all conditional responses.
* Add rich responses. To add more than one text response or to add response types other than text responses to a single conditional response, you must open the edit response view.
* Configure a jump. To instruct your assistant to jump to a different node after this conditional response is processed, select Jump to from the And finally section of the response edit view. Identify the node that you want your assistant to process next. See [Configuring the Jump to action](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overviewdialog-overview-jump-to-config) for more information.
* a digression that starts elsewhere and enters the node must return to the interrupted dialog flow after the current dialog flow is completed



To change the digression behavior for an individual node, complete the following steps:



1. Click the node to open its edit view.
2. Click Customize, and then click the Digressions tab.

The configuration options differ depending on whether the node you are editing is a root node, a child node, a node with children, or a node with slots.



 Digressions away from this node 

If the circumstances listed earlier do not apply, then you can make the following choices:



* All node types: Choose whether to allow users to digress away from the current node before they reach the end of the current dialog branch.
* All nodes that have children: Choose whether you want the conversation to come back to the current node after a digression if the current node's response has already been displayed and its child nodes are incidental to the node's goal. Set the Allow return from digressions triggered after this node's response toggle to No to prevent the dialog from returning to the current node and continuing to process its branch.

For example, if the user asks, Do you sell cupcakes? and the response, We offer cupcakes in a variety of flavors and sizes is displayed before the user changes subjects, you might not want the dialog to return to where it was. Especially, if the child nodes only address possible follow-up questions from the user and can safely be ignored.

However, if the node relies on its child nodes to address the question, then you might want to force the conversation to return and continue processing the nodes in the current branch. For example, the initial response might be, We offer cupcakes in all shapes and sizes. Which menu do you want to see: gluten-free, dairy-free, or regular? If the user changes subjects at this point, you might want the dialog to return so the user can pick a menu type and get the information they wanted.
* Nodes with slots: Choose whether you want to allow users to digress away from the node before all of the slots are filled.
You have successfully enabled the @sys-date, @sys-time, and @sys-number system entities. Now you can use them in your dialog.





 Step 3: Add a dialog node with slots 

A dialog node represents the start of a thread of dialog between your assistant and the user. It contains a condition that must be met for the node to be processed by your assistant. At a minimum, it also contains a response. For example, a node condition might look for the hello intent in user input, and respond with, Hi. How can I help you? This example is the simplest form of a dialog node, one that contains a single condition and a single response. You can define complex dialogs by adding conditional responses to a single node, adding child nodes that prolong the exchange with the user, and much more. (If you want to learn more about complex dialogs, you can complete the [Building a complex dialog](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-tutorial) tutorial.)

The node that you will add in this step is one that contains slots. Slots provide a structured format through which you can ask for and save multiple pieces of information from a user within a single node. They are most useful when you have a specific task in mind and need key pieces of information from the user before you can perform it. See [Gathering information with slots](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-slots) for more information.

The node you add will collect the information required to make a reservation at a restaurant.



1. Click the Dialogs tab to open the dialog tree.
2. Click the More icon ![More options](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/kabob.png) on the #General_Greetings node, and then select Add node below.
3.
(https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/node-flow.png)

When you start to build the dialog, you must determine the branches to include, and where to place them. The order of the branches is important because nodes are evaluated from first to last. The first root node whose condition matches the input is used; any nodes that come later in the tree are not triggered.

When your assistant reaches the end of a branch, or cannot find a condition that evaluates to true from the current set of child nodes it is evaluating, it jumps back out to the base of the tree. 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 anything_else condition that always evaluates to true, is returned.

You can disrupt the standard first-to-last flow in the following ways:



* By customizing what happens after a node is processed. For example, you can configure a node to jump directly to another node after it is processed, even if the other node is positioned earlier in the tree. See [Defining what to do next](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-builddialog-overview-jump-to) for more information.
* By configuring conditional responses to jump to other nodes. See [Conditional responses](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-builddialog-overview-multiple) for more information.
* By configuring digression settings for dialog nodes. Digressions can also impact how users move through the nodes at run time. If you enable digressions away from most nodes and configure returns, users can jump from one node to another and back again more easily.
Click the System entities tab, and then turn on these entities:



* @sys-time
* @sys-date
* @sys-number





You have successfully enabled the @sys-date, @sys-time, and @sys-number system entities. Now you can use them in your dialog.





 Step 3: Add a dialog node with slots 

A dialog node represents the start of a thread of dialog between your assistant and the user. It contains a condition that must be met for the node to be processed by your assistant. At a minimum, it also contains a response. For example, a node condition might look for the hello intent in user input, and respond with, Hi. How can I help you? This example is the simplest form of a dialog node, one that contains a single condition and a single response. You can define complex dialogs by adding conditional responses to a single node, adding child nodes that prolong the exchange with the user, and much more. (If you want to learn more about complex dialogs, you can complete the [Building a complex dialog](https://cloud.ibm.com/docs/assistant?topic=assistant-tutorial) tutorial.)

The node that you will add in this step is one that contains slots. Slots provide a structured format through which you can ask for and save multiple pieces of information from a user within a single node. They are most useful when you have a specific task in mind and need key pieces of information from the user before you can perform it. See [Gathering information with slots](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-slots) for more information.

The node you add will collect the information required to make a reservation at a restaurant.



1. Click the Dialogs tab to open the dialog tree.
2. Click the More icon !
"source": "http://example.com/image.jpg",
"title": "Example image",
"description": "Some description for the image."
},
{
"response_type": "option",
"title": "Click on one of the following",
"options":
{
"label": "Location 1",
"value": {
"input": {
"text": "Location 1"
}
}
},
{
"label": "Location 2",
"value": {
"input": {
"text": "Location 2"
}
}
},
{
"label": "Location 3",
"value": {
"input": {
"text": "Location 3"
}
}
}
]
}
]
}
}
Show more

For more information about how to specify each supported response type using JSON objects, see [Response types](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-responses-jsondialog-responses-json-response-types).

If you are using the Watson Assistant connector, the response is converted at run time into the format expected by the channel (Slack or Facebook Messenger). If the response contains multiple media types or attachments, the generic response is converted into a series of separate message payloads as needed. The connector then sends each message payload to the channel in a separate message.

Note: When a response is split into multiple messages, the Watson Assistant connector sends these messages to the channel in sequence. It is the responsibility of the channel to deliver these messages to the end user; this can be affected by network or server issues.





 Native JSON format 

In addition to the generic JSON format, the dialog node JSON also supports channel-specific responses written using the native Slack and Facebook Messenger formats. These formats are also supported by the Watson Assistant connector.
v1 [cURL](https://cloud.ibm.com/apidocs/assistant/assistant-v1createdialognode)[node](https://cloud.ibm.com/apidocs/assistant/assistant-v1?code=nodecreatedialognode)[java](https://cloud.ibm.com/apidocs/assistant/assistant-v1?code=javacreatedialognode)[python](https://cloud.ibm.com/apidocs/assistant/assistant-v1?code=pythoncreatedialognode) 
 Get dialog node Get information about a dialog node. v1 [cURL](https://cloud.ibm.com/apidocs/assistant/assistant-v1getdialognode)[node](https://cloud.ibm.com/apidocs/assistant/assistant-v1?code=nodegetdialognode)[java](https://cloud.ibm.com/apidocs/assistant/assistant-v1?code=javagetdialognode)[python](https://cloud.ibm.com/apidocs/assistant/assistant-v1?code=pythongetdialognode) 
 Update dialog node Update an existing dialog node with new or modified data. v1 [cURL](https://cloud.ibm.com/apidocs/assistant/assistant-v1updatedialognode)[node](https://cloud.ibm.com/apidocs/assistant/assistant-v1?code=nodeupdatedialognode)[java](https://cloud.ibm.com/apidocs/assistant/assistant-v1?code=javaupdatedialognode)[python](https://cloud.ibm.com/apidocs/assistant/assistant-v1?code=pythonupdatedialognode) 
 Delete dialog node Delete a dialog node from a workspace.
For each node, you configure whether:<-- <ul> --> * a digression can start from and leave the node * a digression that starts elsewhere can target and enter the node * a digression that starts elsewhere and enters the node must return to the interrupted dialog flow after the current dialog flow is completed<-- </ul> -->To change the digression behavior for an individual node, complete the following steps:<-- <ol> -->1. Click the node to open its edit view.2. Click Customize, and then click the Digressions tab.
The configuration options differ depending on whether the node you are editing is a root node, a child node, a node with children, or a node with slots.

Digressions away from this node

If the circumstances listed earlier do not apply, then you can make the following choices:

<-- <ul> -->

* All node types: Choose whether to allow users to digress away from the current node before they reach the end of the current dialog branch.
* All nodes that have children: Choose whether you want the conversation to come back to the current node after a digression if the current node's response has already been displayed and its child nodes are incidental to the node's goal. Set the Allow return from digressions triggered after this node's response switch to No to prevent the dialog from returning to the current node and continuing to process its branch.

For example, if the user asks, Do you sell cupcakes? and the response, We offer cupcakes in a variety of flavors and sizes is displayed before the user changes subjects, you might not want the dialog to return to where it left off. Especially, if the child nodes only address possible follow-up questions from the user and can safely be ignored.

However, if the node relies on its child nodes to address the question, then you might want to force the conversation to return and continue processing the nodes in the current branch. For example, the initial response might be, We offer cupcakes in all shapes and sizes. Which menu do you want to see: gluten-free, dairy-free, or regular?
<-- </ul> --><-- </section "id="section-dialog-runtime-digress-tips" "> --><-- <section "id="section-dialog-runtime-disable-digressions" "> --> Disabling digressions into a root node When a flow digresses into a root node, it follows the course of the dialog that is configured for that node. So, it might process a series of child nodes before it reaches the end of the node branch, and then, if configured to do so, goes back to the dialog flow that was interrupted. Through dialog testing, you might find that a root node is triggered too often, or at unexpected times, or that its dialog is too complex and leads the user too far off course to be a good candidate for a temporary digression. If you determine that you would rather not allow users to digress into it, you can configure the root node to not allow digressions in.To disable digressions into a root node altogether, complete the following steps:<-- <ol> -->1. Click to open the root node that you want to edit.2. Click Customize, and then click the Digressions tab.3. Set the Allow digressions into this node switch to Off.4. Click Apply.<-- </ol> -->If you decide that you want to prevent digressions into several root nodes, but do not want to edit each one individually, you can add the nodes to a folder. From the Customize page of the folder, you can set the Allow digressions into this node switch to Off to apply the configuration to all of the nodes at once. See Organizing the dialog with folders]] ! ! for more information.<-- </section "id="section-dialog-runtime-disable-digressions" "> --><-- <section "id="section-dialog-runtime-digression-tutorial" "> --> Digression tutorial Follow the tutorial]] ! ! ! ! ! ! ! !
* [Customizing digressions](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-runtimedialog-runtime-enable-digressions)
* [Digression usage tips](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-runtimedialog-runtime-digress-tips)
* [Disabling digressions into a root node](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-runtimedialog-runtime-disable-digressions)
* [Digression tutorial](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-runtimedialog-runtime-digression-tutorial)
* [Design considerations](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-runtimedialog-runtime-digression-design-considerations)





 Before you begin 

As you test your overall dialog, decide when and where it makes sense to allow digressions and returns from digressions to occur. The following digression controls are applied to the nodes automatically. Only take action if you want to change this default behavior.



* Every root node in your dialog is configured to allow digressions to target them by default. Child nodes cannot be the target of a digression.
* Nodes with slots are configured to prevent digressions away. All other nodes are configured to allow digressions away. However, the conversation cannot digress away from a node under the following circumstances:



* If any of the child nodes of the current node contain the anything_else or true condition



These conditions are special in that they always evaluate to true. Because of their known behavior, they are often used in dialogs to force a parent node to evaluate a specific child node in succession. To prevent breaking existing dialog flow logic, digression are not allowed in this case.
* [Disambiguation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-sms-actionsdialog-sms-actions-disambiguation)





 Options list 

The dialog supports an option response type, which shows the customer multiple options to choose from. You can customize how the options that are defined for an option response type are shown to customers and the ways in which a customer can select an option by adding the vgwActSetOptionsConfig action command.

The following example shows how to customize the option response type.

{
"output": {
"generic": [
{
"title": "Which of these items do you want to insure?",
"options":
{
"label": "Boat",
"value": {
"input": {
"text": "I want to buy boat insurance."
}
},
"label": "Car",
"value": {
"input": {
"text": "I want to buy car insurance."
}
},
"label": "House",
"value": {
"input": {
"text": "I want to buy house insurance."
}
}
}
],
"description": "Insurance types.",
"response_type": "option"
}
]
},
"context": {
"smsAction": {
"command": "smsActSetOptionsConfig",
"parameters": {
"prefixText": "%s."
}
}
}
}
Show more

First the value specified in the title attribute is displayed to the user. Then, the text specified in each label attribute. For example, Which of these items do you want to insure? 1.Boat 2.Car 3.House

To configure what the assistant shows before each option, edit the prefixText parameter.
v1 [cURL](https://cloud.ibm.com/apidocs/assistant/assistant-v1deletesynonym)[node](https://cloud.ibm.com/apidocs/assistant/assistant-v1?code=nodedeletesynonym)[java](https://cloud.ibm.com/apidocs/assistant/assistant-v1?code=javadeletesynonym)[python](https://cloud.ibm.com/apidocs/assistant/assistant-v1?code=pythondeletesynonym) 
 List dialog nodes List the dialog nodes for a workspace. v1 [cURL](https://cloud.ibm.com/apidocs/assistant/assistant-v1listdialognodes)[node](https://cloud.ibm.com/apidocs/assistant/assistant-v1?code=nodelistdialognodes)[java](https://cloud.ibm.com/apidocs/assistant/assistant-v1?code=javalistdialognodes)[python](https://cloud.ibm.com/apidocs/assistant/assistant-v1?code=pythonlistdialognodes) 
 Create dialog node Create a new dialog node. v1 [cURL](https://cloud.ibm.com/apidocs/assistant/assistant-v1createdialognode)[node](https://cloud.ibm.com/apidocs/assistant/assistant-v1?code=nodecreatedialognode)[java](https://cloud.ibm.com/apidocs/assistant/assistant-v1?code=javacreatedialognode)[python](https://cloud.ibm.com/apidocs/assistant/assistant-v1?code=pythoncreatedialognode) 
 Get dialog node Get information about a dialog node.
* We changed how intents are scored and added the ability to mark input as irrelevant to your application. For details, see [Defining intents](https://cloud.ibm.com/docs/assistant?topic=assistant-intents) and search for Mark as irrelevant.
* This release introduced a major change to the workspace. To benefit from the changes, you must manually upgrade your workspace.
* The processing of Jump to actions changed to prevent loops that can occur under certain conditions. Previously, if you jumped to the condition of a node and neither that node nor any of its peer nodes had a condition that was evaluated as true, the system would jump to the root-level node and look for a node whose condition matched the input. In some situations this processing created a loop, which prevented the dialog from progressing.



Under the new process, if neither the target node nor its peers is evaluated as true, the dialog turn is ended. To reimplement the old model, add a final peer node with a condition of true. In the response, use a Jump to action that targets the condition of the first node at the root level of your dialog tree.





 11 January 2017 

Customize node titles
: In this release, you can customize node titles in dialog.





 22 December 2016 

Node title section
: In this release, dialog nodes display a new section for node title. The ability to customize the node title is not available. When collapsed, the node title displays the node condition of the dialog node. If there is not a node condition, "Untitled Node" is displayed as the title.





 19 December 2016 

Dialog editor UI changes
: Several changes make the dialog editor easier and more intuitive to use:



* A larger editing view makes it easier to view all the details of a node as you work on it.
* A node can contain multiple responses, each triggered by a separate condition. For more information see [Multiple responses](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overviewdialog-overview-responses).







 5 December 2016 

Updates
: This release includes the following updates: