vania-janet/multiturn-rag-retrieval-data huggingface dataset:
The client application then stores the returned information in context variable specified in the action request ($weather_forecast).
4. The client application sends another message to the service, including the updated context that contains the weather forecast information. From the dialog's perspective, this message is effectively the next round of user input, although the actual input text is blank.
5. A child node of the #weather node is triggered by the presence of the $weather_forecast context variable. This node responds with text output that includes the weather forecast, which the client application displays to the user. (If the $weather_forecast variable is not set, another child node can handle this case and report an error.)



It is also possible to call an external Web service directly from a dialog node, without involving the client application, by defining a webhook. For more information about how to call an external service using a webhook, see [Making a programmatic call from a dialog node](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-webhooks).



 Procedure 

To request a client action from a dialog node, complete the following steps:



1. In the dialog node from which you want to request the client action, open the JSON editor for the node response.

![Shows how to access the JSON editor associated with a standard noderesponse.](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/contextvar-json-response.png)
2. Use the following syntax to define the client action you want to request.

{
"context": {
"variable_name" : "variable_value"
},
"actions": [
{
"name":"<actionName>",
"type":"client",
"parameters": {
"<parameter_name>":"<parameter_value>",
[Shows user input going to a box that contains the statement If: CONDITION, Then: RESPONSE](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/node1-empty.png)



* Condition: Specifies the information that must be present in the user input for this node in the dialog to be triggered. The information is typically a specific intent. It might also be an entity type, an entity value, or a context variable value. See [Conditions](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overviewdialog-overview-conditions) for more information.
* Response: The utterance that your assistant uses to respond to the user. The response can also be configured to show an image or a list of options, or to trigger programmatic actions. See [Responses](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overviewdialog-overview-responses) for more information.



You can think of the node as having an if/then construction: if this condition is true, then return this response.

For example, the following node is triggered if the natural language processing function of your assistant determines that the user input contains the cupcake-menu intent. As a result of the node being triggered, your assistant responds with an appropriate answer.

![Shows the user asking about cupcake flavors. the If condition is #cupcake-menu and the Then response is a list of cupcake flavors.](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/node1-simple.png)

A single node with one condition and response can handle simple user requests. But, more often than not, users have more sophisticated questions or want help with more complex tasks. You can add child nodes that ask the user to provide any additional information that your assistant needs.

!
Any edit you make to a slot's context variable value in the JSON editor is not reflected in the Check for field after you exit the JSON editor. You must reopen the JSON editor to see what will be saved as the context variable value.

Avoid checking for context variable values in the Check for field. Because the value you check for is also the value that is saved, using a context variable in the condition can lead to unexpected behavior.
* Save it as: Provide a name for the context variable in which to store the value of interest from the user's response to the slot prompt.

Do not reuse a context variable that is used elsewhere in the dialog. If the context variable has a value already, then the slot's prompt is not displayed. It is only when the context variable for the slot is null that the prompt for the slot is displayed.
* Prompt: Write a statement that elicits the piece of the information you need from the user. After displaying this prompt, the conversation pauses and your assistant waits for the user to respond.

If you want the prompt to be something other than a text response, you can change the response type by clicking the Customize slot![Customize slot](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/edit-slot.png) icon. Click Text to choose a different response type.

Response type options:
* [Connect to human agent](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overviewdialog-overview-add-connect-to-human-agent)
* [Image](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overviewdialog-overview-add-image)
* [Option](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overviewdialog-overview-add-option)
When you move a node, all descendants of that node stay with it.
* Because we did not specify a previous_sibling value for node_5, it is now the first sibling under node_1.
* The previous_sibling property of node_4 was updated to node_5.
* The previous_sibling property of node_9 was updated to null, because it is now the first sibling under node_2.







 Resequencing siblings 

Now let's make node_5 the second sibling instead of the first. We can do this by using the POST /dialog_nodes/node_5 method with the following body:

{
"previous_sibling": "node_4"
}

When you modify previous_sibling, the new value must be valid:



* It must refer to an existing node
* It must not refer to the node being modified (a node cannot be its own sibling)
* It must refer to a child of the same parent (all siblings must have the same parent)



The structure changes as follows:

![Example dialog 5](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/dialog_api_5.png)

Note that once again, node_7 stays with its parent. In addition, node_4 is modified so that its previous_sibling is null, because it is now the first sibling.





 Deleting a node 

Now let's delete node_1, using the DELETE /dialog_nodes/node_1 method.

The result is this:

![Example dialog 6](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/dialog_api_6.png)

Note that node_1, node_4, node_5, and node_7 were all deleted.
If a folder does not have a folder condition, then the folder is transparent to your assistant, and each node in the folder is treated like any other individual node in the tree.



 Adding a folder 

To add a folder to a dialog tree, complete the following steps:



1. From the tree view of the Dialog tab, click Add folder.

The folder is added to the end of the dialog tree, just before the Anything else node. Unless an existing node in the tree is selected, in which case, it is added after the selected node.

If you want to add the folder elsewhere in the tree, from the node before the spot where you want to add it, click the More![More icon](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/kebab.png) icon, and then select Add folder.

You can add a folder after a child node within an existing dialog branch. To do so, click the More![More icon](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/kebab.png) icon on the child node, and then select Add folder.

The folder is opened in edit view.
2. Optional: Name the folder.
3. Optional: Define a condition for the folder.

If you do not specify a condition, true is used, meaning the nodes in the folder are always processed.
4. Add dialog nodes to the folder.



* To add existing dialog nodes to the folder, you must move them to the folder one at a time.

On the node that you want to move, click the More!
* [Moving on after multiple failed attempts](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-slotsdialog-slots-stop-trying-after-3)
* [Preventing a Found response from displaying when it is not needed](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-slotsdialog-slots-stifle-found-responses)
* [Handling requests to exit a process](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-slotsdialog-slots-node-level-handler)





 Asking for everything at once 

Include an initial prompt for the whole node that clearly tells users which units of information you want them to provide. Displaying this prompt first gives users the opportunity to provide all the details at once and not have to wait to be prompted for each piece of information one at a time.

For example, when the node is triggered because a customer wants to order a pizza, you can respond with the preliminary prompt, I can take your pizza order. Tell me what size pizza you want and the time that you want it delivered.

If the user provides even one piece of this information in their initial request, then the prompt is not displayed. For example, the initial input might be, I want to order a large pizza. When your assistant analyzes the input, it recognizes large as the pizza size and fills the Size slot with the value provided. Because one of the slots is filled, it skips displaying the initial prompt to avoid asking for the pizza size information again. Instead, it displays the prompts for any remaining slots with missing information.

From the Customize pane where you enabled the Slots feature, select the Prompt for everything checkbox to enable the intial prompt. This setting adds the If no slots are pre-filled, ask this first field to the node, where you can specify the text that prompts the user for everything.





 Capturing multiple values 

You can ask for a list of items and save them in one slot.

For example, you might want to ask users whether they want toppings on their pizza.
As your assistant travels down the tree, when it encounters a folder, if the folder has no condition or its condition is true, it immediately processes the first node in the folder, and continues down the tree in order from there. If a folder does not have a folder condition, then the folder is transparent to your assistant, and each node in the folder is treated like any other individual node in the tree.



 Adding a folder 

To add a folder to a dialog tree, complete the following steps:



1. From the tree view of the Dialog tab, click Add folder.

The folder is added to the end of the dialog tree, just before the Anything else node. Unless an existing node in the tree is selected, in which case, it is added after the selected node.

If you want to add the folder elsewhere in the tree, from the node before the spot where you want to add it, click the More![More icon](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/kabob.png) icon, and then select Add folder.

You can add a folder below a child node within an existing dialog branch. To do so, click the More![More icon](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/kabob.png) icon on the child node, and then select Add folder.

The folder is opened in edit view.
2. Optional: Name the folder.
3. Optional: Define a condition for the folder.

If you do not specify a condition, true is used, meaning the nodes in the folder are always processed.
4. Add dialog nodes to the folder.



* To add existing dialog nodes to the folder, you must move them to the folder one at a time.

On the node that you want to move, click the More!
[Shows the Restaurant booking node that is highlighted and the dialog in progress in the Try it out pane.](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/tut-dig-location.png)
5. Type Tomorrow.

Your assistant responds with a prompt for the time to reserve, What time do you want to go?
6. You do not know when the restaurant closes, so you ask, What time do you close?

The bot digresses away from the restaurant booking node to process the Restaurant opening hours node. It responds with, The restaurant is open from 8:00 AM to 10:00 PM. Your assistant then returns to the restaurant booking node, and prompts you again for the reservation time.

![Shows the digression happen in the Try it out pane.](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/tut-dig-digression.png)
7. Optional: To complete the dialog flow, type 8pm for the reservation time and 2 for the number of guests.



Congratulations! You successfully digressed away from and returned to a dialog flow.





 Step 3: Disabling slot digressions 

In this step, you will edit the digression setting for the restaurant booking node to prevent users from digressing away from it, and see how the setting change impacts the dialog flow.



1. Let's look at the current digression settings for the Restaurant booking node. Click the node to open it in edit view.
2. Click Customize, and then click the Digressions tab.

![Shows the digression settings for the Restaurant booking node.]
: The current API version is now 2017-05-26. This version introduces the following changes:



* The schema of ErrorResponse objects has changed. This change affects all endpoints and methods. For more information, see the [API Reference](https://cloud.ibm.com/apidocs/assistant).
* The internal schema used to represent dialog nodes in exported workspace JSON has changed. If you use the 2017-05-26 API to import a workspace that was exported using an earlier version, some dialog nodes might not import correctly. For best results, always import a workspace using the same version that was used to export it.







 25 May 2017 

Manage context variables
: You can now manage context variables in the "Try it out" pane. Click the Manage context link to open a new pane where you can set and check the values of context variables as you test the dialog. See [Testing your dialog](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-tasksdialog-tasks-test) for more information.





 16 May 2017 

Updates
: This release includes the following updates:



* A Car Dashboard sample workspace is now available when you open the tool. To use the sample as a starting point for your own workspace, edit the workspace. If you want to use it for multiple workspaces, then duplicate it instead. The sample workspace does not count toward your subscription workspace total unless you use it.
* It is now easier to navigate the tool. The navigation menu options are available from the side of the main page instead of the top. In the page header, breadcrumb links display that show you where you are. You can now switch between service instances from the Workspaces page. To get there quickly, click Back to workspaces from the navigation menu. If you have multiple service instances, the name of the current instance is displayed. You can click the Change link beside it to choose another instance.
[Shows the Open context editor menu option selected from the list](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/open-context-editor.png)
* Add the following variable name and value to define the context variable:



Special containment context variable

 Variable Value 

 `context_connect_to_agent` `true` 



* Click X to close the dialog node. Your change is saved automatically.

If you're using multiple conditioned responses, you must click Save first.





To track containment for your assistant, go to the Analytics page. For more information, see [Metrics overview](https://cloud.ibm.com/docs/assistant?topic=assistant-logs-overviewlogs-overview-graphs).
You can condition against context variable values by referencing a context variable from a dialog node condition to determine whether to execute a node. You can also reference a context variable from dialog node response conditions to show different reponses depending on a value provided by an external service or by the user.

Learn more:



* [Passing context from the application](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-runtime-contextdialog-runtime-context-from-app)
* [Passing context from node to node](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-runtime-contextdialog-runtime-context-node-to-node)
* [Defining a context variable](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-runtime-contextdialog-runtime-context-var-define)
* [Common context variable tasks](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-runtime-contextdialog-runtime-context-common-tasks)
* [Deleting a context variable](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-runtime-contextdialog-runtime-context-delete)
* [Updating a context variable](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-runtime-contextdialog-runtime-context-update)
* [How context variables are processed](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-runtime-contextdialog-runtime-context-processing)
* [Order of operation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-runtime-contextdialog-runtime-context-order-of-ops)
* [Adding context variables to a node with slots](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-runtime-contextdialog-runtime-context-var-slots)
For example, a PERSON entity can be an employee of an ORGANIZATION entity or a geo-political entity (GPE), such as MaryemployedByIBM, but organizations and geo-political entities cannot be employed by a person. When a human annotator clicks an entity in the ground truth editor , the list of available relation types is controlled by what is defined in the type system.

Do not define relation attributes. They are not used by the machine learning model. The model uses only the relation type and order, and ignores the relation attributes.
5. Use the Edit and Delete icons to modify entity types and their associated relation types, or to delete an entity type or relation type from the type system.

If you delete an entity that is used in a relation type definition, the relation type definition is also deleted.







Related tasks:

[Modifying a type system without losing human annotations](https://cloud.ibm.com/docs/watson-knowledge-studio-data?topic=watson-knowledge-studio-data-improve-mlwks_projtypesysmod)







 Type system creation guidelines 

The purpose of any type system in Knowledge Studio is to define how spans of text can be annotated. If you choose to create a type system from scratch, follow these guidelines.

Focus on creating an inventory of entity types and relation types that cover the information that is needed by the application in which the type system will be used. Do not cover things that are not needed. Do not split types or make distinctions that are not needed by the application. For example, if the source document contains the sentence Murder on the Orient Express made headlines, then how you define entity types to capture the key information in the sentence differs depending on the type of application that will use the model that you build with the type system.



* For a literary application, you might create types that capture this information:

[NOVEL] [CRITICAL_RECEPTION]

[Murder on the Orient Express] [made headlines]
* For a public safety application, you might create these types:

[EVENT_CRIME] [LOCATION]

[Murder] on the [Orient Express] made headlines
To learn more about the types of secrets that you can create with Secrets Manager, check out the [docs](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-what-is-secret).

ibmcloud secrets-manager secret-create --secret-type SECRET-TYPE --metadata METADATA --resources RESOURCES



 Command options 

--secret-type (string)
: The secret type. Required.

Allowable values are: arbitrary, iam_credentials, imported_cert, public_cert, private_cert, username_password, kv.

--metadata ([CollectionMetadata](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-secrets-manager-cli-v1cli-collection-metadata-example-schema-v1))
: The metadata that describes the resource array. Required.

--resources ([SecretResource]](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-secrets-manager-cli-v1cli-secret-resource-example-schema-v1))
: A collection of resources. Required.





 Examples 

ibmcloud secrets-manager secret-create --secret-type=arbitrary --metadata='{"collection_type": "application/vnd.ibm.secrets-manager.secret+json", "collection_total": 1}' --resources='[{"name": "example-arbitrary-secret", "description": "Extended description for this secret."
Otherwise, choose None of the above and a Custom project type is created for you.
3. If you choose a Document Retrieval project type and your data sources are in English, decide whether to enable the Content Intelligence feature.

If your data source contains contracts, enable the feature by selecting Apply contracts enrichment. Scroll to see the checkbox, if necessary.
4. Click Next.
5. Choose and configure a data source or connect to an existing collection.

For more information about supported data sources, see [Creating collections](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-collections).



Take advantage of the following resources that are available from the page header:



* To open the product documentation, click the Help icon ![Help icon](https://cloud.ibm.com/docs-content/v1/content/f16b1f78a92498247223b337bd9303c2758b9ba8/discovery-data/images/help.svg).
* To see all of your projects, click My projects.







 Project types 

Choose a project type to get the correct set of enrichments applied to your documents automatically. The improvement tools that are available differ by project type, as do the deployment methods, which are optimized for each use case.

The following project types are available:



* [Document Retrieval](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-projectsdoc-retrieval)
* [Document Retrieval for Contracts](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-projectsdoc-retrieval-contracts)
* [Conversational Search](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-projectsconversational)
* [Content Mining](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-projectsmining)
Create a new category for a given type. POST ![Check mark icon](https://cloud.ibm.com/docs-content/v1/content/f61dbc5d84bf0c89e477a05cab04c72f429e1b7a/log-analysis/images/checkmark-icon.svg) 
 Modify a category UPDATE ![Check mark icon](https://cloud.ibm.com/docs-content/v1/content/f61dbc5d84bf0c89e477a05cab04c72f429e1b7a/log-analysis/images/checkmark-icon.svg) 









 Examples of using the categories configuration API 

The following are examples of how to use the categories configuration API.

In these examples, <SERVICE_KEY> is the [service key](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-service_keys) for your Log Analysis instance.



 Creating a category for boards 

The following sample creates a new category for boards named My new category.

curl POST https://api.us-south.logging.cloud.ibm.com/v1/config/categories/boards 
-H 'content-type: application/json' 
-H 'servicekey: <SERVICE_KEY>' 
-d '{"name": "My new category"}'





 Listing all defined categories for views 

The following sample lists all defined categories for views.

curl GET https://api.us-south.logging.cloud.ibm.com/v1/config/categories/views 
-H 'content-type: application/json' 
-H 'servicekey: <SERVICE_KEY>' 





 Deleting a category 

The following sample deletes a category.

curl DELETE https://api.us-south.logging.cloud.ibm.com/v1/config/categories/views/xxxxxxxxxx 
-H 'content-type: application/json'