vania-janet/multiturn-rag-retrieval-data huggingface dataset:
If you deploy your assistant with an integration that has built-in service desk support, you can use the special Connect to human agent response type in your dialog response to initiate a transfer.



 Adding chat transfer support 

Design your dialog so that it can transfer customers to human agents. Consider adding support for initiating a transfer in the following scenarios:



* Any time a user asks to speak to a person.

Create an intent that can recognize when a customer asks to speak to someone. After defining the intent, you can add a root-level dialog node that conditions on the intent. As the dialog node response, add a Connect to human agent response type. At run time, if the user asks to speak to someone, this node is triggered and a transfer is initiated on the user's behalf.
* When the conversation broaches a topic that is sensitive in nature, you can start a transfer.

For example, an insurance company might want questions about bereavement benefits always to be handled by a person. Or, if a customer wants to close an account, you might want to transfer the conversation to a respresentative who is authorized to offer incentives to keep the customer's business.
* When the assistant repeatedly fails to understand a customer's request. Instead of asking the customer to retry or rephrase the question over and over, your assistant can offer to transfer the customer to a human agent.



To design a dialog that can transfer the conversation, complete the following steps:



1. Add an intent to your skill that can recognize a user's request to speak to a human.

You can create your own intent or add the prebuilt intent named General_Connect_to_Agent that is provided with the General content catalog.
2. Add a root node to your dialog that conditions on the intent you created in the previous step. Choose Connect to human agent as the response type.

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).
3. Add meaningful names to the dialog nodes in your dialog.
Expressive neural voices offer natural-sounding speech that is exceptionally clear, crisp, and fluid. The new voices are generally available (GA) for production use. They support the use of both standard International Phonetic Alphabet (IPA) and IBM Symbolic Phonetic Representation (SPR) phonetic symbols. For more information, see



* [Expressive neural voices](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-voiceslanguage-voices-expressive)
* [English (United States) symbols](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-usSymbols)



New speaking styles for expressive neural voices
: 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. But you can embellish the voices' natural tendencies by indicating that all or some of the text is to emphasize one of the following speaking styles:



* Cheerful - Expresses happiness and good news.
* Empathetic - Expresses empathy or sympathy.
* Neutral - Expresses objectivity and evenness.
* Uncertain - Expresses confusion or uncertainty.



For more information, see [Using speaking styles](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-synthesis-expressivesyntheses-expressive-styles).

New interjection emphasis with expressive neural voices
: With expressive neural voices, the service automatically detects a set of common interjections based on context. When it synthesizes these interjections, it gives them the natural emphasis that a human would use in normal conversation. For some of the interjections, you can use SSML to enable or disable their emphasis. For more information, see [Emphasizing interjections](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-synthesis-expressiveemphasizing-interjections).

New word emphais with expressive neural voices
Response modes 

IBM Cloud

You can choose a response mode for each action to set how it behaves. The modes are clarifying and confident.

Clarifying mode: Start here. In the clarifying mode, your assistant is eager to ask questions so you can ensure that your customer gets to the action they need. An assistant is more likely to ask questions to be sure an action matches what a customer is asking. A new or untested action gets the training that it needs.

Confident mode: Take the next step. After you use analytics to improve your assistant, use the confident mode. Your assistant solves customer issues with authority and accuracy. An assistant is less likely to ask questions and is more likely to trigger actions that match. Use confident mode after you test and train actions.

Response modes are a beta feature that is available for evaluation and testing purposes on IBM Cloud only.



 Settings 

Settings for the two modes are in the global settings. For more information, see [Global settings for actions](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-actions-global-settings).

You can choose what mode to use when you create a new action. Clarifying mode is the default and is designed for use with new, untested actions that need training.

The settings are:

Clarify when one action matches: If an assistant prioritizes one action that it thinks matches the customer's request, it can clarify the match by asking the customer to confirm. This clarification helps you ensure that the action is the right one and allows the customer to give input before proceeding. For example, if the assistant thinks that a single action named Pay Bill is the right one, it can clarify the choice by asking the customer Did you mean: Pay Bill.

Clarify when more than one action matches: When your assistant finds that more than one action might fulfill a customer's request, it can automatically ask for clarification. Instead of guessing which action to use, your assistant shows a list of the possible actions to the customer and asks the customer to pick the right one.

Offer support option when asking a clarifying question: The assistant can include a choice to connect to other support.
[Shows the chat bot preview in a fake web page](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/tut-neural-user-trained.png)

Figure 6. Creating a user-trained model
5. Click Apply changes and reprocess.

