vania-janet/multiturn-rag-retrieval-data huggingface dataset:
Modifying speech synthesis with expressive neural voices 

The expressive neural voices that are available with the IBM Watson® Text to Speech service offer some additional features that are not available with other types of voices: using speaking styles, emphasizing interjections, and emphasizing words. These features are available for both the HTTP and WebSocket interfaces.

The features involve the use of elements of the Speech Synthesis Markup Language (SSML). The descriptions of the features provide information about how they interact with related SSML elements and attributes.



 Using speaking styles 

The expressive neural voices determine the sentiment of the text from the context of its words and phrases. The speech that they produce, in addition to having a very conversational style, reflects the mood of the text. The expressive voices naturally express gratitude, thankfulness, happiness, empathy, confusion, and other sentiments by default, with no explicit additional tagging.

However, you can embellish the voices' natural tendencies by using the <express-as> element with the required style attribute to indicate that all or some of the text is to emphasize specific characteristics. These characteristics are referred to as speaking styles:



* cheerful - Expresses happiness and good news. The style is upbeat, welcoming, and conveys a positive message.
* empathetic - Expresses empathy and compassion. The style has sympathetic undertones, but it is not excessively sorrowful.
* neutral - Expresses objectivity and evenness. The style strives for less emotion, and instead conveys a more even and instructional tone.
* uncertain - Expresses uncertainty and confusion. The style conveys the feeling of being unsure or in doubt.



In many cases, the effect of the styles is very subtle. In such cases, the differences might not be readily discernible from the default expressive tone. But there are instances where the style can audibly enhance the voices' inherent ability to detect and express emotion. The differences are often detectable only on certain words and phrases.

Table 1 provides examples of each available style for the <express-as> element. To demonstrate the effect of the styles, the table provides two samples for each example. The first sample speaks the text with the default en-US_EmmaExpressive voice.
For more information about access roles and how to request an access role change, see [Managing access to resources](https://cloud.ibm.com/docs/assistant?topic=assistant-access-control).
* Where can I find an example for creating my first assistant?

Follow the steps in the [Getting started with Watson Assistant](https://cloud.ibm.com/docs/assistant?topic=assistant-getting-started) tutorial for a product introduction and to get help creating your first assistant.
* Can I export the user conversations from the Analytics page?

You cannot directly export conversations from the User conversation page. You can, however, use the /logs API to list events from the transcripts of conversations that occurred between your users and your assistant. For more information, see the [API reference](https://cloud.ibm.com/apidocs/assistant/assistant-v1listlogs) and the [Filter query reference](https://cloud.ibm.com/docs/assistant?topic=assistant-filter-reference). Or, you can use a Python script to export logs. For more information, see [export_logs_py](https://github.com/watson-developer-cloud/community/blob/master/watson-assistant/export_logs_py.py).
* Can I export and import dialog nodes?

No, you cannot export and import dialog nodes from the product user interface.

If you want to copy dialog nodes from one skill into another skill, follow these steps:



1. Download as JSON files both the dialog skill that you want to copy the dialog nodes from and the dialog skill that you want to copy the nodes to.
2. In a text editor, open the JSON file for the dialog skill that you want to copy the dialog nodes from.
3. Find the dialog_nodes array, and copy it.
4. In a text editor, open the JSON file for the dialog skill that you want to copy the dialog nodes to, and then paste the dialog_nodes array into it.
5.
"response_type": "option",
"title": "Available options",
"description": "Please select one of the following options:",
"preference": "button",
"options":
{
"label": "Option 1",
"value": {
"input": {
"text": "option 1"
}
}
},
{
"label": "Option 2",
"value": {
"input": {
"text": "option 2"
}
}
}
]
}
]
},
"user_id": "faf4a112-f09f-4a95-a0be-43c496e6ac9a"
}
Show more

Your app can display the specified options using any suitable user-interface control (for example, a set of buttons or a drop-down list). The optional preference property indicates the preferred type of control your app should use (button or dropdown), if supported. For the best user experience, a good practice is to present three or fewer options as buttons, and more than three options as a drop-down list.

For each option, the label property specifies the label text that should appear for the option in the UI control. The value property specifies the input that should be sent back to the assistant (using the /message API) when the user selects the corresponding option.

