vania-janet/multiturn-rag-retrieval-data huggingface dataset:
: You can enable the download of language data files, in CSV format, so you can translate training examples and assistant responses into other languages and use in other assistants. For more information, see [Using multilingual downloads for translation](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-admin-language-supportadmin-language-support-multilingual).





 12 July 2023 

Algorithm version Beta provides improved intent detection and action matching for more languages
: The algorithm version Beta now provides improved intent detection and action matching for French, German, Portuguese (Brazilian), and Spanish. It includes a new foundation model that is trained using a transformer architecture to improve intent detection and action matching.

Improvements include:



* Improved robustness to variations in user inputs such as typos and different inflection forms
* Less training data required to reach the same level of performance compared to previous algorithms



For more information, see [Algorithm version and training](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-algorithm-version)





 10 July 2023 

Change to message API
: When debug is enabled on the runtime (/message) API call, if a dialog processing error happens, more output is presented within the output.debug.log_messages attribute.





 7 July 2023 

SpEL expression of type intents[i].confidence is deprecated in actions
: On or after July 10, 2023, this expression will evaluate to -1 with a warning log message. On or after July 17, 2023, usage of this expression will be removed and will result in an error.





 21 June 2023 

Autolearning now available for all languages
: Autolearning is now generally available for all languages and enabled by default in all new assistants. Your assistant can learn from interactions with your customers and improve responses. For more information, see [Using autolearning to improve assistant responses](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-autolearn).

See which actions use a specific variable
: The Variables page now includes a new Actions count column.
Tutorial: Building a complex dialog 

In this tutorial, you will use the Watson Assistant service to create a dialog for an assistant that helps users with inquiries about a fictitious restaurant called Truck Stop Gourmand.



 Learning objectives 

By the time you finish the tutorial, you will understand how to:



* Plan a dialog
* Define custom intents
* Add dialog nodes that can handle your intents
* Add entities to make your responses more specific
* Add a pattern entity, and use it in the dialog to find patterns in user input
* Set and reference context variables





 Duration 

This tutorial will take approximately 2 to 3 hours to complete.





 Prerequisite 

Before you begin, complete the [Getting Started tutorial](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-getting-started).

You will use the dialog skill that you created, and add nodes to the simple dialog that you built as part of the getting started exercise.







 Step 1: Plan the dialog 

You are building an assistant for a restaurant named Truck Stop Gourmand that has one location and a thriving cake-baking business. You want the simple assistant to answer user questions about the restaurant, its menu, and to cancel customer cake orders. Therefore, you need to create intents that handle inquiries related to the following subjects:



* Restaurant information
* Menu details
* Order cancellations



You'll start by creating intents that represent these subjects, and then build a dialog that responds to user questions about them.





 Step 2: Answer questions about the restaurant 

Add an intent that recognizes when customers ask for details about the restaurant itself. An intent is the purpose or goal expressed in user input. The General_About_You intent that is provided with the General content catalog serves a similar function, but its user examples are designed to focus on queries about the assistant as opposed to the business that is using the assistant to help its customers. So, you will add your own intent.



 Add the about_restaurant intent 



1. From the Intents tab, click Create intent.

![Shows the the Create intent button on the Intents page.]
FAQ library

Filter:

Categories



1.
AI / Machine Learning
2.
Analytics
3. Blockchain
4.
Compute
5.
Containers
6.
Databases
7.
Developer tools
8.
Integration
9.
Logging and monitoring
10.
Migration
11.
Networking
12.
Platform
13.
Security
14.
Solutions
15.
Storage



AI / Machine Learning Classic Watson Assistant



