vania-janet/multiturn-rag-retrieval-data huggingface dataset:
: The main menu options of Assistants and Skills have moved from being displayed in the page header to being shown as icons on the side of the page. The tabbed pages for the tools you use to develop a dialog skill were moved to a secondary navigation bar that is displayed when you open the skill.

Rich response types are supported in a dialog node with slots
: 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.
params.payload.output.generic[0].text = res.translations[0].translation;
return {
body : params
}
})
}
return {
body : params
}
};
Show more





 Removing the webhook 

If you decide you do not want to process message responses, complete the following steps:



1. From the assistant overview page, click the ![Overflow menu](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/kebab.png) icon, and then choose Settings.
2. Click Webhooks > Post-message webhook.
3. Do one of the following things:



* To change the webhook that you want to call, click Delete webhook to delete the currently specified URL and secret. You can then add a new URL and other details.
* To stop calling a webhook to process every message response, click the Post-message webhook switch to disable the webhook altogether.
Analyzing webpages 

Natural Language Understanding enables you to analyze text from webpages programmatically. When you provide raw HTML or a publicly accessible URL in your API request, the service attempts to focus the analysis on the main content of the page, such as the text from a news article or blog post.

How it works:



1. Specify a publicly accessible URL with the url parameter, or send raw HTML in the html parameter.
2. By default, the service [cleans](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-analyzing-webpageswebpage-cleaning) the webpage to remove generally unwanted text such as advertisements.
3. If you specify an [XPath query](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-analyzing-webpagesxpath) with the xpath parameter, the service uses the query to select specific elements of the page to include in the analysis. If clean is set to false when you use xpath, only the result of the XPath query will be analyzed.





 Webpage cleaning 

By default, the service "cleans" webpages before they are analyzed. Webpage cleaning attempts to remove generally unwanted content such as advertisements and other text that might interfere with analyzing the main content of the page.

To disable webpage cleaning, set the clean parameter to false. The following example disables webpage cleaning.

curl -X POST -u "apikey:{apikey}" --header "Content-Type: application/json" --data "{
"url": "http://newsroom.ibm.com/Guerbet-and-IBM-Watson-Health-Announce-Strategic-Partnership-for-Artificial-Intelligence-in-Medical-Imaging-Liver",
"features": {
"concepts": {}
},
"return_analyzed_text": true,
"clean": false
}" "{url}/v1/analyze?version=2018-09-21"





 Analyzing specific elements of a webpage with XPath
For more information on how to launch the Web UI, see [Navigating to the Web UI](https://cloud.ibm.com/docs/workload-protection?topic=workload-protection-launch).
2. Click the user icon. This is the icon with the initials of the logged on user. Then click Integrations.
3. Select Notification Channels.
4. Click the channel you want to edit.
5. After you make changes, click Save.







 Testing a notification channel 

Complete the following steps to test a notification channel:



1. Launch the web UI. For more information on how to launch the Web UI, see [Navigating to the Web UI](https://cloud.ibm.com/docs/workload-protection?topic=workload-protection-launch).
2. Click the user icon. This is the icon with the initials of the logged on user. Then click Integrations.
3. Select Notification Channels.
4. Click the channel you want to edit.
5. Enable the Test notification option.
6. After you make changes, click Save.







 Disabling a notification channel 

Complete the following steps to temporarily disable a notification channel:



1. Launch the web UI. For more information on how to launch the Web UI, see [Navigating to the Web UI](https://cloud.ibm.com/docs/workload-protection?topic=workload-protection-launch).
2. Click the user icon. This is the icon with the initials of the logged on user. Then click Settings.
3. Select Notification Channels.
4. For the channel you want to disable, toggle Enabled for the channel so it is disabled. Alerts are temporarily disabled and notifications muted.







 Deleting a notification channel 

Complete the following steps to delete a notification channel:



1. Launch the web UI.
messageType: 'text',
text: newMessageFromUser,
}
sendMessage(newMessageInput);
} else {
// We're done, so we delete the session.
service
.deleteSession({
assistantId,
sessionId,
})
.then(res => {
return;
})
.catch(err => {
console.log(err); // something went wrong
});
}
}
Show more

Let's take a closer look at the code that outputs the response from the assistant. Now, instead of assuming a text response, the application supports both the text and option response types:

// Display the output from assistant, if any. Supports only a single
// response.
if (response.output.generic) {
if (response.output.generic.length > 0) {
switch (response.output.generic[0].response_type) {
case 'text':
// It's a text response, so we just display it.
console.log(response.output.generic[0].text);
break;
case 'option':
// It's an option response, so we'll need to show the user
// a list of choices.
console.log(response.output.generic[0].title);
const options = response.output.generic[0].options;
// List the options by label.
for (let i = 0; i < options.length; i++) {
console.log((i+1).toString() + '. ' + options[i].label);
}
break;
}
}
}
Show more

If response_type=text, we just display the output, as before. But if response_type=option, we have to do a bit more work.
Notification.Platform.WebChrome,
Notification.Platform.WebFirefox,
Notification.Platform.WebSafari,
Notification.Platform.AppExtChrome])
.tagNames(["tag1", "tag2"])
.build();

// with this

const notificationDevicesModel = {
user_ids: ['userID1', 'userID2'],
fcm_devices: ['deviceID1'],
apns_devices: ['deviceID2'],
tags: ['tag1', 'tag2'],
platforms: ['push_android', 'push_ios', 'push_chrome', 'push_firefox', 'push_safari'],
};
Show more



1. Changes to the FCM style payload



// Replace the below section

var style = PushMessageBuilder.FCMStyle
.type(Notification.FCMStyleTypes
.BIGTEXT_NOTIFICATION)
.text("IBM Push")
.title("Big Text Notification")
.url(" https://upload.wikimedia.org/wikipedia/commons/2/24/IBM_Cloud_logo.png ")
.lines(["IBM", "IBM Cloud", "Big Text Notification"])
.build();

var lights = PushMessageBuilder.FCMLights
.ledArgb(Notification.FCMLED.RED)
.ledOffMs(1.0)
.ledOnMs("1.0")
.build();

// with this

// Style
const styleModel = {
type: 'bigtext_notification',
title: 'Big Text Notification',
url: ' https://upload.wikimedia.org/wikipedia/commons/2/24/IBM_Cloud_logo.png ',
};

// Lights
const lightsModel = {
For more information, see [Autocorrecting user input](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-autocorrection).





 Display formats 

Use display formats for variables that use date, time, numbers, currency, or percentages. You can also choose a default locale to use if one isn't provided by the client application. You can ensure that the format of a variable in the web chat is what you want for your assistant. For example, you can choose to have the output of a time variable appear in HH:MM format instead of HH:MM:SS.

Variables are formatted by using a system default unless you specify otherwise.



 Display format setting Description English - United States (en-US) examples 

 Locale Choose a default locale for the assistant if one can't be determined. The locale that you choose uses formats specific to that country and language. If you choose a locale, the date, time, number, currency, and percentage format fields change to show choices specific to that locale. The system default is English - United States (en-US). 
 Date For calendar dates, choose short, medium, long, full, YY/MM/DD, or YYYY/MM/DD <br><br> * Short: 1/31/23<br> * Medium: Jan 31, 2023<br> * Long: January 31, 2023<br> * Full: Tuesday, January 31, 2023<br><br><br> 
 Time For times, choose short or medium <br><br> * Short: 1:53 PM<br> * Medium: 1:53:30 PM<br><br><br> 
 Number fraction digits Use the system default (up to 14 digits) or two digits 10.12 
 Number delimiter Use the system default, none, comma, or period <br><br> * None: 2000.12<br> * Comma: 2,000.12<br> * Period: 2.000,12<br><br><br> 
 Currency fraction digits Use the system default (up to 14 digits) or two digits 10.99
Allow at least 30 minutes after a user's interaction with your assistant before attempting to filter for that content.





 Viewing individual messages 

For any user input entry, click Open conversation to see the user input and the response made to it by the assistant within the context of the full conversation.

The time that is shown for each conversation is localized to reflect the time zone of your browser. This time might differ from the timestamp shown if you review the same conversation log via an API call; API log calls are always shown in UTC.

![Open conversation panel](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/open_convo.png)

You can then choose to show the classification(s) for the message you selected.

![Open conversation panel with classifications](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/open_convo_classes.png)

If the spell check feature is enabled for the skill, then any user utterances that were corrected are highlighted by the Auto-correct icon. The term that was corrected is underlined. You can hover over the underlined term to see the user's original input.

![Open conversation panel that shows the original text for a term to which spelling correction logic was applied](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/open_convo_spellchecked.jpg)





 Improving across assistants 

Creating a dialog skill is an iterative process. While you develop your skill, you use the Try it out pane to verify that your assistant recognizes the correct intents and entities in test inputs, and to make corrections as needed.
(https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/dialog-start.png)

This design results in a dialog that works like this:



* Whatever the integration type, the conversation_start node is processed, which means any context variables that you define in it are initialized.
* In integrations where the assistant starts the dialog flow, the Welcome node is triggered and its text response is displayed.
* In integrations where the user starts the dialog flow, the user's first input is evaluated and then processed by the node that can provide the best response.









 Ending the conversation gracefully 

The Anything else node is designed to recognize the anything_else special condition, which understands when user input does not match any of the intents that are used as conditions in a dialog's nodes.

Don't delete the Anything else node.

You might not recognize its value at first, but it serves some important functions. If you did delete it, don't panic. You can add it back. Just add a dialog node to the end of your dialog tree, and add the anything_else special condition to its If assistant recognizes field.

The Anything else node provides the following benefits:



* It prevents your assistant from ever going silent and failing to respond at all to your customers. The Anything else node is what enables your assistant to (if nothing else) say, I'm sorry, I didn't understand. or I can't help you with that.
* The skill's analytics feature uses this node to learn about the topics that your dialog can't address. The coverage metric looks for occurrences of nodes with the anything_else condition being processed in the user conversation logs. It uses this information to determine the frequency with which your dialog is able to match user requests to intents that can address them. The node is registered by the metric if it conditions on anything_else alone or when it's used in combination with another condition, such as anything_else && positive_feedback.
"url": "http://newsroom.ibm.com/Guerbet-and-IBM-Watson-Health-Announce-Strategic-Partnership-for-Artificial-Intelligence-in-Medical-Imaging-Liver",
"features": {
"concepts": {}
},
"return_analyzed_text": true,
"clean": false
}" "{url}/v1/analyze?version=2018-09-21"





 Analyzing specific elements of a webpage with XPath 