For an example of implementing option responses in a simple client application, see [Example: Implementing option responses](https://cloud.ibm.com/docs/assistant?topic=assistant-api-dialog-responsesapi-dialog-option-example).





 Suggestion 

This feature is available only to users with a paid plan.

The suggestion response type is used by the disambiguation feature to suggest possible matches when it isn't clear what the user wants to do. A suggestion response includes an array of suggestions, each one corresponding to a possible matching dialog node:

{
"output": {
"generic": [
{
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![More icon](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/kabob.png) icon, select Move, and then click the folder. Select To folder as the move-to target.

As you move nodes, they are added at the start of the tree within the folder. Therefore, if you want to retain the order of a set of consecutive root dialog nodes, for example, move them starting with the last node first.
* To add a new dialog node to the folder, click the More![More icon](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/kabob.png) icon on the folder, and then select Add node to folder.

The dialog node is added to the end of the dialog tree within the folder.









 Deleting a folder 

You can delete either a folder alone or the folder and all of the dialog nodes in it.

To delete a folder, complete the following steps:



1. From the tree view of the Dialog tab, find the folder that you want to delete.
2. Click the More!
Especially, if the child nodes only address possible follow-up questions from the user and can safely be ignored.

However, if the node relies on its child nodes to address the question, then you might want to force the conversation to return and continue processing the nodes in the current branch. For example, the initial response might be, We offer cupcakes in all shapes and sizes. Which menu do you want to see: gluten-free, dairy-free, or regular? If the user changes subjects at this point, you might want the dialog to return so the user can pick a menu type and get the information they wanted.
* Nodes with slots: Choose whether you want to allow users to digress away from the node before all of the slots are filled. Set the Allow digressions away while slot filling switch to Yes to enable digressions away.

If enabled, when the conversation returns from the digression, the prompt for the next unfilled slot is displayed to encourage the user to continue providing information. If disabled, then any inputs that the user submits which do not contain a value that can fill a slot are ignored. However, you can address unsolicited questions that you anticipate your users might ask while they interact with the node by defining slot handlers. See Adding slots]]
Shows the digressions away settings from a node with slots.Shows the digressions away settings from a node with slots_.]!! for more information.

The following image shows you how digressions away from the #reservation node with slots (shown in the earlier illustration) are configured.

!] * Nodes with slots: Choose whether the user is only allowed to digress away if they will return to the current node by selecting the Only digress from slots to nodes that allow returns checkbox.

When selected, as the dialog looks for a node to answer the user's unrelated question, it ignores any root nodes that are not configured to return after the digression. Select this checkbox if you want to prevent users from being able to permanently leave the node before they have finished filling the required slots.

<-- </ul> -->

Digressions into this node
To instruct your assistant to jump to a different node after this conditional response is processed, select Jump to from the And finally section of the response edit view. Identify the node that you want your assistant to process next. See [Configuring the Jump to action](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overviewdialog-overview-jump-to-config) for more information.

A Jump to action that is configured for the node is not processed until all of the conditional responses are processed. Therefore, if a conditional response is configured to jump to another node, and the conditional response is triggered, then the jump configured for the node is never processed, and so does not occur.



3. Click Add response to add another conditional response.



The conditions within a node are evaluated in order, just as nodes are. Be sure that your conditional responses are listed in the correct order. If you need to change the order, select a condition and response pair and move it up or down in the list using the arrows that are displayed.







 Defining what to do next 

After making the specified response, you can instruct your assistant to do one of the following things:



* Wait for user input: Your assistant waits for the user to provide new input that the response elicits. For example, the response might ask the user a yes or no question. The dialog will not progress until the user provides more input.
* Skip user input: Use this option when you want to bypass waiting for user input and go directly to the first child node of the current node instead.

The current node must have at least one child node for this option to be available.
* Jump to another dialog node: Use this option when you want the conversation to go directly to an entirely different dialog node. You can use a Jump to action to route the flow to a common dialog node from multiple locations in the tree, for example.

The target node that you want to jump to must exist before you can configure the jump to action to use it.





 Configuring the Jump to action 

If you choose to jump to another node, specify when the target node is processed by choosing one of the following options:
Defining responses using the JSON editor 

In some situations, you might need to define responses using the JSON editor. (For more information about dialog responses, see [Responses](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-overviewdialog-overview-responses)). Editing the response JSON gives you direct access to the data that will be returned to the communication channel or custom application.



 Generic JSON format 

The generic JSON format for responses is used to specify responses that are intended for any messaging channel. This format can be implemented by a custom client application. (This is the format that is used by default for dialog responses defined using the Watson Assistant user interface.)

For information about how to open the JSON editor for a dialog node response from the tool, see [Context variables in the JSON editor](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-runtime-contextdialog-runtime-context-var-json).

To specify an interactive response in the generic JSON format, insert the appropriate JSON objects into the output.generic field of the dialog node response. The following example shows how you might send a response containing multiple response types (text, an image, and clickable options):

{
"output": {
"generic":[
{
"response_type": "text",
"values":
{
"text": "Here are your nearest stores."
}
]
},
{
"response_type": "image",
"source": "http://example.com/image.jpg",
"title": "Example image",
"description": "Some description for the image."
},
{
"response_type": "option",
"title": "Click on one of the following",
"options":
{
"label": "Location 1",
"value": {
"input": {
The only way to distinguish a copied child node from an original child node is the copy reference in the parent node name.



1. On the node you want to copy, click the More![More icon](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/kabob.png) icon, and then select Duplicate.
2. Consider renaming the copied nodes or editing their conditions to make them distinct.







 Moving a dialog node 

Each node that you create can be moved elsewhere in the dialog tree.

You might want to move a previously created node to another area of the flow to change the conversation. You can move nodes to become siblings or peers in another branch.



1. On the node you want to move, click the More![More icon](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/kabob.png) icon, and then select Move.
2. Select a target node that is located in the tree near where you want to move this node. Choose whether to place this node before or after the target node, or to make it a child of the target node.







 Organizing the dialog with folders 

You can group dialog nodes together by adding them to a folder. There are lots of reasons to group nodes, including:



* To keep nodes that address a similar subject together to make them easier to find. For example, you might group nodes that address questions about user accounts in a User account folder and nodes that handle payment-related queries in a Payment folder.
* To group together a set of nodes that you want the dialog to process only if a certain condition is met. Use a condition, such as $isPlatinumMember, for example, to group together nodes that offer extra services that should only be processed if the current user is entitled to receive the extra services.
* [Facebook Messenger](https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-facebook)
* [Slack](https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-slack)
* [Phone](https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-phone)
* [SMS with Twilio](https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-sms)
* [WhatsApp with Twilio](https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-whatsapp)
* [Custom application](https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-custom-app)



Built-in service desk integrations:



* [Intercom](https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-intercom)
* [Web chat with Salesforce support](https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-salesforce)
* [Web chat with Zendesk support](https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-zendesk)



Web chat service desk reference implementations:



* [Genesys Cloud](https://github.com/watson-developer-cloud/assistant-web-chat-service-desk-starter/tree/main/src/genesys/webChat)
* [NICE inContact](https://github.com/watson-developer-cloud/assistant-web-chat-service-desk-starter/tree/main/src/incontact/webChat)
* [Twilio Flex](https://github.com/watson-developer-cloud/assistant-web-chat-service-desk-starter/tree/main/src/flex/webChat)
These URLs do not introduce a breaking change. The new URLs work both for your existing service instances and for new instances. The original URLs continue to work on your existing service instances for at least one year (until December 2020).
* For more information, see [Authenticating to Watson services](https://cloud.ibm.com/docs/watson?topic=watson-iam).







 26 November 2019 

Disambiguation is available to everyone
: Disambiguation is now available to users of every plan type.

The following changes were made to how it functions:



* The text that you add to the dialog node name field now matters.
* The text in the node name field might be shown to customers. The disambiguation feature shows it to customers if the assistant needs to ask them to clarify their meaning. The text you add as the node name must identify the purpose of the node clearly and succinctly, such as Place an order or Get plan information.

If the External node name field exists and contains a summary of the node's purpose, then its summary is shown in the disambiguation list instead. Otherwise, the dialog node name content is shown.



* Disambiguation is enabled automatically for all nodes. You can disable it for the entire dialog or for individual dialog nodes.
* When testing, you might notice that the order of the options in the disambiguation list changes from one test run to the next. Don't worry; this new behavior is intended. As part of work being done to help the assistant learn automatically from user choices, the order of the options in the disambiguation list is being randomized on purpose. Changing the order helps to avoid bias that can be introduced by a percentage of people who always pick the first option without first reviewing their choices.









 12 November 2019 

Slot prompt JSON editor
: You can now use the context or JSON editors for the slot response field where you define the question that your assistant asks to get information it needs from the customer.
For more information about using the JSON editor to add responses, see [Defining responses using the JSON editor](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-responses-json).





 Applying advanced settings to the Speech to Text service 

Use the speech_to_text response type to send configuration commands to the Speech to Text service instance used by the phone integration. By sending a speech_to_text response from a dialog node or action step, you can dynamically change the Speech to Text configuration during a conversation.

By default, any Speech to Text configuration changes you make persist for the remainder of the conversation, or until you update them again. You can change this behavior by specifying the update_strategy property of the parameters object.

The format of the speech_to_text response type is as follows:

{
"output": {
"generic": [
{
"response_type": "speech_to_text",
"command_info": {
"type": "<command type>",
"parameters": {
"parameter name1": "parameter value",
"parameter name2": "parameter value"
}
}
}
]
}
}
Show more

Each command type along with its related parameters are described in the following sections.



 command_info.type : configure 

Dynamically reconfigures the Speech to Text service by applying a set of configuration parameters, which can be based on the dialog or action flow. For example, you might want to choose a particular customization ID or grammar at a specific point in the conversation.



 parameter description required default 

 narrowband_recognize The Speech to Text service configuration to use for narrowband codecs (such as PCMU and PCMA, which are sampled at 8 kHz). The parameters defined by this object are used when connecting to the Speech to Text service for speech recognition requests. For more information about these parameters, see the [Speech to Text API documentation](https://cloud.ibm.com/apidocs/speech-to-textWSRecognizeMethod).
Some rich responses that you add to a dialog are displayed differently within the "Try it out" pane from how they are displayed to Intercom users. The following table describes how the response types are treated by Intercom.



 Response type How displayed to Intercom users 

 Option The options are displayed as a numbered list. In the title or description field, provide instructions that explain to the user how to choose an option from the list. 
 Image The image title, description, and the image itself are rendered. 
 Pause Whether or not you enable it, a typing indicator is not displayed during the pause. 



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







 Adding an Intercom integration 



1. From the Assistants page, click to open the assistant tile that you want to deploy.
2. From the Integrations section, click Add integration.
3. Click Intercom.

Follow the instructions that are provided on the screen. The following sections help you with the steps.







 Connecting the assistant to Intercom 

As soon as you give Intercom permission to use the assistant, the assistant becomes a viable member of the Intercom team.

Human agents can assign messages to the assistant by using Intercom's assignment rules. Messages can be assigned to the assistant in the following ways:



* Automatic assignment of inbound conversations to a teammate or team inbox based on some criteria
* Manual reassignment made by a human agent at run time.



See the [Intercom documentation](https://www.intercom.com/help/en/articles/199-assign-conversations-to-teammates-and-teams) for more details.



1. When your dialog is ready, click Connect now.
2. Click Access Intercom to be redirected to the Intercom site.

Log in to Intercom using the assistant's functional email address and password, not your own. You want to establish the connection to a functional ID that is shared by more than one person in your organization.
3. Click Authorize access.
4. Click Back to overview.
Oh, I was asking what can I do
for you today." : "What can I do for you today, " +
context["username"] + "?" ?>

For full SpEL expression syntax details, see [Expression for accessing objects](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-expression-languageexpression-language-shorthand-syntax).
* Preventing returns: In some cases, you might want to prevent a return to the interrupted conversation flow based on a choice the user makes in the current dialog flow. You can use special syntax to prevent a return from a specific node.

For example, you might have a node that conditions on General_Connect_To_Agent or a similar intent. When triggered, if you want to get the user's confirmation before you transfer them to an external service, you might add a response such as, Do you want me to transfer you to an agent now? You could then add two child nodes that condition on yes and no respectively.

The best way to manage digressions for this type of branch is to set the root node to allow digression returns. However, on the yes node, include the SpEL expression <? clearDialogStack() ?> in the response. For example:

OK. I will transfer you now. <? clearDialogStack() ?>

This SpEL expression prevents the digression return from happening from this node. When a confirmation is requested, if the user says yes, the proper response is displayed, and the dialog flow that was interrupted is not resumed. If the user says no, then the user is returned to the flow that was interrupted.







 Disabling digressions into a root node 

When a flow digresses into a root node, it follows the course of the dialog that is configured for that node. So, it might process a series of child nodes before it reaches the end of the node branch, and then, if configured to do so, goes back to the dialog flow that was interrupted.