vania-janet/multiturn-rag-retrieval-data huggingface dataset:
Then, in the pop-up form, uncheck Use default to be able to change the value. Type true in the field for Value of the variable called: deploy_cbr. Thereafter, finish the update by clicking Save.
4. Once the settings page has updated, continue with Generate plan in the top. The plan output should indicate that CBR zones and rules would be created.
5. Create the CBR objects by using the Apply plan button.



By default, the enforcement mode is configured to report-only. You can change the variable cbr_enforcement_mode to the value enabled to enforce the restrictions.







 Step 7: Test the context rules 

With the set of context-based restrictions deployed, it is time again to verify and test them. To verify the CBR objects, go to the [context-based restrictions overview](https://cloud.ibm.com/context-based-restrictions). Then, inspect the new [zones](https://cloud.ibm.com/context-based-restrictions/zones) and [rules](https://cloud.ibm.com/context-based-restrictions/rules).

Tests should be performed on Container Registry, Object Storage and Key Protect and validated by monitoring the logs as performed earlier. Because the zones and rules include an access restriction on the Container Registry, you can repeat the tests performed in section [Test the rule and its enforcement modes](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-cbr-enhanced-securitycbr-security-in-action).

To test the new rule for access to Object Storage, follow these steps:



1. In a browser tab, go to the [list of Object Storage instances](https://cloud.ibm.com/objectstorage). Click on the service name for the tutorial, e.g., secure-file-storage-cos.
2. In a second browser tab, visit the already used Activity Tracker dashboard with the activity logs.
3. Back in the tab with the Object Storage overview, in the list of Buckets, click on the storage bucket.
4.
Add a response with the following values.



Not found response details

 Condition Response 

 `true` Respond with Yes to indicate that you want the reservation to be made as-is, or No to indicate that you do not. 



6. Click Save.
7. Now that you have confirmation responses for slot values, and you ask for everything at once, you might notice that the individual slot responses are displayed before the confirmation slot response is displayed, which can appear repetitive to users. Edit the slot found responses to prevent them from being displayed under certain conditions.
8. Replace the true condition that is specified in the JSON snippet for the last conditional response in the @sys-date slot with !($time && $guests). For example:



Slot 1 conditional response 2 details

 Condition Response Action 

 `!($time && $guests)` $date it is Move on 



9. Replace the true condition that is specified in the JSON snippet for the last conditional response in the @sys-time slot with !($date && $guests). For example:



Slot 2 conditional response 3 details

 Condition Response Action 

 `!($date && $guests)` Ok, the reservation is for $time. Move on 



10. Replace the true condition that is specified in the JSON snippet for the last conditional response in the @sys-number slot with !($date && $time). For example:



Slot 3 conditional response 2 details

 Condition Response Action 

 `!($date && $time)` Ok. The reservation is for $guests guests. Move on 





If you add more slots later, you must edit these conditions to account for the associated context variables for the additional slots. If you do not include a confirmation slot, you can specify !all_slots_filled only, and it would remain valid no matter how many slots you add later.





 Step 6: Reset the slot context variable values 

You might have noticed that before each test, you must clear the context variable values that were created during the previous test.
If you're using multiple conditioned responses, you must click the Customize response icon ![gear icon](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/customize-response-icon.png) to see the menu that is associated with the response.
3. Click Open context editor.

![Shows the Open context editor menu option selected from the list](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/open-context-editor.png)
4. Add the variable name and value pair to the Variable and Value fields.



* The name can contain any uppercase and lowercase alphabetic characters, numeric characters (0-9), and underscores.

You can include other characters, such as periods and hyphens, in the name. However, if you do, then you must specify the shorthand syntax $(variable-name) every time you subsequently reference the variable. See [Expressions for accessing objects](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-expression-languageexpression-language-shorthand-syntax) for more details.
* The value can be any supported JSON type, such as a simple string variable, a number, a JSON array, or a JSON object.





The following table shows some examples of how to define name and value pairs for different types of values:



Name and value pair examples

 Variable Value Value Type 

 dessert cake String 
 age 18 Number 
 toppings_array ["onions","olives"] JSON Array 
 full_name {"first":"John","last":"Doe"} JSON Object 



To subsequently refer to these context variables, use the syntax $name where name is the name of the context variable that you defined.
: You can display a list of options for a user to choose from as the prompt for a slot, for example.

Change to switching service instances
: Where you go to switch service instances has changed. See [Switching the service instance](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant-settingsassistant-settings-switch-instance).

Known issue: Cannot rename search skills
: You currently cannot rename a search skill after you create it.





 9 October 2019 

New system entities changes
: The following updates have been made:



* In addition to English and German, the new numeric system entities are now available in these languages: Brazilian Portuguese, Czech, French, Italian, and Spanish.
* The part_of_day property of the @sys-time entity now returns a time range instead of a single time value.







 23 September 2019 

Dallas updates
: The updates from 20 September are now available to service instances hosted in Dallas.





 20 September 2019 

Inactivity timeout increase
: The maximum inactivity timeout can now be extended to up to 7 days for Premium plans. See [Changing the inactivity timeout setting](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant-settings).

Pattern entity fix
: A change that was introduced in the previous release which changed all alphabetic characters to lowercase at the time an entity value was added has been fixed. The case of any alphabetic characters that are part of a pattern entity value are no longer changed when the value is added.

Dialog text response syntax fix
: Fixed a bug in which the format of a dialog response reverted to an earlier version of the JSON syntax. Standard text responses were being saved as output.text instead of output.generic. For more information about the output object, see [Anatomy of a dialog call](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-runtime-context).





 13 September 2019 

Improved Entities and Intents page responsiveness
: The Entities and Intents pages were updated to use a new JavaScript library that increases the page responsiveness.
{
"context": {
"date": null,
"time": null,
"guests": null,
"confirmation": null,
"counter": 0
},
"output": {}
}
3. From the tree view, expand the reservation node, and then click to edit the node with slots.
4. Click the Edit slot![Edit slot](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/edit-slot.png) icon for the @sys-time slot.
5. From the Options![More icon](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/kabob.png) menu in the Configure slot 2 header, select Enable conditional responses.
6. In the Not found section, add a conditional response.



Not found response details

 Condition Response 

 `true` Please specify the time that you want to eat. The restaurant seats people between 9AM and 9PM. 



7. Add a 1 to the counter variable each time this response is triggered. Remember, this response is only triggered when the user does not provide a valid time value. Click the Edit response![Edit response](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/edit-slot.png) icon.
8. Click the Options!
In this example, we are simply checking the value of the page query parameter:

if (page === 'cards') {
// Update the launcher and home screen with text that is
// specific to credit cards.
...
} else if (page === 'account') {
// Update the launcher and home screen with text that is
// specific to the user's account.
...
}
3. Change the launcher text using the [updateLauncherGreetingMessage()](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-instance-methodsupdateLauncherGreetingMessage) instance method. This changes the text that is displayed on the launcher (by default after 15 seconds).

instance.updateLauncherGreetingMessage("I see you're interested in credit cards! Let me know if I can help.");
4. Change the home screen configuration using the [updateHomeScreenConfig()](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-instance-methodshomescreen) instance method:



* Make sure the home screen is enabled.
* Change the greeting based on the page the user is viewing.
* Configure the buttons shown by the home screen so they offer options that are appropriate for the page the user is viewing.



instance.updateHomeScreenConfig({
is_on: true,
greeting: 'What can I tell you about credit cards?',
starters: {
is_on: true,
buttons: [
{ label: 'Card interest rates' },
{ label: 'Cards with rewards' },
{ label: 'Business cards' }
]
}
});
{
"context": {
"date": null,
"time": null,
"guests": null,
"confirmation": null,
"counter": 0
},
"output": {}
}
3. From the tree view, expand the reservation node, and then click to edit the node with slots.
4. Click the Edit slot![Edit slot](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/edit-slot.png) icon for the @sys-time slot.
5. From the Options![More icon](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/kebab.png) menu in the Configure slot 2 header, select Enable conditional responses.
6. In the Not found section, add a conditional response.



Not found response details

 Condition Response 

 `true` Please specify the time that you want to eat. The restaurant seats people between 9AM and 9PM. 



7. Add a 1 to the counter variable each time this response is triggered. Remember, this response is only triggered when the user does not provide a valid time value. Click the Edit response![Edit response](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/edit-slot.png) icon.
8. Click the Options!
viewOptions.SetLimit(pageSize)
viewOptions.SetStartKey(diet)
viewOptions.SetEndKey(diet)

viewResult, _, err := service.PostView(viewOptions)
if err = nil {
panic(err)
}

for len(viewResult.Rows) > 0 {
documents := viewResult.Rows
b, err := json.MarshalIndent(documents, "", " ")
if err = nil {
panic(err)
}
fmt.Printf(string(b))
// The startKeyDocId of the next request becomes the last document id appended with u0000
viewOptions.SetStartKey(documentslen(documents)-1]! .ID + "u0000")
viewResult, _, err = service.PostView(viewOptions)
if err = nil {
panic(err)
}
}
See the following example of a first response: {
"total_rows": 10,
"offset": 2,
"rows":
{
"id": "elephant",
"key": "herbivore",
"value": 1
},
{
"id": "giraffe",
"key": "herbivore",
"value": 1
},
{
"id": "llama", // <-- append u0000 to the startkey_docid to of the next request
"key": "herbivore",
"value": 1
}
]
}
Show more
See the following example of a second request: get next page of animals by diet
See [Expression language methods](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-methodsdialog-methods-arrays) for more information about methods you can perform on arrays.







 Setting one context variable equal to another 

