vania-janet/multiturn-rag-retrieval-data huggingface dataset:
Use the syntax, intent_name. For example, weather checks if the user input is asking for a weather forecast. If so, the node with the weather intent condition is processed.

For more information about intents, see [Defining intents](https://cloud.ibm.com/docs/assistant?topic=assistant-intents).
* Special condition: Conditions that are provided with the product that you can use to perform common dialog functions. See the Special conditions table in the next section for details.







 Special conditions 



Special conditions

 Condition syntax Description 

 anything_else You can use this condition at the end of a dialog, to be processed when the user input does not match any other dialog nodes. The Anything else node is triggered by this condition. If you add a search skill to your assistant, a root node with this condition can be configured to trigger a search. 
 conversation_start Like welcome, this condition is evaluated as true during the first dialog turn. Unlike welcome, it is true whether or not the initial request from the application contains user input. 
 false This condition is always evaluated to false. You might use this at the start of a branch that is under development, to prevent it from being used, or as the condition for a node that provides a common function and is used only as the target of a Jump to action. 
 irrelevant This condition will evaluate to true if the user’s input is determined to be irrelevant by the Watson Assistant service. 
 true This condition is always evaluated to true. You can use it at the end of a list of nodes or responses to catch any responses that did not match any of the previous conditions. 
 welcome This condition is evaluated as true during the first dialog turn (when the conversation starts), only if the initial request from the application does not contain any user input. It is evaluated as false in all subsequent dialog turns. The Welcome node is triggered by this condition. Typically, a node with this condition is used to greet the user, for example, to display a message such as Welcome to our Pizza ordering app. This node is never processed during interactions that occur through channels such as Facebook or Slack. 







 Condition syntax details 

Use one of these syntax options to create valid expressions in conditions:
conversation.counterexample.update edits a counterexample. 
 conversation.data.update does a bulk action, such as importing a CSV file of intents or entities to the skill, or deleting multiple training data items, such as multiple entities or intents. 
 conversation.entity.create creates an entity. 
 conversation.entity.delete deletes an entity. 
 conversation.entity.update edits an entity. 
 conversation.example.create adds a user input example to an intent. 
 conversation.example.delete deletes a user example from an intent. 
 conversation.example.update edits a user example that is associated with an intent. 
 conversation.intent.create creates an intent. 
 conversation.intent.delete deletes an intent. 
 conversation.intent.update edits an intent. 
 conversation.log.create corrects an intent that was inaccurately categorized by the skill from the Analytics>User conversations page. 
 conversation.node.create creates a dialog node. 
 conversation.node.delete deletes a dialog node. 
 conversation.node.update edits a dialog node. 
 conversation.skill.create creates a skill, either dialog or search. 
 conversation.skill.delete deletes a skill. 
 conversation.skill.update updates a skill. 
 conversation.skill_reference.create adds a specific skill to an assistant. 
 conversation.skill_reference.delete removes a specific skill from an assistant. 
 conversation.skill_reference.update updates a specific skill that is associated with an assistant. 
 conversation.snapshot.create creates a version of a dialog skill. 
 conversation.snapshot.delete deletes a version of a dialog skill. 
 conversation.synonym.create creates a synonym for an entity value. 
 conversation.synonym.delete deletes a synonym that is associated with an entity value. 
 conversation.synonym.update edits a synonym that is associated with an entity value. 
 conversation.userdata.delete deletes data that was created by a specified customer. 
 conversation.value.create creates an entity value. 
 conversation.value.delete deletes an entity value. 
 conversation.value.update edits an entity value.
[Screen capture of correcting a recognized intent](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/correct_intent.png)
4. If the input is unrelated to any of the intents in your application, you can teach your assistant that by selecting the displayed intent, and then clicking Mark as irrelevant.

![Mark as irrelevant screen capture](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/irrelevant.png)

For more information about this action, see [Teaching your assistant about topics to ignore](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-logslogs-mark-irrelevant).



If your intents are not being correctly recognized, consider making the following kinds of changes:



* Add the unrecognized text as an example to the correct intent.
* Move existing examples from one intent to another.
* Consider whether your intents are too similar, and redefine them as appropriate.







 Absolute scoring 

The Watson Assistant service scores each intent’s confidence independently, not in relation to other intents. This approach adds flexibility; multiple intents can be detected in a single user input. It also means that the system might not return an intent at all. If the top intent has a low confidence score (less than 0.2), the top intent is included in the intents array that is returned by the API, but any nodes that condition on the intent are not triggered. If you want to detect the case when no intents with good confidence scores were detected, use the irrelevant special condition in your dialog node. See [Special conditions](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-overviewdialog-overview-special-conditions) for more information.
"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. Click your profile photo in the top right corner of your screen, and then click Transactions from the menu."
},
{
"response_type": "text",
"text": "Here you can view your charges.n Scroll through the Transactions page and review your charges. Each charge contains a merchant name, transaction date, and amount charged."
},
{
"response_type": "image",
"source": "https://example.com/image.png",
"alt_text": "Image showing location of Dispute option",
"description": "The option to Dispute is marked in red on the right hand side of each row in the Transactions table. Just click here to file a dispute."
},
{
"response_type": "video",
"source": "https://vimeo.com/769580398",
"description": "Watch this short video to learn what to expect now that you’ve filed a dispute."
}
]
}
}
]
}
Show more





 Starting a journey without opening the web chat 