After some processing occurs, a representation of the document is displayed in the Smart Document Understanding tool. The tool shows you a view of the original document along with a representation of the document, where the text is replaced by blocks. The blocks represent field types.

Initially, the blocks are labeled as text because all of the document content is considered to be standard text by default, and is indexed in the text field.

We want to label all first- and second-level headings as subtitles instead of text.
6. From the thumbnails view, click the thumbnail for the first full-text page from the document to open the first page with real content.

Zoom

![Shows the Smart Document Understanding tool](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/tut-neural-sdu-tool.png)

Figure 7. The Smart Document Understanding tool
7. To annotate the document, click the subtitle label from the Field labels list. Then, click each block in the representation of the PDF page that represents a heading to change its label from text to subtitle.

Zoom

![Shows labeled subtitles in the SDU tool](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/tut-neural-sdu-subtitle.png)

Figure 8. Applying the subtitle label
Tone analytics (Classifications) 

Tone analytics is currently available for English and French languages only, as indicated in the [language support](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-language-support) topic.

Tone analysis is done by using a pre-built classifications model, which provides an easy way to detect language tones in written text. It detects seven tones: sad, frustrated, satisfied, excited, polite, impolite, and sympathetic.



 Analyzing tone 

To detect tone, use the language-specific classifications model ID in your API request.

The language-specific tone model ID is formatted as tone-classifications-xx-v1, where xx is a two-character language code. Languages available include:



 Language Code 

 English en 
 French fr 





* Example parameters.json file:

{
"language": "en",
"text": "This is example text in English.",
"features": {
"classifications": {
"model": "tone-classifications-en-v1"
}
}
}
* Example cURL request:

curl --request POST --header "Content-Type: application/json" --user "apikey":"{apikey}" "{url}/v1/analyze?version=2021-08-01" --data @parameters.json





 Understanding tone analytics 

The model returns scores for the following tones:



 Tone Description 

 excited Showing personal enthusiasm and interest 
 frustrated Feeling annoyed and irritable 
 impolite Being disrespectful and rude 
 polite Displaying rational, goal-oriented behavior 
 sad An unpleasant passive emotion 
 satisfied An affective response to perceived service quality 
 sympathetic An affective mode of understanding that involves emotional resonance 





* Example response:

{
"usage": {
"text_units": 1,
"text_characters": 60,
"features": 1
},
"language": "en",
"classifications": [
{
"confidence": 0.564849,
> awardedTo" relation between "Noble Prize in Physics" and "Albert Einstein
> timeOf" relation between "1921" and "awarded





 Semantic Roles 

Parse sentences into subject-action-object form, and identify entities and keywords that are subjects or objects of an action. For example:

Input

> text: "In 2011, Watson competed on Jeopardy!"

Response

> Subject: Watson
> Action: competed
> Object: on Jeopardy





 Sentiment 

Analyze the sentiment toward specific target phrases and the sentiment of the document as a whole. You can also get sentiment information for detected entities and keywords by enabling the sentiment option for those features. For example:

Input

> text: "Thank you and have a nice day!"

Response

> Positive sentiment (score: 0.91)





 Syntax 

Identify the sentences and tokens in your text. For example:

Input

> text: "I love apples! I do not like oranges."

Response



 Sentence Location 

 I love apples! [0, 14] 
 I do not like oranges. [15,37] 





 Token Lemma Part of Speech Location 

 I I PRON [0, 1] 
 love love VERB [2, 6] 
 apples apple NOUN [7, 13] 
 ! PUNCT [13, 14] 
 I I PRON [15, 16] 
 do do AUX [17, 19] 
 not not PART [20, 23] 
 like like VERB [24, 28] 
 oranges orange NOUN [29, 36] 
 . NOUN [36, 37] 







 Summarization (Experimental) 

Summarization is an experimental feature, and is not intended for use in production deployments. The details of the API, or the behavior of the underlying algorithm, may change with little notice.

In this Experimental release, Summarization is supported for English only.

In this Experimental release, Summarization is supported only for instances hosted in the Dallas region/US-South data center.

Return a summary of input source content.
* [Upload an advanced rules model to Natural Language Understanding](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizingadvanced-rules)







 13 November 2019 

New South Korea location
: You can now create Natural Language Understanding instances in the Seoul location. As with other locations, the IBM Cloud Seoul location uses token-based Identity and Access Management (IAM) authentication.







 10 October 2019 

Improved Sentiment response times
: Improved response times for Japanese and Korean sentiment requests.





 September 2019 



 17 September 2019 

Added Keyword and Sentiment support for Dutch and Chinese (Simplified)
: Added support for Dutch keywords and sentiment. Added support for Chinese (Simplified) keywords and sentiment.





 5 September 2019 

Improved Sentiment support for Spanish and Portuguese
: Improved accuracy for Spanish and Portuguese sentiment. Improved response times for Portuguese sentiment requests.







 29 August 2019 

Improved Sentiment support for English
: Improved accuracy for English sentiment.





 12 July 2019 

The following changes are activated when you use the version date 2019-07-12 or later.
: New English entities model with improved accuracy.
: Confidence scores are returned in English entities results.





 June 2019 



 21 June 2019 

Confidence score returned for entities
: Entity confidence score is now returned for entities requests that use custom machine learning models.





 4 June 2019 

The following changes are activated when you use the version date 2019-06-04 or later.
: Fixed a bug that caused entities requests with custom models to ignore the limit option.
: The default limit value for all entities requests is now 50 for all models.
: The maximum limit value of 250 entities has been removed.







 May 2019 



 29 May 2019 

Sentiment improved for Spanish
: Improved Spanish sentiment.

Bug fix for special characters
: Fixed a bug that may have affected targeted sentiment results if the target contained special characters.

Service instance changes
: The following changes are enabled for service instances in Washington DC, Tokyo, London, and Sydney:



* Sentiment option for entities requests that use custom models is enabled for all sentiment-supported languages except Arabic and Russian.







 24 May 2019 

Keywords improved for German
The emotion enrichment evaluates the overall emotional tone (for example anger) of entire document or specified target strings in the entire document. This enrichment can only be used with English content.



* "document" : booleanoptional - When true the emotional tone of the entire document is evaluated.
* "targets" : arrayoptional - A comma-separated array of target strings of which to evaluate the emotional state within the document.







 entities 

The entities enrichment extracts instances of known entities such as people, places, and organizations. Optionally, a Knowledge Studio custom model can be specified to extract custom entities.



* "sentiment" : boolean - optional - When true, sentiment analysis is performed on the extracted entity in the context of the surrounding content.
* "emotion" : boolean - optional - When true, emotional tone analysis is performed on the extracted entity in the context of the surrounding content.
* "limit" : INT - optional - The maximum number of entities to extract from the ingested document. The default is 50.
* "mentions": boolean - optional - When true, the number of times that this entity is mentioned is recorded. The default is false.
* "mention_types": boolean - optional - When true, the mention type for each mention of this entity is stored. The default is false.
* "sentence_location": boolean - optional - When true, the sentence location of each entity mention is stored. The default is false.
* "model" : string - optional - When specified, the custom model is used to extract entities instead of the public model. This option requires a Knowledge Studio custom model to be associated with your instance of Discovery. See [Integrating with Watson Knowledge Studio](https://cloud.ibm.com/docs/discovery?topic=discovery-integrating-with-wks) for more information.







 keywords 

The keywords enrichment extracts instances of significant words within the text. To understand the difference between keywords, concepts, and entities, see [Understanding the difference between Entities, Concepts, and Keywords](https://cloud.ibm.com/docs/discovery?topic=discovery-configserviceudbeck).
Because the backend app uses a wildcard search, it should find the sample event with the name Think 2022 and return the details (see screen capture below).



Zoom

![chat preview showing event details](https://cloud.ibm.com/docs-content/v1/content/f84e2238288b7f0355715a4c355609ce7ac48fb0/solution-tutorials/images/solution19/Slackbot_debug_preview.png)

preview showing event details

You can click Inspect to see details on how the custom extension is utilized. You can check input and output variables and how the API function of the extension is invoked.





 Step 5: Action to gather data and insert a new record 

Similar to retrieving a record it is possible to gather input about an event and add that data via the custom extension.



1. Switch to Actions and Created by you. Click New action.
2. Click on the Start from scratch tile.
3. In the New action dialog, enter add new event and Save.
4. Use How do you want to name the event? for Assistant says. The customer responds with Free text again.
5. Add a New step and have the Assistant say Where is the event?. Again, the customer may respond with Free text.
6. Add another step and ask When does the event begin?, but use Date for Define customer response.
7. Repeat the same but with When does the event end?.
8. Last, in a new step, ask What is the URL (web address) for the event? and let the customer respond with Free text.
9. Now, to confirm the input, create a new step. Use Is this correct? and as bulleted list show the gathered data. Add an item for Name, Location, Begin, End, and Contact and use Action variables relating to the input steps for the data (see screen capture below). Use Confirmation as customer response type.

Zoom

!
Summarization (Experimental) 

Summarization is an experimental feature, and is not intended for use in production deployments. The details of the API, or the behavior of the underlying algorithm, may change with little notice.

In this Experimental release, Summarization is supported for English only.

In this Experimental release, Summarization is supported only for instances hosted in the Dallas region/US-South data center.

Return a summary of input source content. The summarization feature analyzes sets of sentences from a summarized document, and then chooses the set of sentences that best combines 3 objectives:



* Sentences that are the most similar to many other sentences in the document
* Sentences that cover the most frequent words in the document
* The set of sentences that are the least distant from the beginning of the document



See additional information in the [API reference](https://cloud.ibm.com/apidocs/natural-language-understandingsummarization). For example:

Input

> url: "[https://www.ibm.com/cloud/watson-natural-language-understanding](https://www.ibm.com/cloud/watson-natural-language-understanding)

Response

> Watson Natural Language Understanding is a cloud native product that uses deep learning to extract metadata from text such as entities, keywords, categories, sentiment, emotion, relations, and syntax. Get underneath the topics mentioned in your data by using text analysis to extract keywords, concepts, categories and more. Train Watson to understand the language of your business and extract customized insights with Watson Knowledge Studio.







 Supported languages 

See the [Language support documentation](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-language-support) for details about supported languages in Natural Language Understanding.
Partial match (Beta - English only)
: Fuzzy matching will now automatically suggest substring-based synonyms present in user-defined entities, and assign a lower confidence score as compared to the exact entity match. See [Fuzzy matching](https://cloud.ibm.com/docs/assistant?topic=assistant-entitiesentities-fuzzy-matching) for details.





 28 July 2017 

Updates
: This release includes the following updates:



* When you set bidirectional preferences for the tooling, you can now specify the graphical user interface direction.
* The color scheme of the tooling was updated to be consistent with other Watson services and products.







 19 July 2017 

REST API now supports access to dialog nodes
: The Watson Assistant REST API now supports access to dialog nodes. For more information, see the [API Reference](https://cloud.ibm.com/apidocs/assistant/assistant-v1?curl=listdialognodes).





 14 July 2017 

Slots enhancement
: The slots functionality of dialogs was enhanced. For example, a slot_in_focus property was added that you can use to define a condition that applies to a single slot only. See [Gathering information with slots](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-slots) for details.





 12 July 2017 

Support for Czech
: Czech language support has been introduced; please see the [Supported languages](https://cloud.ibm.com/docs/assistant?topic=assistant-language-support) topic for additional details.





 11 July 2017 

Test in Slack
: You can use the new Test in Slack tool to quickly deploy your workspace as a Slack bot user for testing purposes. This tool is available only for the IBM Cloud US South region.

Updates to Arabic
: Arabic language support has been enhanced to include absolute scoring per intent, and the ability to mark intents as irrelevant; please see the [Supported languages](https://cloud.ibm.com/docs/assistant?topic=assistant-language-support) topic for additional details.
"error": "not found"
}







 11 March 2020 

Enhanced sentiment analysis for English
: Enhanced English sentiment analysis to better identify and understand idioms in text.







 December 2019 



 12 December 2019 

Full support for IBM Cloud IAM
: Natural Language Understanding now supports the full implementation of IBM Cloud Identity and Access Management (IAM). API keys for Watson services are no longer limited to a single service instance. You can create access policies and API keys that apply to more than one service, and you can grant access between services.

To support this change, the API service endpoints use a different domain and include the service instance ID.



* The pattern is api.{location}.{offering}.watson.cloud.ibm.com/instances/{instance_id}.
* Example URL for an instance hosted in the Dallas location: api.us-south.natural-language-understanding.watson.cloud.ibm.com/instances/6bbda3b3-d572-45e1-8c54-22d6ed9e52c2
* The previous public endpoint domain was watsonplatform.net.



For more information about the URLs, see the [API reference](https://cloud.ibm.com/apidocs/natural-language-understanding/natural-language-understandingservice-endpoint).

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 about IAM, see [Authenticating to Watson services](https://cloud.ibm.com/docs/watson?topic=watson-iam).

New network and data security features
: Support for data encryption with customer-managed keys Users of new premium and dedicated instances can integrate IBM® Key Protect for IBM Cloud® with Natural Language Understanding to encrypt their data and manage encryption keys. For more information, see [Protecting sensitive information in your Watson service](https://cloud.ibm.com/docs/watson?topic=watson-keyservice).