When you set one context variable equal to another context variable, you define a pointer from one to the other. If the value of one of the variables subsequently changes, then the value of the other variable is changed also.

For example, if you specify a context variable as follows, then when the value of either $var1 or $var2 subsequently changes, the value of the other changes too.



Example context variable

 Variable Value 

 var2 var1 



Do not set one variable equal to another to capture a point in time value. When dealing with arrays, for example, if you want to capture an array value stored in a context variable at a certain point in the dialog to save it for later use, you can create a new variable based on the current value of the variable instead.

For example, to create a copy of the values of an array at a certain point of the dialog flow, add a new array that is populated with the values for the existing array. To do so, you can use the following syntax:

{
"context": {
"var2": "<? output.var2?:new JsonArray().append($var1) ?>"
}
}

Previous topic:[Building a conversational flow](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-overview)

Next topic:[Gathering information with slots](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-slots)
To change what is saved, you must edit the value of the context variable.
2. Open the slot to edit it by clicking the Customize slot![Customize slot](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/edit-slot.png) icon. From the Options![More icon](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/kebab.png) menu, open the JSON editor.
3. Change the context variable value.

The value will look like this:

{
"context": {
"number": "@sys-number >= 0"
}
}

Change it to look like this:

{
"context": {
"number": "@sys-number"
}
}
4. Save your changes.



