Consumers are more likely to engage with assistants that communicate in their preferred language. Kore.ai XO Platform supports enabling multiple languages within an assistant without having to rebuild the definitions. The platform supports over 100 languages and you can choose to enable any of these languages for your assistant. You can start building with one language and enable additional languages as and when you need them.
Enabling a language requires you to train the model to understand the user’s input and present the responses in the user’s language. To achieve this, the platform allows you to choose Conversation (Bot) Language and NLU Language for every language that you would like to enable. In most cases, the Conversation Language can be the same as the NLU Language.
Conversation (Bot) Language
Conversation Language is the one that users use to interact with the assistant. You can choose any of the over 100 languages as the Conversation Language. You can define the responses (prompts, messages. etc.,) in the Conversation Language.
You can also use the automatic response translation feature when you or your team does not have expertise in the user’s language. You can write the responses in your preferred language and the platform will automatically translate them to the user’s language during the conversation.
The following are the Conversation Languages supported by the platform:
Afrikaans – af | Hmong – hmn | Portuguese – pt |
Amharic – am | Haitian_creole – ht | Persian – fa |
Assamese – as | Hungarian – hu | Romanian – ro |
Arabic – ar | Irish – ga | Russian – ru |
Azerbaijani – az | Indonesian – id | Sinhalese – si |
Armenian – hy | Igbo – ig | Slovak – sk |
Albanian – sq | Icelandic – is | Slovenian – sl |
Bulgarian – bg | Italian – if | Spanish – es |
Belarusian – be | Japanese – ja | Samoan – sm |
Bengali – bn | Javanese – jv | Shona – sn |
Basque – eu | Kazakh – kk | Somali – so |
Bosnian – bs | Khmer – km | Serbian – sr |
Burmese – my | Kannada – kn | Sesotho – st |
Cebuano – ceb | Korean – ko | Sundanese – su |
Catalan – ca | Kurdish – km | Swedish – sv |
Chinese – izh | Kyrgyz – ky | Swahili – sw |
Corsican – co | Kinyarwanda -rw | Tamil – ta |
Croatian – hr | Latin – la | Tibetan – bo |
Czech – cs | Luxembourgish – lb | Telugu – te |
Danish – da | Laothian – lao | Tajik – tg |
Dutch – nl | Lithuanian – lt | Thai – th |
English – en | Latvian – lv | Turkmen – tk |
Esperanto – eo | Marathi – mr | Tagalog – tl |
Estonian – et | Malay – ms | Turkish – tr |
Finnish – fi | Malagasy – mg | Tatar – tt |
French – fr | Maori – mi | Uighur – ug |
Frisian – fy | Macedonian – mk | Urdu – ur |
German – de | Maltese – mt | Ukrainian – uk |
Greek – el | Malayalam – ml | Uzbek – uz |
Galician – gl | Mongolian – mn | Vietnamese – vi |
Georgian – ka | Nepali – ne | Wolof – wo |
Gujarati – gu | Norwegian – nb | Welsh – cy |
Hausa – ha | Nyanja – ny | Xhosa – xh |
Hawaiian – haw | Oriya – or | Yiddish – yi |
Hebrew – he | Punjabi – pa | Yoruba – yo |
Hindi – hi | Polish – pl | Zulu – zo |
NLU Language
NLU Language is the one that you train the assistant to identify the user’s intents. The NLU model is built using the NLU Language that you choose. This language can be the same as the Conversation language or it can be any other supported language.
- Language-specific NLU Models – The platform supports language-specific NLU models for 26 languages. These models are pre-trained to understand system entities, concepts, sentiment, etc. in specific languages.
- In most cases, the NLU Language can be the same as the Conversation Language for these 26 languages.
- There may be cases where you can choose an NLU Language different from the Conversation Language. For example, you want to enable the Arabic language for your assistant but train using the English language. You can enable the automatic input translation feature to support this flow. The user input is automatically translated to the NLU Language during the conversation.
- These models provide a wide range of configurations for you to fully customize the model behavior.
- The following are the NLU Languages supported by the platform. While most of the NLU features are supported in all languages, there are some exceptions, see here for more details.
Arabic – ar Korean – ko Chinese Simplified – zh_cn Kazakh (post v7.2 release) – kk Chinese Traditional -zh_tw Marathi (post v9.0 release) – mr Catalan (post v9.0 release) – ca Norwegian (post v8.1 release) – nb Dutch – nl Polish (post v7.0 release) – pl English – en Portuguese (Brazilian) – pt French – fr Russian (post v7.0 release) – ru Finnish (post v6.4 release) – fi Swedish (post v7.1 release) – sv Hindi (post v8.1 release) – hi Slovenian – sl German – de Spanish – es Indonesian – id Telugu (post v9.0 release) – te Italian – it Tamil (post v9.0 release) – ta Japanese – ja Ukrainian (post v7.0 release) – uk
- Multilingual NLU Model – Multilingual NLU model is a language-agnostic model and understands over 100 languages.
- Translation of user input is not required as the model is pre-trained to understand over 100 languages
- As the model is language agnostic, you can train the model in any of your preferred languages or a combination of languages.
- This model supports fewer configurations as compared to the language-specific NLU models.
Language Enablement Options
The platform offers various options for you to enable additional languages. You can choose a combination of Conversation Language, NLU Language, Input Translation, and Response Translation that suits your needs.
Scenario 1: Enabling a language in which you can train as well
Example
Conversation Language | NLU Language | Input Translation | Response Translation |
English | English | Not Required | Optional |
- This is one of the common ways of enabling languages.
- The Conversation Language and the NLU Language will be the same.
- Input Translation and Response Translation are not required for this flow.
Scenario 2: Enabling a language using another language as NLU Language
Example
Conversation Language | NLU Language | Input Translation | Response Translation |
Arabic | English | Required | Optional |
Georgian | French | Required | Optional |
- Use this flow if you want to train the assistant in a language other than the conversation language.
- You can also use this flow if the language you want to enable is not supported as an NLU Language.
- Input Translation is required for this flow to translate the user’s input to the NLU Language.
- You will need to enable the Response Translation option if the responses are defined in a language other than the conversation language.
Scenario 3: Enabling a language using the Multilingual NLU model
Example
Conversation Language | NLU Language | Input Translation | Response Translation |
Arabic | Multilingual Model | Not Required | Optional |
Georgian | Multilingual Model | Not Required | Optional |
- Use this flow if you want to train using the multilingual NLU model.
- You can also use this flow if the language you want to enable is not supported as an NLU Language.
- Input Translation is not required for this flow as the multi-lingual model understands over 100 languages.
- You will need to enable the Response Translation option if the responses are defined in a language other than the conversation language.
Managing Languages
You can create an assistant from scratch, enable a language for an existing assistant or update the language configuration for the existing assistant.
Creating an Assistant from Scratch
To create a Assistant from scratch, follow the below steps:
- Log in to your Kore.ai XO Platform account.
- On the Virtual Assistant landing page, click New Bot on the top-right and select the Start from Scratch option.
- If you are creating an Assistant for the first time, you will see a dialog as illustrated.
- On the Create New Bot window, enter the Assistant details:
- Name – Give a name to your Assistant. For example, Banking Assistant. If the name is already used, try something else
- Select English from the Default Bot Language drop-down list. You need to also choose between Universal Bot or Standard Bot from the Bot Type dropdown list
- If the bot language selected is from one of the 26 languages supported as NLU language then by default bot language will be the same as the NLU language. You can always change the NLU language to any language by clicking on the Advanced Options link to search and select the NLU language from the list of supported languages.
- Once you select a NLU language, which is different from the default Bot language, you can enable the following translation modules:
- User Input Translation – This approach uses language translation services to translate the user input into a base language. The conversation is executed in the base language and the responses are auto-translated back to the user’s language using translation services. (Supported from v9.1)
- Runtime Response Translation – The Kore.ai XO Platform can automatically translate all the prebuilt responses as well as plain text messages to the user’s language. For this, you will need to provide your API keys for either Google Cloud Translation or Microsoft Translator service in the Translation Configurations section. You can also translate the content of the templated messages inside the JavaScript using the
koreUtil.AutoTranslate()
function by passing a string or a context variable. For example,koreUtil.AutoTranslate(context.variable1)
Note: If you select Multilingual as the NLU language option, by default the Assistant will be able to understand the user input in 100 plus languages supported by the Kore.ai XO Platform. The Multilingual NLU model is a language-agnostic model, it understands user input in 100 plus languages without the need for translation. However, you could enable Response Translation if the bot responses are configured in a language other than the assistant language.
- Click Create.
Adding a language to an existing Virtual Assistant
There could be a need where you would need the virtual assistant to support more than 1 language. You can add a new language for your assistant.
Follow these steps to add/enable a new language for your virtual assistant:
- Go to Build > Configurations > Languages.
- On the Language Management page, in the Standard Languages section, click the + Add Language to add languages.
- The platform will display all the 100 plus languages supported by the platform. You can click on the Configure button to enable a language.
Note: You can also search for a language by entering its name. - Once you click configure, you can setup the following language configurations:
- Choose the NLU Language – Allows you to select any supported language as the NLU model to train your assistant.
- Select the Language Definition Mode -You can choose any of the following options to copy the language definitions:
-
- Basic Mode – Lets you only copy dialog prompts and messages.
Note: A base language is a language that is already enabled in the assistant. You need to choose a Base Language for your assistant from which you want to copy your assistant’s data for both Basic and Advanced modes. - Advanced Mode – Lets you copy dialog prompts, messages, knowledge graph, small talks, traits, and training data as per your need.
- Use Language Pack – Lets you upload the language definitions after adding manually translating a JSON file. You can download a JSON language pack of any of the already-enabled languages and then edit the dialog prompts and messages in the JSON file. Upload the updated JSON file to enable the new language for the assistant.
- Basic Mode – Lets you only copy dialog prompts and messages.
-
- Manage Translations – In case the Translation Engine is not configured, click the Configure link to configure the translation engine for your assistant. To learn how to enable Input Translation or Runtime Response Translation, refer to the Creating an Assistant from Scratch section.
- Once you have configured translations, click Enable to add/enable a new language for the assistant.
Update a language for an existing Virtual Assistant
If you want to enable/disable input translation, change the NLU language of the already enabled language for an assistant or modify the dialog prompts then you can use the update feature.
To update an already enabled language for an assistant, follow the below steps:
- Go to Build > Configurations > Languages.
- The platform will display all the languages under the Language Management section.
- Click on the language that is already enabled in the bot. The Manage Language dialog appears, here you can:
- Update the NLU language – Updating the NLU language will need training for the virtual assistant again.
- Update the dialog prompts – You can update the language pack file and upload it to update the dialog prompts.
- Update Manage Translations – You can enable/disable input translation or runtime response translation based on your needs.
- Click the Update button once all the necessary changes are made.
Notes:
- After you have configured a new language, the status of all the published tasks that are modified to Enabled. To make the new language work in the bot, you must re-publish the bot. Until then, the bot continues to function with the previously published languages.
- Support for Synonyms is restricted to English, French, Spanish and German languages. The respective sections in Natural Language and Entity Node will be in a disabled state for other languages.
Manage Translation Services
The Kore.ai XO Platform offers multiple ways to train your virtual assistant for language understanding. One of the ways is to use translation services to translate the user input. In this approach, you can train the virtual assistant in a language (NLU Language) other than the interaction language. For example, you can enable Spanish as an interaction language but train the assistant using English language training data.
Translation services can also be used for translating the bot responses if they are defined in a language other than the conversation language. The platform allows you to define language-specific responses for each of the languages enabled for the bot. However, you may choose to write responses in a language other than the enabled language.
The platform provides out-of-the-box support for Microsoft Translator and Google Translation APIs. You can also use the Custom Translation Engine feature to integrate with any other translation services or your in-house translation services.
Configuring Microsoft Translator Service
Microsoft Translator services can be used for enabling translation services for your virtual assistant.
- Go to Build > Configurations > Languages > Translation Configurations.
- Select Microsoft Translator.
- Provide the API Key of your Microsoft Translator API service. Learn More.
- Click Save to complete the setup.
Configuring Google Translation Service
Microsoft Translator services can be used for enabling translation services for your virtual assistant.
- Go to Build > Configurations > Languages > Translation Configurations.
- Select Google Translator.
- Provide the API Key of your Google Translation API service. Learn More.
- Click Save to complete the setup.
Configuring Custom Translation Service
The Custom Translation Service allows you to use translation services by integrating with other translation providers or to integrate with any in-house translation services you may have.
Here is how it works:
- Follow the instructions below to enable the Custom Translation Engine feature.
- You can set up the integration with your translation service APIs using Get or Post method.
- Refer to your translation service documentation for the authentication mechanism, request payload, and response payload.
- This integration is used for translating both the user input as well as the bot responses. The platform will automatically make the following information available in the context during runtime.
- Make use of the following functions while defining the request payload.
- The platform invokes the translation service using the defined configurations.
- The translation engine should share the translated text as part of the API response.
- Map the relevant field from the response payload to be used as the translated text.
a. koreUtil.conversation.sourceText()
– This function will return the text to be translated.
i. If the user’s input is being translated, then the function will return the user’s input.
ii. If the bot response is being translated, then the function will return the bot response.
b. For translating user input, this function will return the user input. For translating the bot response, the function will return the bot response text.
c. koreUtil.conversation.getSourceLanguage()
– This function returns the current language of the text to be translated.
i. If the user input is being translated, then the function will return the language in which the user is interacting.
ii. If the bot response is being translated, then the function will return the language in which the response is written.
d. koreUtil.conversation.getTargetLanguage()
– This function returns the language to which the text should be translated to.
i. If the user input is being translated, then the function will return the language to which the input should be translated.
ii. If the bot response is being translated, then the function will return the language to which the response should be translated.
Steps to enable a Custom Translation Engine
- Go to Build > Configurations > Languages > Translation Configurations.
- Select Custom, and choose Add Custom Engine from the dropdown.
- Provide a name for the Custom Translation Engine.
- Define the request payload for sending the text to be translated. Refer to the details provided above for defining the request payload.
- Refer to the Service Node documentation to learn more about how to configure service integrations.
- After defining the request payload, you can test the integration by providing the required details from the Test Request tab. Provide the sample values for the variables shown under the Sample Context Values sections, click Test to verify if the custom translation connection is established.
- After a successful test, the platform displays the API response received from the translation service.
- Verify the response payload and map the translated text from the payload in the Translated Output field.
- Click the Extract button to verify if the translation output is correctly mapped.
- Click Save & Exit to return to the Languages page.
- Click Save to complete the configuration.
Switch Language for a Virtual Assistant
If you have configured multiple languages for a virtual assistant, you can switch the language to configure the virtual assistant from the top right corner (language dropdown) of the bot window. The dropdown will display all the other supported languages with the corresponding NLU model that is configured for the language.
Note: The language drop down will display Bot Language and NLU language for the languages where the Bot language is not equal to NLU language. If the bot language and the NLU language are the same then the language drop down will display only the bot language.
Disabling/Enabling Language
Once you have configured and enabled a language you can:
- Disable or deactivate a language that is previously enabled for the bot. The actual language-specific data that has been added while enabling the language will continue to exist in the bot even after disabling the language. Disabling would prevent the users from talking to the bot in that language (can be viewed in bot export copy)
- If a language is disabled you can enable it again, since the data is preserved, you need not enter all the details.
Not: Any change in language settings, needs to be published before it can take effect in the published bot.
Language Detection and Selection
Multilingual virtual assistant auto-detect and switch language based on the user’s utterance. An exception to this rule is when the user is expected to enter a value against an entity and the user input satisfies that entity’s criteria.
Language Detection
There are three ways an assistant can detect the language based upon the user utterance:
- By Default: Kore.ai’s platform uses its own language detection algorithm to detect language from the user utterance. This is the default setting and the end user’s language will be detected by the platform.
- For on-prem installation, you can go with the above-mentioned default setting of Kore.ai’s in-house language detection algorithm or use Google APIs for language detections. You can set it in the Kore Config file.
- If you are using BotKit SDK, you may also send the following cheat command from your BotKit to the platform:
cheat language <language name or code>
The assistant continues to communicate with the user in the same language. If the user switches to another enabled language anytime later, the assistant changes to the new language automatically.
If the assistant fails to detect a user’s language with high confidence, it requests the user to select a preferred language from the list of enabled options.
Language Selection Logic for Users
- The virtual assistant identifies user language from every utterance. In case a change is detected, it will get a confirmation from the user regarding the switch and proceeds as per the user response. These standard responses can be customized using the
getCurrentOptions
utility, see here for more. Note that the current conversation will be discarded in case the user wants to switch languages. - Language selection settings – In addition, you may want to configure the language selection options. From the menu under the Build tab, click Configurations -> Languages. Under Language Selection Logic (scroll down for the option), for language selection time frame, set to one of the following:
- Lifetime: The auto-detected language will be set as the user’s preferred language and used for all subsequent communications until the user interacts in another enabled language anytime later. If the user starts to talk in another enabled language, the virtual assistant changes to that language.
- Per Session: Detects the user’s language at the beginning of every session and responds accordingly.
- Every User Message: Identifies the user’s language from every utterance. In case a change is detected, will get a confirmation from the user regarding the switch and proceeds as per the user response. Note that the current conversation will be discarded in case the user wants to switch languages. This feature was introduced in release 7.2 and is the default setting for multilingual virtual assistants.
- For testing and debugging purposes, you can override the language selection settings by using the cheat command during a chat session:
Replace the language name or code with one of these values:- English: English or EN
- German: German or DE
- French: French or FR
- Spanish: Spanish or ES
Language-Specific Components
This section lists the bot elements for which you can provide language-specific values. You need not translate Standard Responses as the platform automatically translates them when you enable a language.
Bot Metadata
JSON object consisting of the following translatable elements
Field Name | Type | Description |
---|---|---|
Bot Name | String | Name of the bot |
Bot Description | String | Description of the bot |
Bot Synonyms | Object | Arrays of important words in the task names and their corresponding synonyms. Enter translation of the words as well as their synonyms. Refer to Managing Synonyms to learn more about bot synonyms. |
Bot Error Codes | Object | Arrays of error codes and their corresponding messages. Enter translations of the error message. Refer to Customizing Error Messages to learn more about error messages. |
Dialog Tasks
JSON object consisting of the following translatable components of your bot’s Dialog Tasks.
Field Name | Type | Description |
---|---|---|
Dialog Task Name | String | Name of the dialog task |
Dialog Task Desc | String | Description of the dialog task |
Dialog Task Upgrade Message | String | Message displayed to the developer on the History page for the upgraded task |
Dialog Components
JSON object consisting of the following translatable components related to the NLP settings of a dialog task.
Field Name | Type | Description |
---|---|---|
Dialog Component Intent | String | Name of the User Intent node |
Dialog Component Description | String | Description of the User Intent node |
Dialog Component Synonyms | Object | Synonyms for the words in the entity node names. Refer to Managing Synonyms to learn more. |
Dialog Component Patterns | Object | Patterns for the User Intent and Entity nodes in the dialog task. Refer to Managing Patterns to learn more. |
Message Templates
JSON object with arrays of Message Template IDs and Message Template Text values. They correspond to the User Responses field in the Message node and the Bot Prompts and Error Prompts fields in the Entity node of the dialog tasks.
Field Name | Type | Description |
---|---|---|
Message Template Text | String | The text entered in User Responses, Bot Prompts, or Error Prompts fields in any Message or Entity node of a dialog task. |
Action Task
JSON object consisting of the following translatable components of your bot’s Action Tasks.
Field Name | Type | Description |
---|---|---|
Action Name | String | Name of the action task |
Action Short Desc | String | Description of the action task |
Action Keywords | Array | The search keywords entered for the action task |
Action Patterns | Array | Arrays of patterns related to the action task’s name. Replace the pattern text with the translated text. Refer to Managing Patterns to learn more. |
Action Field Synonyms | Object | Arrays of synonyms for each task field. Replace the field name and the synonyms with the translated text. Refer to Managing Synonyms to learn more. |
Action Field Patterns | Object | Array consisting of patterns for each task field. Replace the pattern text with the translated text. Refer to Managing Patterns to learn more. |
Action Ignore Words | Array | Array of ignore words related to the action task. Replace the words with the translated text. Refer to Managing Ignore Words and Field Memory to learn more. |
Action Upgrade Short Message | String | Upgrade Short Message related to the action task. |
Action Upgrade Long Message | String | Upgrade Long Message related to the action task. |
Action Query Fields | Object | Key-value pairs of Action Field Help and Action Field Title. Replace the text with the translated text. |
Action Payload Fields | Object | Key-value pairs of Alert Payload fields. Replace the text with the translated text. |
Alert Task
JSON object consisting of the following translatable components of your bot’s Alert Tasks.
Field Name | Type | Description |
---|---|---|
Alert Name | String | Name of the alert task |
Alert Short Desc | String | Description of the alert task |
Alert Keywords | Array | The search keywords entered for the alert task |
Alert Patterns | Array | Array of patterns related to the alert task’s name. Replace the pattern text with the translated text. Refer to Managing Patterns to learn more. |
Alert Field Synonyms | Object | Arrays consisting of synonyms for each task field. Replace the field name and the synonyms with the translated text. Refer to Managing Synonyms to learn more. |
Alert Field Patterns | Object | Arrays consisting of patterns for each task field. Replace the pattern text with the translated text. Refer to Managing Patterns to learn more. |
Alert Ignore Words | Array | Arrays of ignore words related to the alert task. Replace the words with the translated text. Refer to Managing Ignore Words and Field Memory to learn more. |
Alert Upgrade Short Message | String | Upgrade short message related to the alert task. |
Alert Upgrade Long Message | String | Upgrade long message related to the alert task. |
Alert Query Fields | Object | Arrays consisting of key-value pairs of Alert Field Help and Alert Field Title. Replace the text with the translated text. |
Alert Payload Fields | Object | Arrays consisting of key-value pairs of Alert Payload fields. Replace the text with the translated text. |
Action Fields
JSON object consisting of the following translatable components in the API Request tab of the Action task.
Field Name | Type | Description |
---|---|---|
Action Field Title | String | The title of the user input field related to the action task, for example, Choose account |
Action Field Help | String | The help text displayed below the field title to describe the task, for example, Which account would you like to get the balance for? |
Action Field Placeholder | Array | The placeholder text displayed inside the field |
Alert Fields
JSON object consisting of the following translatable components in the API Request tab of the Alert task.
Field Name | Type | Description |
---|---|---|
Alert Field Title | String | The title of the user input field related to the alert task, for example, Choose city |
Alert Field Help | String | The help text displayed below the field title to describe the task, for example, Which city would you like to get weather alerts for? |
Alert Field Placeholder | String | The placeholder text displayed inside the field. |
Bot Filters
JSON object consisting of the following translatable components related to Bot filters
Field Name | Type | Description |
---|---|---|
Filter Name | String | Name of the task filter |
IDP Config Form Fields
JSON object consisting of the following translatable components related to IDP configuration form
Field Name | Type | Description |
IDP Form Field | String | Name of the IDP Form Field displayed to the end-user in the authentication dialog |