* What's a...



 Term Definition 

 Action An action that you add to an actions skill represents a discrete task or question that your assistant is designed to help customers with. [Learn more](https://cloud.ibm.com/docs/assistant?topic=assistant-actions-overviewactions-overview-actions). 
 Assistant Container for your skills. You add skills to an assistant, and then deploy the assistant when you are ready to start helping your customers. [Learn more](https://cloud.ibm.com/docs/assistant?topic=assistant-assistants). 
 Condition Logic that is defined in the If assistant recognizes section of a dialog node that determines whether the node is processed. The dialog node conditions is equivalent to an If statement in If-Then-Else programming logic. 
 Content catalog A set of prebuilt intents that are categorized by subject, such as customer care. You can add these intents to your skill and start using them immediately. Or you can edit them to complement other intents that you create. [Learn more](https://cloud.ibm.com/docs/assistant?topic=assistant-catalog). 
 Context variable A variable that you can use to collect information during a conversation, and reference it later in the same conversation. For example, you might want to ask for the customer's name and then address the person by name later on. A context variable is used by the dialog skill.
You can create a custom model based on either of the base Spanish language models: es-ES_BroadbandModel or es-ES_NarrowbandModel; for more information, see [Creating a custom language model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageCreate). Pricing for recognition requests that use Spanish custom language models is the same as for requests that use US English and Japanese models.

New dialect field for method that creates a custom language model
: The JSON CreateLanguageModel object that you pass to the POST /v1/customizations method to create a new custom language model now includes a dialect field. The field specifies the dialect of the language that is to be used with the custom model. By default, the dialect matches the language of the base model. The parameter is meaningful only for Spanish models, for which the service can create a custom model that is suited for speech in one of the following dialects:



* es-ES for Castilian Spanish (the default)
* es-LA for Latin-American Spanish
* es-US for North-American (Mexican) Spanish



The GET /v1/customizations and GET /v1/customizations/{customization_id} methods of the customization interface include the dialect of a custom model in their output. For more information, see [Creating a custom language model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageCreatecreateModel-language) and [Listing custom language models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageLanguageModelslistModels-language).

New names for UK English models
: The names of the language models en-UK_BroadbandModel and en-UK_NarrowbandModel have been deprecated. The models are now available with the names en-GB_BroadbandModel and en-GB_NarrowbandModel.
You can change how someone reacts to your system based simply on how you phrase a response. Changing one line of text can prevent you from having to write multiple lines of code to implement a complex programmatic solution.
* Back up your skill frequently. See [Downloading a skill](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-skill-dialog-addskill-dialog-add-download).







 Tips for capturing information from user input 

It can be difficult to know the syntax to use in your dialog node to accurately capture the information you want to find in the user input. Here are some approaches you can use to address common goals.



* Returning the user's input: You can capture the exact text uttered by the user and return it in your response. Use the following SpEL expression in a response to repeat the text that the user specified back in the response:

You said: <? input.text ?>.

If autocorrection is on, and you want to return the user's original input before it was corrected, you can use <? input.original_text ?>. But, be sure to use a response condition that checks whether the original_text field exists first.
* Determining the number of words in user input: You can perform any of the supported String methods on the input.text object. For example, you can find out how many words there are in a user utterance by using the following SpEL expression:

input.text.split(' ').size()

See [Expression language methods for String](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-methodsdialog-methods-strings) to learn about more methods you can use.
* Dealing with multiple intents: A user enters input that expresses a wish to complete two separate tasks. I want to open a savings account and apply for a credit card. How does the dialog recognize and address both of them? See the [Compound questions](https://sodoherty.ai/2017/02/06/compound-questions/) entry from Simon O'Doherty's blog for strategies you can try.
This version provides access to methods you can use to interact with an assistant at run time. No more passing context with each API call; the session state is managed for you as part of the assistant layer.



What is presented in the tooling as a dialog skill is effectively a wrapper for a V1 workspace. There are currently no API methods for authoring skills and assistants with the V2 API. However, you can continue to use the V1 API for authoring workspaces. See [API Overview](https://cloud.ibm.com/docs/assistant?topic=assistant-api-overview) for more details.



* Switching data sources: It is now easier to improve the model in one skill with user conversation logs from a different skill. You do not need to rely on deployment IDs, but can simply pick the name of the assistant to which a skill was added and deployed to use its data. See [Improving across assistants](https://cloud.ibm.com/docs/assistant?topic=assistant-logslogs-deploy-id).
* Preview links from London instances: If your service instance is hosted in London, then you must edit the preview link URL. The URL includes a region code for the region where the instance is hosted. Because instances in London are syndicated to Dallas, you must replace the eu-gb reference in the URL with us-south for the preview web page to render properly.







 8 November 2018 

Japanese data center
: You can now create Watson Assistant service instances that are hosted in the Tokyo data center. See [Data centers](https://cloud.ibm.com/docs/assistant?topic=assistant-services-informationservices-information-regions) for more details.





 30 October 2018 

New API authentication process
: The Watson Assistant service transitioned from using Cloud Foundry to using token-based Identity and Access Management (IAM) authentication in the following regions:



* Dallas (us-south)
* Frankfurt (eu-de)



For new service instances, you use IAM for authentication. You can pass either a bearer token or an API key. Tokens support authenticated requests without embedding service credentials in every call.
So a custom model can be used with any voice for its specified language. For example, a custom model that you create for the en-US language can be used with any US English voice. It cannot, however, be used with an en-GB or en-AU voice.

Customization is available for all languages. All voices support the use of both standard International Phonetic Alphabet (IPA) and IBM Symbolic Phonetic Representation (SPR) phonetic symbols for word customization. For more information, see [Understanding customization](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customIntro).





 Creating a custom voice 

IBM Cloud

Premium customers can work with IBM to train a new custom voice for their specific use case and target market. Creating a custom voice is different from customizing one of the service's existing voices. A custom voice is a unique new voice that is based on audio training data that the customer provides. IBM can train a custom voice with as little as one hour of training data.

To request a custom voice or for more information, complete and submit this [IBM Request Form](https://form.asana.com/?k=CBuXK1uwlAf5ek6FwB6mcg&d=8612789739828).
.then(res => {
params.payload.context.skills["actions skill"].user_defined["language"] = res.languages[0].language;
console.log(JSON.stringify(params))
//Append "in" plus "the language code" to the input text, surrounded by parentheses.
const response = {
body : {
payload : {
input : {
text : params.payload.input.text + ' ' + '(in ' + res.languages[0].language + ')'
},
},
},
};
return response;
})
}
return {
body : params
}
};
Show more

To test the webhook, click Preview. In the preview panel, submit the text Buenos días. The assistant probably won't understand the input, and will return the response from your Anything else node. However, if you go to the Analyze page of your assistant and open Conversations, you can see what was submitted. Check the most recent user conversation. The log will show that the user input is Buenos días (in es). The es in parentheses represents the language code for Spanish, so the webhook worked and recognized that the submitted text was a Spanish phrase.





 Example 2 

This example shows you how to check the language of the incoming message, and if it's not English, translate it into English before submitting it to the assistant.

Define a sequence of web actions in IBM Cloud Functions. The first action in the sequence checks the language of the incoming text. The second action in the sequence translates the text from its original language into English.

In the premessage webhook configuration page, the following values are specified:



* URL: https://us-south.functions.appdomain.cloud/api/v1/web/e97d2516-5ce4-4fd9-9d05-acc3dd8ennn/default/translation_sequence
* Secret: none
* Header name: Content-Type
[Skills menu icon](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/nav-skills-icon.png).
2. Click Create skill.
3. Choose to create either an actions or dialog skill, then click Next.
4. Select the JSON file you want to import.

The imported JSON file must use UTF-8 encoding, without byte order mark (BOM) encoding. The JSON file cannot contain tabs, newlines, or carriage returns.

The maximum size for a skill JSON file is 10MB. If you need to import a larger skill, consider using the REST API. For more information, see the [API Reference](https://cloud.ibm.com/apidocs/assistant/assistant-v1createworkspace).
5. Click Upload.

If you have trouble uploading a skill, see [Troubleshooting skill import issues](https://cloud.ibm.com/docs/assistant?topic=assistant-skill-dialog-addskill-dialog-add-import-errors).
6. Specify the details for the skill:



* Name: A name no more than 100 characters in length. A name is required.
* Description: An optional description no more than 200 characters in length.
* Language: The language of the user input the skill will be trained to understand. The default value is English.





After you create the skill, it appears as a tile on the Skills page.





 Re-creating your assistant 

You can now re-create your assistant. You can then link your uploaded skills to the assistant, and configure integrations for it.
Save files with translations as CSV UTF-8 (Comma Delimited) to account for any language-specific characters.
2. When you are finished with the translation process, create a new .zip file that includes:



* action-responses.csv with your translations. Don't change the name of the file.
* action-training.csv with your translations. Don't change the name of the file.
* The original, untouched Data (Do not edit) folder, which contains assistant.bin



If you translated dialog content, also include dialog-responses.csv and dialog-training.csv in the .zip file.







 Uploading to language-specific assistants 

To upload to a language-specific assistant:



1. Create or switch to a destination assistant that uses the language for your translations.
2. In the destination assistant, open Assistant settings.
3. If you translated dialog training and responses, ensure that dialog is active in the destination assistant.
4. In the Download/Upload section, click Download/Upload files.

You don't need to enable multilingual download in the destination assistant.
5. On the Upload tab, choose Multilingual file package.
6. Attach your multilingual .zip file package, then click Upload. The translated content is added to your draft environment, so you can work on publishing the translated assistant.
: 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. Note that the Watson Assistant service learning models may have been updated as part of this enhancement, and when you retrain your model any changes will be applied.





 23 June 2017 

Updates to Korean
: Korean language support has been enhanced; please see the [Supported languages](https://cloud.ibm.com/docs/assistant?topic=assistant-language-support) topic for additional details. Note that the Watson Assistant service learning models may have been updated as part of this enhancement, and when you retrain your model any changes will be applied.





 22 June 2017 

Introducing slots
: It is now easier to collect multiple pieces of information from a user in a single node by adding slots. Previously, you had to create several dialog nodes to cover all the possible combinations of ways that users might provide the information. With slots, you can configure a single node that saves any information that the user provides, and prompts for any required details that the user does not. See [Gathering information with slots](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-slots) for more details.

Simplified dialog tree
: The dialog tree has been redesigned to improve its usability. The tree view is more compact so it is easier to see where you are within it. And the links between nodes are represented in a way that makes it easier to understand the relationships between the nodes.





 21 June 2017 

Arabic support
: Language support for Arabic is now generally available. For details, see [Configuring bidirectional languages](https://cloud.ibm.com/docs/assistant?topic=assistant-language-supportlanguage-support-configure-bidirectional).
Using custom acoustic and custom language models together 

Acoustic model customization is available only for previous-generation models. It is not available for next-generation models.

You can improve speech recognition accuracy by using complementary custom language and custom acoustic models. You can use both types of model during training of your acoustic model, during speech recognition, or both. The custom language and custom acoustic models must be owned by the same service instance, and both must customize the same base language model.



 Training a custom acoustic model with a custom language model 

The following terms differentiate how a custom acoustic model is trained, alone or with a custom language model:



* Unsupervised training refers to training a custom acoustic model with audio data alone. Training a custom acoustic model on audio alone can improve transcription quality if the characteristics of the custom model's audio match those of the audio that is being transcribed.
* Lightly supervised training refers to training a custom acoustic model with a complementary, or "helper," custom language model. Lightly supervised training is more effective than unsupervised training in improving the quality of speech recognition.



Use lightly supervised training in the following cases:



* When you have a custom language model that contains transcripts of your audio files.

Transcribing your audio data is not strictly necessary. But training with a custom language model whose corpora are based on transcripts of your audio files can improve speech recognition. This is especially true if the audio data contains out-of-vocabulary (OOV) words that are not found in the service's base vocabulary. The service can parse the contents of the transcriptions in context, extracting OOV words and n-grams that can help it make the most effective use of your audio data.
* When you have a custom language model that is based on corpora or words that are relevant to the contents of your audio files.

If you don't have transcripts of your audio files, you can train with a custom language model that includes OOV words from the same domain as your audio data. Training with a custom language model that includes OOV words that are used in the audio can improve speech recognition.



For example, suppose you are creating a custom acoustic model that is based on call-center audio for specific products.
* For more information about using grammars, see [Using grammars with custom language models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-grammars).
* For more information about the languages and models that support grammars, see [Language support for customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support).





 Create a custom language model 

You use the POST /v1/customizations method to create a new custom language model. The method accepts a JSON object that defines the attributes of the new custom model as the body of the request. The new custom model is owned by the instance of the service whose credentials are used to create it. For more information, see [Ownership of custom models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-usagecustom-owner).

You can create a maximum of 1024 custom language models per owning credentials. For more information, see [Maximum number of custom models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-usagecustom-maximum).

A new custom language model has the following attributes:

name (required string)
: A user-defined name for the new custom model. Use a localized name that matches the language of the custom model and describes the domain of the model, such as Medical custom model or Legal custom model.



* Include a maximum of 256 characters in the name.
* Do not use backslashes, slashes, colons, equal signs, ampersands, or question marks in the name.
* Use a name that is unique among all custom language models that you own.



base_model_name (required string)
: The name of the base language model that is to be customized by the new custom model. You must use the name of a model that is returned by the GET /v1/models method. The new custom model can be used only with the base model that it customizes.

dialect (optional string)