The change you made to the context variable value is not reflected in the Check for field. You must reopen the JSON editor see what will be saved.

If you do not want to accept a zero as the number value, then you can add a conditional response for the slot to check for zero, and tell the user that they must provide a number greater than zero. But, it is important for the slot condition to be able to recognize a zero when it is provided as input.





 Getting confirmation 

Add a slot after the others that asks the user to confirm that the information you have collected is accurate and complete. The slot can look for responses that match the #yes or #no intent.



Confirmation slot

 Check for Save it as Prompt Follow-up if found Follow-up if not found 

 #yes #no $confirmation I'm going to order you a $size pizza for delivery at $time. Should I go ahead?
curl -u "apikey":"{apikey_value}" "{url}/v1/environments/{environment_id}/configurations/{configuration_id}?version=2019-04-30" > my_config.json

This command lists the contents of your collection file and puts them in a JSON file named my_config.json.
4. Open the my_config.json file in a text editor and make the following changes:



1. Change the value of the "name" field to something that indicates the purpose of the new configuration. You can optionally change the value of the "description" field as well.

...
"name": "wks-config",
"description": "This is a configuration to use with a WKS model",
...
2. Update the enrichment fields with information for the Knowledge Studio model. Assuming that the enrichment fields originally read:

"enrichments": [
{
"source_field": "text",
"destination_field": "enriched_text",
"enrichment": "natural_language_understanding",
"options": {
"features": {
"entities": {
"sentiment": true,
"emotion": false,
"limit": 50
},
"sentiment": {
"document": true
},
"categories": {},
"concepts": {
"limit": 8
},
"relations": {}
}
}
}]
Show more
3. Update the file as follows, substituting the unique ID of the Knowledge Studio model described in "Before you begin" for {watson_knowledge_studio_model_ID}.