The xpath parameter enables you to use an XPath query to analyze specific parts of a webpage. To learn more about XPath, check out the following resources.



* [W3Schools XPath tutorial](https://www.w3schools.com/xml/xpath_intro.asp)
* [XPath on Wikipedia](https://wikipedia.org/wiki/XPath)



The behavior of the xpath parameter depends on the value of the clean parameter:



* clean = true (default): Results of the XPath query will be appended to the cleaned webpage text before the combined text is analyzed.
* clean = false: Only the results of the XPath query will be analyzed.





 Including text from specific elements in the analysis 

By default, the clean parameter is set to true, and results of an XPath query are appended to the cleaned webpage text after a newline character before the combined text is analyzed. This can be useful if you want to include elements in the analysis that would otherwise be removed by webpage cleaning. The following example uses the xpath parameter to include the title and subtitle of the example webpage in the analysis.

Example parameters.json file

{
"url": "http://newsroom.ibm.com/Guerbet-and-IBM-Watson-Health-Announce-Strategic-Partnership-for-Artificial-Intelligence-in-Medical-Imaging-Liver",
"features": {
"concepts": {}
},
"return_analyzed_text": true,
Now let's add nodes between the Welcome node and the Anything else node that handle our intents.



1. Click Add node.
2. In the node name field, type Greet customers.
3. In the If assistant recognizes field of this node, start to type General_Greetings. Then, select the General_Greetings option.
4. Add the response text, Good day to you!

![Editing the general greeting node.](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/gs-add-greeting-node.png)
5. Click ![Close](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/close.png) to close the edit view.
6. Click Add node to create a peer node.
7. Name the peer node Say goodbye and specify General_Ending in the If assistant recognizes field.
8. Add OK. See you later. as the response text.

![Editing the general ending node.](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/gs-add-ending-node.png)
9. Click ![Close](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/close.png) to close the edit view.



![Dialog after the ending node is added.]
Click ![Close](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/close.png) to close the edit view.
35. Move the Number provided node before the Ask for order number node. Click the More![More options](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/kebab.png) icon on the Number provided node, and then select Move. Select the Ask for order number node, and then click Above node.

![Shows moving the Number provided child node before the Ask for order number node.](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/gs-ass-reorder-cancel-order-children.png)
36. Force the conversation to evaluate the child nodes under the cancel_order node at run time. Click to open the cancel_order node in the edit view, and then, in the And finally section, select Skip user input.

![Shows setting the cancel order node being set to skip user input.](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/gs-ass-skip-user-input.png)







 Test order cancellations 

Test whether your assistant can recognize character patterns that match the pattern used for product order numbers in user input.



1. Click the !
Create a handler for the [customResponse](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-eventscustomresponse) event. This handler renders the content carousel, using the styles defined by the Swiper library. (You can see the definitions of these styles in the [full example](https://github.com/watson-developer-cloud/assistant-toolkit/tree/master/integrations/webchat/examples/content-carousel).)

This function also relies on a helper function (createSlides()), which we will create in the next step. (The complete code for this function also initializes the Swiper library; for more information, see the [full example](https://github.com/watson-developer-cloud/assistant-toolkit/tree/master/integrations/webchat/examples/content-carousel).)

function carouselCustomResponseHandler(event, instance) {
const { element, message } = event.data;

element.innerHTML = 
<div class="Carousel">
<div class="swiper">
<div class="swiper-wrapper"></div>
</div>
<div class="Carousel__Navigation" >
<button type="button" class="Carousel__NavigationButton Carousel__NavigationPrevious bx--btn bx--btn--ghost">
<svg fill="currentColor" width="16" height="16" viewBox="0 0 32 32" aria-hidden="true"><path d="M20 24L10 16 20 8z"></path></svg>
</button>
<div class="Carousel__BulletContainer"></div>
<button type="button" class="Carousel__NavigationButton Carousel__NavigationNext bx--btn bx--btn--ghost">
(https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/gs-add-ending-node.png)
9. Click ![Close](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/close.png) to close the edit view.



![Dialog after the ending node is added.](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/gs-ending-node-added.png)





 Testing intent recognition 

You built a simple dialog to recognize and respond to both greeting and ending inputs. Let's see how well it works.



1. Click the ![Try it](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/try-it.png) icon to open the "Try it out" pane. There's that reassuring welcome message.
2. In the text field, type Hello and then press Enter. The output indicates that the General_Greetings intent was recognized, and the appropriate response (Good day to you.) is displayed.
3. Try the following input:



* bye
* howdy
* see ya
* good morning
* sayonara



Your browser does not support the video tag.

Watson can recognize your intents even when your input doesn't exactly match the examples that you included.
The following examples show error responses. They include a JSON text message and a formatted message from the client's onClose() callback method. The formatted messages begin with the boolean true because the connection is closed. They also include the WebSocket error code that caused the closure.



* This example shows error messages for an invalid argument for the accept parameter:

{
"error": "Unsupported mimetype. Supported mimetypes are: ['application/json', 'audio/flac', ...]"
}
(True, 1011, u'see the previous message for the error details.')
* This example shows error messages for a missing text parameter:

{
"error": "Required parameter "text" is missing."
}
(True, 1011, u'see the previous message for the error details.')



The following example shows a warning response, in this case for an unknown parameter named invalid-parameter. It does not include the second message because the connection is not closed by the warning.

{
"warnings": "Unknown arguments: invalid-parameter."
}
Because we need a way to end the conversation, the client app is also watching for the literal command quit to indicate that the program should exit.

But something still isn't right:

Welcome to the Watson Assistant example. What's your name?
>> Robert
I'm afraid I don't understand. Please rephrase your question.
>> I want to make an appointment.
What day would you like to come in?
>> Thursday
I'm afraid I don't understand. Please rephrase your question.
>>

The assistant is starting out with the correct greeting, but it doesn't understand when you tell it your name. And if you tell it you want to make an appointment, the correct action is triggered; but once again, it doesn't understand when you answer the follow-up question.

This is happening because we are using the stateless message method, which means that it is the responsibility of our client application to maintain state information for the conversation. Because we are not yet doing anything to maintain state, the assistant sees every round of user input as the first turn of a new conversation. Because it has no memory of asking a question, it tries to interpret your answer as a new question or request.





 Maintaining state 

State information for your conversation is maintained using the context. The context is an object that is passed back and forth between your application and the assistant, storing information that can be preserved and updated as the conversation goes on. Because we are using the stateless message method, the assistant does not store the context, so it is the responsibility of our client application to maintain it from one turn of the conversation to the next.

The context includes a session ID for each conversation, as well as a counter that is incremented with each turn of the conversation. The assistant updates the context and returns it with each response. But our previous version of the example did not preserve the context, so these updates were lost, and each round of input appeared to be the start of a new conversation. We can fix that by saving the context and sending it back to the assistant each time.