vania-janet/multiturn-rag-retrieval-data huggingface dataset:
If your application uses the sessions interface, you must migrate to one of the following interfaces by September 7:



* For stream-based speech recognition (including live-use cases), use the [WebSocket interface](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-websockets), which provides access to interim results and the lowest latency.
* For file-based speech recognition, use one of the following interfaces:



* For shorter files of up to a few minutes of audio, use either the [synchronous HTTP interface](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-http)(POST /v1/recognize) or the [asynchronous HTTP interface](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-async) (POST /v1/recognitions).
* For longer files of more than a few minutes of audio, use the asynchronous HTTP interface. The asynchronous HTTP interface accepts as much as 1 GB of audio data with a single request.





The WebSocket and HTTP interfaces provide the same results as the sessions interface (only the WebSocket interface provides interim results). You can also use one of the Watson SDKs, which simplify application development with any of the interfaces. For more information, see the [API & SDK reference](https://cloud.ibm.com/apidocs/speech-to-text).





 13 July 2018 

Updates to Spanish narrowband model for improved speech recognition
: The Spanish narrowband model, es-ES_NarrowbandModel, was updated for improved speech recognition. By default, the service automatically uses the updated model for all recognition requests. If you have custom language or custom acoustic models that are based on this model, you must upgrade your custom models to take advantage of the updates by using the following methods:



* POST /v1/customizations/{customization_id}/upgrade_model
* POST /v1/acoustic_customizations/{customization_id}/upgrade_model
The Phone and Twilio messaging integrations are available as beta features in Watson Assistant service instances that are hosted in Dallas, Frankfurt, and Washington, DC.

The web chat integration is added to new assistants automatically
: Much like the Preview link integration, the Web chat integration now is added to the My first assistant assistant that is created for new users automatically.





 24 September 2020 

Introducing the containment metric!
: Want a quick way to see how often your assistant has to ask for help? Enable the new containment metric to find out. The containment metric measures the rate at which your assistant is able to address a customer's goal without human intervention. For conversations that are not contained, you can review the logs to understand what led customers to seek help outside of the assistant. For the metric to work, you must design your dialog to flag requests for additional support when they occur. For more information, see [Graphs and statistics](https://cloud.ibm.com/docs/assistant?topic=assistant-logs-overviewlogs-overview-graphs).

Chat transfer improvements
: When you add the Connect to human agent response type to a dialog node, you can now define messages to show to your customers during the transfer, and can specify service desk agent routing preferences. For more information, see [Adding a Connect to human agent response type](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overviewdialog-overview-add-connect-to-human-agent).





 22 September 2020 

New API version
: The current v2 API version is now 2020-09-24. In this version, the structure of the search response type has changed. The results property has been removed and replaced with two new properties:



* primary_results property includes the search results that should be displayed in the initial response to a user query.
* additional_results property includes search results that can be displayed if the user wants to see more.



The search skill configuration determines how many search results are included in the primary_results and additional_results properties.

Search skill improvements
: The following improvements were made to the search skill:
This documentation is for the classic Watson Assistant experience. To see the documentation for the new Watson Assistant, please go [here](https://cloud.ibm.com/docs/watson-assistant).



 Improve your skill 

The Analytics page of Watson Assistant provides a history of conversations between users and a deployed assistant. You can use this history to improve how your assistants understand and respond to user requests.

To open a list of individual messages between customers and the assistant that uses this dialog skill, select User conversations in the navigation bar.

When you open the User conversations page, the default view lists inputs that were submitted to the assistant for the last day, with the newest results first. The top intent (#intent) and any recognized entity (@entity) values used in a message, and the message text are available. For intents that are not recognized, the value shown is Irrelevant. If an entity is not recognized, or has not been provided, the value shown is No entities found.

![Logs default page](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/logs_page1.png)

The User conversations page displays the total number of messages between customers and your assistant. A message is a single utterance that a user sends to the assistant. A conversation typically consists of multiple messages. Therefore, the number of results on the User conversations page is different from the number of conversations that are shown on the Overview page.



 Log limits 

The length of time for which messages are retained depends on your Watson Assistant service plan:

Service plan | Chat message retention
------------------------------------ | ------------------------------------
Enterprise with Data Isolation | Last 90 days
Enterprise | Last 30 days
Premium (legacy) | Last 90 days
Plus | Last 30 days
As an example, to delete any message data associated with a user that has the customer ID abc from your Watson Assistant instance, send the following cURL command:

curl -X DELETE -u "apikey:3Df... ...Y7Pc9" "{url}/v2/user_data?customer_id=abc&version=2020-04-01"

where {url} is the appropriate URL for your instance. For more details, see [Service endpoint](https://cloud.ibm.com/apidocs/assistant/assistant-v2service-endpoint).

An empty JSON object {} is returned.

For more information, see the [API reference](https://cloud.ibm.com/apidocs/assistant/assistant-v2deleteuserdata).

Note: Delete requests are processed in batches and may take up to 24 hours to complete.







 Web chat usage data 

The Watson Assistant web chat sends limited usage data to the [Amplitude service](https://amplitude.com/). When the web chat widget is being interacted with by a user, we track the features that are being used, and events such as how many times the widget is opened and how many users start conversations. This information does not include Assistant training data or the content of any chat interactions. The information being sent to Amplitude is not Content as defined in the Cloud Service Agreement (CSA); it is Account Usage Information as described in Section 9.d of the CSA and is handled accordingly as described in the [IBM Privacy Statement](https://www.ibm.com/privacy). The purpose of this information gathering is limited to establishing statistics about use and effectiveness of the web chat and making general improvements.





 Private network endpoints 

You can set up a private network for Watson Assistant instances that are part of a Plus or Enterprise service plan. Using a private network prevents data from being transferred over the public internet, and ensures greater data isolation.

!
* In the Visitor Authentication section, click the Generate button.



For more information, see [Enabling authenticated visitors in the Chat widget](https://support.zendesk.com/hc/en-us/articles/360022185314-Enabling-authenticated-visitors-in-the-Chat-widget). You do not need to follow the steps to create a JWT. The Assistant service generates a JSON Web Token for you.
4. Copy the shared secret from Zendesk.



To secure the Zendesk connection, complete the following steps:



1. In the Authenticate users section, set the switch to On.
2. Paste the secret that you copied from the Zendesk setup page into the Zendesk shared secret field.
3. Decide whether to allow unidentified users to access Zendesk.

The web chat integration allows anonymous users to initiate chats. However, as soon as you enable visitor authentication, Zendesk requires that the name and email of each user be provided. If you try to connect without passing the required information, the connection will be refused.

If you want to allow anonymous users to connect to Zendesk, you can provide fictitious name and email data. Write a function to populate the two fields with fictitious name and email values.

For example, your function must check whether you know the name and email of the current user, and if not, add canned values for them:

const userPayload = {
"name" : "Jane Doe1",
"email" : "jdoe1@example.com",
}

After writing a function that ensures that name and email values are always provided, set the Authenticate anonymous user chat transfers switch to On.







 Adding transfer support to your dialog 

Update your dialog to make sure it understands when users request to speak to a person, and can transfer the conversation properly. For more information, see [Adding chat transfer support](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-supportdialog-support-transfers).





 Adding routing logic for transfers
Authenticating users 

With web chat security enabled, you can securely authenticate customers by user ID.

The default behavior of the web chat integration is to identify unique users by setting the value of the user_id property that is sent as part of each message to the assistant. (For more information, see [Managing user identity information](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-web-chat-develop-userid).)

This approach is sufficient for tracking unique users for billing purposes, but it is not secure and should not be used for access control. If you enable web chat security, you can use JSON Web Tokens (JWTs) to securely authenticate your users and control access to functions of your assistant that require authorization.



 Authenticating with the sub claim 

To use this method for authenticating users, you must first enable the web chat security feature. For more information, see [Enabling web chat security](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-web-chat-security-enable).

When you create a JWT for the web chat, you must specify a value for the sub (subject) claim, which identifies the user. (For anonymous users, you can use a generated unique ID.)

When you generate a user ID for an anonymous user, be sure to save the generated ID in a cookie to prevent being billed multiple times for the same customer.

When the web chat integration receives a message signed with this JWT, it stores the user ID from the sub claim as context.global.system.user_id. For user-based plans, this user ID is used for billing purposes. (You cannot use the updateUserID() instance method to set the user ID if web chat security is enabled.) The same user ID is also used as the customer ID, which can be used to make requests to delete user data. Because the customer ID is sent in a header field, the ID you specify must meet the requirements for header fields as defined in [RFC 7230](https://tools.ietf.org/html/rfc7230section-3.2).
Likewise, the web chat applies an American English locale to content that is added by the web chat unless you specify something else. The locale setting affects how values such as dates and times are formatted.

To configure the web chat for customers outside the US, follow these steps:



1. To apply the appropriate syntax to dates and times and to use a translation of the English-language phrases, set the locale. Use the instance.updateLocale() method.

For example, if you apply the Spanish locale (es), the web chat uses Spanish-language phrases that are listed in the es.json file, and uses the DD-MM-YYYY format for dates instead of MM-DD-YYYY.

The locale you specify for the web chat does not impact the syntax of dates and times that are returned by the underlying skill.
2. To change only the language of the hardcoded English phrases, use the instance.updateLanguagePack() method.

For more information, see [Instance methods](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-instance-methodslanguages).
3. To change the text direction of the page from right to left, use the direction method. For more information, see [Configuration](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-configurationconfigurationobject).







 Securing the web chat 

Configure the web chat to authenticate users and send private data from your embedded web chat.

All messages that are sent from the web chat are encrypted. When you enable security, your assistant takes an additional step to verify that messages originate from the web chat that is embedded in your website only.

The web chat uses an RSA signature with SHA-256 to encrypt communication. RS256 cryptography is a sophisticated type of RSA encryption. An RSA key pair includes a private and a public key. The RSA private key is used to generate digital signatures, and the RSA public key is used to verify digital signatures.
This private context variable will be available for use by the dialog, but not by anything else.



1. From the web chat configuration page, copy the public key from the IBM provided public key field.
2. From your website, write a function that signs a JSON Web Token.

For example, the following NodeJS code snippet shows a function that accepts a userID and payload content and sends it to the web chat. If a payload is provided, its content is encrypted and signed with the IBM public key.

// Sample NodeJS code on your server.
const jwt = require('jsonwebtoken');
const RSA = require('node-rsa');

const rsaKey = new RSA(process.env.PUBLIC_IBM_RSA_KEY);

/
* Returns a signed JWT. Optionally, also adds an encrypted user_payload.
* The userPayload is stringified JSON.
/
function mockLogin(userID, userPayload) {
const payload = {
sub: userID, // Required
// The exp claim is automatically added by the jsonwebtoken library.
// We recommend you set a short lived exp claim
// with whatever library you are using.
};
if (userPayload) {
// If there is a user payload we encrypt it using the IBM public key.
// Should be encrypted to base64 format.
payload.user_payload = rsaKey.encrypt(userPayload, 'base64');
}
const token = jwt.sign(payload, process.env.YOUR_PRIVATE_RSA_KEY, { algorithm: 'RS256', expiresIn: '10000ms' });
return token;
}
Show more
3. The encrypted user payload is decrypted and then saved to the context.integrations.chat.private.user_payload object.
The inactivity period is 1 hour by default, but you can increase it to up to a maximum of 7 days. This means that if a user stops interacting with the assistant, after 1 hour or whatever time frame you configure, any context variable values that were set during the previous conversation are set to null or back to their default values. For more information, see [Changing the inactivity timeout setting](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-assistant-settings).
6. After testing, you can close the browser tab to exit the public web page.
7. Click Save Changes to save any edits you made to the preview link integration and close the page, or click X to close the page without saving.







 Dialog considerations 

The rich responses that you add to a dialog are displayed in the web-hosted chat widget as expected, with the following exceptions:



* Connect to human agent: This response type is ignored.
* Pause: This response type pauses the assistant's activity in the chat widget. However, activity does not resume after the pause until another response is triggered. Whenever you include a pause response type, add another, different response type, such as text, after it.



See [Rich responses](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-overviewdialog-overview-multimedia) for more information about response types.





 Adding a preview link integration 

If you accidentally deleted the preview link integration that is created automatically for you or want to create another, separate public web page, you can add a preview link integration.



1. From the Assistant tab, click to open the tile for the assistant that you want to deploy.
2. Go to the Integrations section, and then click Add integration.
3. Click the Preview link integration tile.
4. Optionally edit the preview link integration name and description, and then click Create.

A URL is added to the page. Click it to open the preview web page.
"description": "This is the description of the video."
}

The URL specified by the source property can be either of the following:



* The URL of a video file in a standard format such as MPEG or AVI. In the web chat, the linked video will render as an embedded video player.

HLS (.m3u8) and DASH (MPD) streaming videos are not supported.
* The URL of a video hosted on a supported video hosting service. In the web chat, the linked video will render using the embeddable player for the hosting service.

Specify the URL you would use to view the video in your browser (for example, https://www.youtube.com/watch?v=52bpMKVigGU). You do not need to convert the URL to an embeddable form; the web chat will do this automatically.

You can embed videos hosted on the following services:



* [YouTube](https://youtube.com)
* [Facebook](https://facebook.com)
* [Vimeo](https://vimeo.com)
* [Twitch](https://twitch.tv)
* [Streamable](https://streamable.com)
* [Wistia](https://wistia.com)
* [Vidyard](https://vidyard.com)











 Example 

The following example defines a journey that shows users how to dispute a charge, using a combination of text, image, and video responses.

{
"generic": [!
{
"response_type": "user_defined",
"user_defined": {
"card_title": "Let’s dispute a charge",
"card_description": "Follow along with this guided journey to learn how to find and dispute charges.",
"user_defined_type": "IBM_BETA_JOURNEYS_TOUR",
"steps":
{
"response_type": "text",
"text": "Charges are listed on the Transactions page.
The suggestions list is populated with dialog nodes that condition on intents that are related in some way to the matched intent. The intents are ones that the AI model considered to be possible alternatives, but that didn't meet the high confidence threshold that is required for a node to be listed as a disambiguation option. Any dialog node with a node name (or external node name) can be shown as a suggestion, unless its Show node name setting is set to Off.

To customize suggestions, complete the following steps:



1. Open the Suggestions tab.

The Suggestions feature is enabled automatically for new web chat integrations. If it's not enabled, set the Suggestions switch to On.

The Include a connection to support section is displayed where you can configure whether and how to give customers the ability to connect with support.
2. Decide when you want an option to connect with support to be shown in the suggestions list. The choices are:



* Always: Always shows the option to get support in the list of suggestions.
* Never: Never shows the option to get support in the list of suggestions.
* After one failed attempt: Adds the option to the list only if the customer reached a node with an anything_else condition in the previous conversation turn or reaches the same dialog node for a second time in succession.



3. In the Option label field, add a label for the option.

The text in the Option label field has two functions:



* The text is shown in the suggestions list as an option for customers to select.
* When selected by a customer, the text is sent to your assistant as a new message. The label must be able to function as input that your dialog understands and knows how to handle.



By default, the option label Connect with agent is used. If your web chat is integrated with a service desk, this message initiates a conversation transfer, as long as your dialog is designed to handle transfer requests.

If your web chat is not integrated with a service desk, you can change the option label to a message that helps your customers reach whatever form of support you do offer. If you offer a toll-free support line, you might add Get the support line phone number.
Add the skills to your assistant.
5. Bring the assistant to your customers where they are by adding integrations.

Build your own client application as the user interface for the assistant. Or add the built-in web chat integration to your company website.



Read more about these steps by following these links:



* [Assistant overview](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-assistant-add)
* [Creating a dialog skill](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-skill-dialog-add)
* [Intent creation overview](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-intentsintents-described)
* [Dialog overview](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-overview)
* [Entity creation overview](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-entitiesentities-described)
* [Creating a search skill](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-skill-search-add)
* [Adding an integration](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-deploy-integration-add)







 Browser support 

The minimum required browser software for the product user interface includes the following browsers:



* Google Chrome
: Latest version -1 for your operating system
* Mozilla Firefox
: Latest regular -1 and Extended Support Release (ESR) version for your operating system
* Microsoft Edge
: Latest version -1 for Windows
* Apple Safari
: Latest version -1 for Mac



The IBM Cloud Pak for Data web client where you create service instances supports the IBM Cloud Pak for Data requirements.
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 ![More options](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/kebab.png) on the Welcome node, and then select Add node below.
3. Start typing reservation in the If assistant recognizes field, and then select it from the list. This node will be evaluated if the user input matches the reservation intent.
4. Click Customize, set the Slots switch to On, and then click Apply.

![Shows the customize dialog where you turn on slots.](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/slots-toggle-on.png)
5. In the Then check for section, add the following slots:



Slot details

 Check for Save it as If not present, ask 

 @sys-date $date What day would you like to come in? 
 @sys-time $time What time do you want for the reservation? 
 @sys-number $guests How many people will be dining? 



6. In the Assistant responds section, enter the text response OK. I am making you a reservation for $guests on $date at $time.

![Shows what each slot and the response look like in the tool when filled in as specified.]