Although journeys are part of the web chat integration, you can make it possible for your customers to start a journey directly from your website without opening the web chat window at all. For example, you might want to include a Show me button on your website that customers can click to launch an interactive tour of the page.

To start a journey without opening the web chat:



1. In the action that sends the journey response, edit the JSON that defines the journey. Include "skip_card": true to bypass the introductory card.
2.
Annotation-based entites are those for which you annotate occurrences of the entity in sample sentences to teach your assistant about the context in which the entity is typically used.

In order to train a contextual entity model, you can take advantage of your intent examples, which provide readily-available sentences to annotate.

This feature is generally available in English-language dialog skills and is available as a beta feature in French-langage dialog skills. For more information about language support, see [Supported languages](https://cloud.ibm.com/docs/assistant?topic=assistant-language-support).

Using an intent's user examples to define contextual entities does not affect the classification of that intent. However, entity mentions that you label are also added to that entity as synonyms. And intent classification does use synonym mentions in intent user examples to establish a weak reference between an intent and an entity.



1. From your dialog skill, click the Intents tab.
2. Click an intent to open it.

For this example, the intent buy_supplies defines the order function for an online retailer.

![Select the #buy_supplies intent](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/oe-intent.png)
3. Click Annotate entities, and then review the intent examples for potential entity mentions.

![Shows the Annotate entities toggle](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/oe-annotate.png)
4. Click any word, words, or punctuation that is part of a single entity mention from the intent examples.

In this example, mobile phones is the entity mention.

!
How actions are different from dialog 

If you are already familiar with dialog-based conversations, learn more about how actions compares.



Conversational flow skill feature support
This table has row and column headers. The row headers identify features. The column headers identify the different skill types. To understand which features are supported by a skill, go to the row that describes the feature, and find the columns for the skill you are interested in.

 Feature Actions Dialog 

 Automatic reset of context ![checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) 
 Keep track of context ![checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) ![checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) 
 Collect info, as with slots ![checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) ![checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) 
 Contextual entities ![checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) 
 Collect numbers (@sys-number detection) ![checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) ![checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) 
 Detection of other system entities ![checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) 
 Connect to agent response type !
* [Usage notes for customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-usage)
* Language model customization



* [Creating a custom language model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageCreate)
* [Using a custom language model for speech recognition](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageUse)
* [Working with corpora and custom words for previous-generation models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords)
* [Working with corpora and custom words for next-generation models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords-ng)
* [Managing custom language models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageLanguageModels)
* [Managing corpora](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageCorpora)
* [Managing custom words](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageWords)



* Acoustic model customization



* [Creating a custom acoustic model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-acoustic)
* [Using a custom acoustic model for speech recognition](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-acousticUse)
* [Using custom acoustic and custom language models together](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-useBoth)
For more information, see [Speech detector sensitivity](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detectiondetection-parameters-sensitivity).



Table 25. The speech_detector_sensitivity parameter

 Availability and usage Description 

 Previous-generation models Generally available for all language models except for ar-MS_BroadbandModel, pt-BR_BroadbandModel, zh-CN_BroadbandModel, zh-CN_NarrowbandModel, and de-DE_BroadbandModel. 
 Next-generation models Generally available for all languages. 
 WebSocket Parameter of JSON start message 
 Synchronous HTTP Query parameter of POST /v1/recognize method 
 Asynchronous HTTP Query parameter of POST /v1/recognitions method 







 split_transcript_at_phrase_end 

An optional boolean that indicates whether the service splits a transcript into multiple final results based on semantic features of the input such as sentences. The service bases its understanding of semantic features on the base language model, which can be further influenced by custom language models and grammars. By default (false), the service produces no semantic splits. For more information, see [Split transcript at phrase end](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-parsingsplit-transcript).



Table 26. The split_transcript_at_phrase_end parameter

 Availability and usage Description 

 Previous-generation models Generally available for all languages. 
 Next-generation models Generally available for all languages. 
 WebSocket Parameter of JSON start message 
 Synchronous HTTP Query parameter of POST /v1/recognize method 
 Asynchronous HTTP Query parameter of POST /v1/recognitions method 







 timestamps 

An optional boolean that indicates whether the service produces timestamps for the words of the transcript. By default (false), timestamps are not returned. For more information, see [Word timestamps](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-metadataword-timestamps).
The targets option for sentiment in the following example tells the service to search for the targets "apples", "oranges", and "broccoli". Since "apples" and "oranges" are located in the text, sentiment scores are returned for those targets.

You can also get sentiment and emotion results for entities and keywords that are detected in your text. In the example, the emotion option for keywords tells the service to analyze each detected keyword for emotion results.

curl -X POST -u "apikey:{apikey}" --header "Content-Type: application/json" --data '{
"text": "I love apples! I do not like oranges.",
"features": {
"sentiment": {
"targets": [
"apples",
"oranges",
"broccoli"
]
},
"keywords": {
"emotion": true
}
}
}' "{url}/v1/analyze?version=2019-07-12"
Show more

Runnable command for Windows users:

curl -X POST -u "apikey:{apikey}" --header "Content-Type: application/json" --data "{"text":"I love apples! I do not like oranges.","features":{"sentiment":{"targets":["apples","oranges","broccoli"]},"keywords":{"emotion":true}}}" "{url}/v1/analyze?version=2019-07-12"





 Next steps 



* View the [API reference](https://cloud.ibm.com/apidocs/natural-language-understanding).
* Learn how to identify [custom entities and relations](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing).
* [Speech audio parsing](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-parsing)
* [Speaker labels](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-speaker-labels)
* [Keyword spotting and word alternatives](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-spotting)
* [Response formatting and filtering](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-formatting)
* [Response metadata](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-metadata)
* [Processing and audio metrics](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-metrics)
* [Parameter summary](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-summary)



* Customizing the service



* [Understanding customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-customization)
* [Language support for customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support)
* [Usage notes for customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-usage)
* Language model customization



* [Creating a custom language model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageCreate)
* [Using a custom language model for speech recognition](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageUse)
For an overview of the Tune by Example feature, including a demo with example scripts, see the blog [Tune by Example: How to Tune Watson Text to Speech for Better Intonations](https://medium.com/ibm-data-ai/tune-by-example-how-to-tune-watson-text-to-speech-for-better-intonations-bcee8404d927).



 Status and support 

The following status and support information applies to Tune by Example:



* Tune by Example is beta functionality that is available only for US English. You can add prompts only to custom models whose language is en-US. You can use a custom prompt only with with US English voices.
* Custom models, custom prompts, and speaker models are owned by the instance of the service whose credentials are used to create them. Request logging and data privacy are supported for all customization components. For more information about these topics, see [Usage notes for customization](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customModelscustomGuidelines).
IBM Cloud

You must have the Standard or Premium pricing plan to use Tune by Example. The feature is part of customization, which is restricted to these plans. For more information, see the Text to Speech service in the [IBM Cloud® Catalog](https://cloud.ibm.com/catalog/text-to-speech).







 How Tune by Example works 

During testing of an application, you might find that the service does not adequately synthesize some aspects of your text. In some cases, for example, you might want to change specific aspects of the audio such as which words are emphasized and the location or duration of pauses. In other cases, you might want to change more subtle aspects of the synthesis. For instance, you might feel that the synthesized audio sounds robotic, unnatural, or that the tone is unsatisfactory. These are the types of problems that Tune by Example can address.

To use the Tune by Example feature, you record a user who reads your text as you would like to hear it spoken by one of the service's voices.
See [Supported languages](https://cloud.ibm.com/docs/assistant?topic=assistant-language-support) for details.





 6 August 2018 

Intent conflict resolution
: The tool can now help you to resolve conflicts when two or more user examples in separate intents are similar to one another. Non-distinct user examples can weaken the training data and make it harder for your assistant to map user input to the appropriate intent at run time. See [Resolving intent conflicts](https://cloud.ibm.com/docs/assistant?topic=assistant-intentsintents-resolve-conflicts) for details.

Disambiguation
: Enable disambiguation to allow your assistant to ask the user for help when it needs to decide between two or more viable dialog nodes to process for a response. See [Disambiguation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-runtimedialog-runtime-disambiguation) for more details.

Jump-to fix
: Fixed a bug in the Dialogs tool which prevented you from being able to configure a jump-to that targets the response of a node with the anything_else special condition.

Digression return message
: You can now specify text to display when the user returns to a node after a digression. The user will have seen the prompt for the node already. You can change the message slightly to let users know they are returning to where they left off. For example, specify a response like, Where were we? Oh, yes... See [Digressions](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-runtimedialog-runtime-digressions) for more details.





 12 July 2018 

Rich response types
: You can now add rich responses that include elements such as images or buttons in addition to text, to your dialog. See [Rich responses](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overviewdialog-overview-multimedia) for more information.

Contextual entities (Beta)
// Prompt for the next round of input unless skip_user_input is true.
let newMessageFromUser = '';
if (result.context.global.system.skip_user_input !== true) {
newMessageFromUser = prompt('>> ');
}

if (newMessageFromUser !== 'quit') {
newMessageInput = {
messageType: 'text',
text: newMessageFromUser,
}
sendMessage(newMessageInput, context);
}
}

The only change from the previous example is that we are now storing the context received from the assistant in a variable called context, and we're sending it back with the next round of user input:

The only change from the previous example is that we are now storing the context received from the assistant in a variable called context, and we're sending it back with the next round of user input:



* Python
* Node



response = assistant.message_stateless(
assistant_id,
input = message_input,
context = context
).get_result()

assistant
.messageStateless({
assistantId,
input: messageInput,
context: context,
})

This ensures that the context is maintained from one turn to the next, so the Watson Assistant service no longer thinks every turn is the first:

Welcome to the Watson Assistant example. What's your name?
>> Robert
Hi, Robert! How can I help you?
>> I want to make an appointment.
What day would you like to come in?
>> Next Monday
What time works for you?
>> 10 AM
OK, Robert. You have an appointment for 10:00 AM on Sep 12. See you then!

Success! The application now uses the Watson Assistant service to understand natural-language input, and it displays the appropriate responses.

This simple example illustrates how you can build a custom client app to communicate with the assistant.