It is possible to apply more than one custom model to identical fields using the API. See the example in [Integrating multiple custom models](https://cloud.ibm.com/docs/discovery?topic=discovery-integrating-with-wksintegrate-multiplecustom).
* [Adding context variables to a node with slots](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-runtime-contextdialog-runtime-context-var-slots)





 Passing context from the application 

Pass information from the application to the dialog by setting a context variable and passing the context variable to the dialog.

For example, your application can set a $time_of_day context variable, and pass it to the dialog which can use the information to tailor the greeting it displays to the user.

![Shows a Welcome node that uses response conditions to check for the value of the $time_of_day context variable that is passed to the dialog from the application.](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/set-context.png)

In this example, the dialog knows that the application sets the variable to one of these values: morning, afternoon, or evening. It can check for each value, and depending on which value is present, return the appropriate greeting. If the variable is not passed or has a value that does not match one of the expected values, then a more generic greeting is displayed to the user.





 Passing context from node to node 

The dialog can also add context variables to pass information from one node to another or to update the values of context variables. As the dialog asks for and gets information from the user, it can keep track of the information and reference it later in the conversation.

For example, in one node you might ask users for their name, and in a later node address them by name.

![Shows an introductions node that asks the user for their name, and stores it as a context variable. The next node refers to the user by name by using the $username context variable.]
See [Context variables](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-runtime-contextdialog-runtime-context-variables) for more information. For example, if you know that the $user context variable is set to the current user's name before a node is processed, then you can refer to it in the text response of the node like this:

Hello $user

If the current user's name is Norman, then the response that is displayed to Norman is Hello Norman.

If you include one of these special characters in a text response, escape it by adding a backslash () in front of it. If you are using the JSON editor, you need to use two backslashes to escape (\). Escaping the character prevents your assistant from misinterpreting it as being one of the following artifact types:



Special characters to escape in responses

 Special character Artifact Example 

 $ Context variable The transaction fee is $2. 
 @ Entity Send us your feedback at feedback@example.com. 
 Intent We are the 1 seller of lobster rolls in Maine. 



To include a hypertext link that is rendered in the Try it out pane, you can use HTML syntax. For example: Contact us at <a href="https://www.ibm.com">ibm.com</a>. (Do not try to escape the quotations mark with a backslash ", for example.)



 Learn more about simple responses 



* [Adding multiple lines](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-overviewdialog-overview-multiline)
* [Adding variety](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-overviewdialog-overview-add-variety)







 Adding multiple lines 

If you want a single text response to include multiple lines separated by carriage returns, then follow these steps:



1. Add each line that you want to show to the user as a separate sentence into its own response variation field. For example:



Multiple line response

 Response variations 

 Hi.
When you edit the value in the JSON editor, you are effectively changing only what to save in the context variable. However, you do not want to change what to look for in the input. These two values will be different. That is how you want it to be. Do not edit the Check for field or even give it focus or you will undo the change you made by using the JSON editor to change the value that gets saved.
6. Test the node again. Open the Try it out pane, and click Clear to delete the slot context variable values that you specified when you tested the node with slots earlier. To see the impact of the changes you made, use the following script:



Script details

 Speaker Utterance 

 You i want to make a reservation 
 Watson I can make a reservation for you. Just tell me the day and time of the reservation, and how many people it is for. 
 You We want to dine May 23 at 8pm. There will be 0 guests. 



This time Watson responds with, OK. I am making you a reservation for 0 on Wednesday, May 23 at 8:00 PM.



You have successfully formatted the number slot so that it treats zeros properly. Of course, you might not want the node to accept a zero as a valid number of guests. You will learn how to validate values that are specified by users in the next step.





 Step 4: Validate user input 

So far, we have assumed that the user will provide the appropriate value types for the slots. That is not always the case in reality. You can account for times when users might provide an invalid value by adding conditional responses to slots. In this step, you will use conditional slot responses to perform the following tasks:



* Ensure that the date requested is not in the past.
* Check whether a requested reservation time falls within the seating time window.
* Confirm the user's input.
* Ensure that the number of guests provided is larger than zero.
* Indicate that you are replacing one value with another.



To validate user input, complete the following steps:



1. From the edit view of the node with slots, click the Edit slot!