vania-janet/multiturn-rag-retrieval-data huggingface dataset:
Properties of the assistant_interaction_summaries.turns[].response object

 Property Type Description 

 type String The response type:<br><br><br><br> * text_to_speech: a command to play an utterance to the caller<br> * sms: a command to send an SMS message to the caller<br> * url: a command to play an audio file to the caller<br> * transfer: a command to transfer a call<br> * text_to_speech_config: a command to change the Text to Speech settings<br> * speech_to_text_config: a command to change the Speech to Text settings<br> * pause_speech_to_text: a command to stop speech recognition<br> * unpause_speech_to_text: a command to start speech recognition<br> * pause_dtmf: a command to stop processing of inbound DTMF signals<br> * unpause_dtmf: unpause_dtmf: a command to start processing of inbound DTMF signals<br> * enable_speech_barge_in: a command to enable speech barge-in so that callers can interrupt playback by speaking<br> * disable_speech_barge_in: a command to disable speech barge-in so that playback isn't interrupted when callers speak during audio playback<br> * enable_dtmf_barge_in: a command to enable DTMF barge-in so that callers can interrupt playback from the phone integration by pressing a key<br> * disable_dtmf_barge_in: a command to disable DTMF barge-in so that playback from the phone integration isn't interrupted when the caller presses a key<br> * dtmf: a command to send DTMF signals to the caller<br> * hangup: a command to disconnect the call <br> See [Mapping between CDR and Watson Assistant response types](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-cdr-log-referencecdr-log-reference-response-type-mapping).<br><br><br> 
 barge_in_occurred Boolean Whether barge-in occurred during the turn.
: You can now create Watson Assistant service instances that are hosted in the London data center without syndication. See [Data centers](https://cloud.ibm.com/docs/assistant?topic=assistant-services-informationservices-information-regions) for more details.

Dialog node limit changes
: The dialog node limit was temporarily changed from 100,000 to 500 for new Standard plan instances. This limit change was later reversed. If you created a Standard plan instance during the time frame in which the limit was in effect, your dialogs might be impacted. The limit was in effect for skills created between 10 December and 12 December 2018. The lower limits will be removed from all impacted instances in January. If you need to have the lower limit lifted before then, open a support ticket.





 1 December 2018 

Determine the number of dialog nodes
: To determine the number of dialog nodes in a dialog skill, do one of the following things:



* From the tool, if it is not associated with an assistant already, add the dialog skill to an assistant, and then view the skill tile from the main page of the assistant. The trained data section lists the number of dialog nodes.
* Send a GET request to the /dialog_nodes API endpoint, and include the include_count=true parameter. For example:

curl -u "apikey:{apikey}" "https://{service-hostname}/assistant/api/v1/workspaces/{workspace_id}/dialog_nodes?version=2018-09-20&include_count=true"

where {service-hostname} is the appropriate URL for your instance. For more details, see [Service endpoint](https://cloud.ibm.com/apidocs/assistant/assistant-v1service-endpoint).

In the response, the total attribute in the pagination object contains the number of dialog nodes.
Some features that are available with Watson Assistant for cloud are not available with Watson Assistant for IBM Cloud Pak® for Data.

The following features are not available with Watson Assistant for IBM Cloud Pak® for Data:



* Third party channel support, for example, Slack, Facebook, SMS, and WhatsApp
* Service desk support, for example, Salesforce and Zendesk
* Voice Integration







 How it works 

This diagram illustrates how the product delivers an omnichannel customer experience:

![Flow diagram of the service](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/simple-overview.png)



* Users interact with the assistant through one or more of these integration points:



* A web chat that you embed in your company website that can answer customer questions directly.
* A custom application that you develop, such as a mobile app or a robot with a voice interface. The custom application can be hosted either inside or outside the IBM Cloud Pak for Data infrastructure.
* Watson Assistant for Voice Interaction (creating your own orchestration). For details, see [Watson Assistant for Voice Interaction](https://www.ibm.com/docs/en/cloud-paks/cp-data/4.6.x?topic=services-watson-assistant-voice-interaction).



* The assistant receives user input and routes it to the dialog skill.
* The dialog skill interprets the user input further, then directs the flow of the conversation. The dialog gathers any information it needs to respond or perform a transaction on the user's behalf.

The dialog can interact with the following resources:



* Other IBM services: Connect with additional Watson services to analyze user input, such as Speech to Text.
* Back-end systems: Based on the user's intent and additional information, extract information or perform transactions by interacting with your back-end systems. For example, answer question, open tickets, update account information, or place orders.
For more information, see [Calling actions from a dialog](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-dialog-call-action).





 Migrating existing skills 

Once the dialog feature is activated, you can start a new dialog conversation from scratch if you want. But, you probably have an existing dialog skill that you want to migrate into the new Watson Assistant.

To migrate an existing dialog skill:



1. Use the classic experience to [download your dialog skill](https://cloud.ibm.com/docs/assistant?topic=assistant-skill-tasksskill-tasks-download) in JSON format.
2. In the new Watson Assistant, open the Dialog page.
3. In Options, choose Upload / Download.

![Upload dialog](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/dialog-upload.png)
4. On the Upload tab, upload the JSON file for your dialog skill.
In the JSON editor, add a [connect_to_agent response](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-phone-actionsphone-actions-transfer), specifying your phone number as the sip.uri (replace {phone_number} with the phone number of your SIP trunk):



{
"generic": [
{
"response_type": "connect_to_agent",
"transfer_info": {
"target": {
"service_desk": {
"sip": {
"uri": "sip:+{phone_number}@flex.twilio.com",
"transfer_headers_send_method": "refer_to_header"
}
}
}
},
"agent_available": {
"message": "Ok, I'm transferring you to an agent"
},
"agent_unavailable": {
"message": ""
}
}
]
}
Show more

Note that this example does not show how to use the context passed from Watson Assistant to Twilio Flex. You can reference the User-to-User information from within the Twilio Flex flow as follows:

{
"context": {
"widgets": {
"redirect_1": {
"User-to-User": "value",
}
}
}
}

where redirect_1 is the name of your redirect widget. For example, if you set up multiple queues, you might want to use a Twilio Split widget to pick a queue based on the returned context.





 Test your assistant 

Your assistant should now be able to answer phone calls to your phone number and transfer calls back to your Twilio Flex flow. To test your assistant:



1. Call your phone number. When the assistant responds, ask for an agent.
2.
In the Integrations section on the main page for your assistant, click Add integration.
2. On the Add integration page, click Phone.
3. Click Create.
4. Choose whether you want to generate a free phone number for your assistant or connect to an existing SIP trunk:



* To generate a free phone number for your assistant, click Generate a free phone number.

Generating a free phone number is supported only for Watson Assistant instances in the Dallas and Washington DC data centers.
* To use an existing phone number you have already configured with a [SIP trunk provider](https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-phonedeploy-phone-sip-providers), click Use an existing phone number with an external provider.



Click Next.
5. If you are using an existing phone number, follow the instructions to configure the SIP trunk. (If you are generating a free phone number, skip this step).



1. On the Bring your own SIP trunk page, copy the SIP URI and assign it to your SIP trunk. Click Next.
2. On the Phone number page, specify the phone number of the SIP trunk. Specify the number by using the international phone number format: +1 958 555 0123. Do not surround the area code with parentheses.



Currently, only one primary phone number can be added during initial setup of the phone integration. You can add more phone numbers in the phone integration settings later.

Click Next.
6. On the Speech to Text page, select the instance of the Speech to Text service you want to use for the phone integration.



* If you have existing Speech to Text instances, select the instance you want to use from the list.
* If you do not have any existing Speech to Text instances, click Create new instance to create a new Plus instance.



7. In the Choose your Speech to Text language model field, select the language model you want to use.

The list of language models is automatically filtered to use the same language as your assistant. To see all language models, toggle the Filter models based on assistant language switch to Off.
Select the queue you want to use.
2. In the toolbox, click the Disconnect widget and drag it into the action after Failure. (This disconnects the call if the transfer fails.)
3. Click the three dots under Reusable tasks and click Set this as the starting task. You can remove the Initial Greeting, because your assistant will speak before handing off the call.
4. Click Publish in the menu bar to make this transfer live.
5. Return to the main Genesys Cloud console.
6. Click Admin and then navigate to Call Routing in the Routing section.
7. Give the route a descriptive name (for example, Escalate to Agent).
8. Under Regular Routing, for all calls, select your new flow.
9. Assign the DID number you previously created.
10. Click Save.



4. Make sure your assistant is configured to transfer calls to an agent using the Connect To Agent response_type. For more information about how to do this, see [Transferring a call to a live agent](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-phone-actionsphone-actions-transfer).

For the sip.uri parameter, use the DID number you created in Genesys Cloud, as well as the inbound SIP URI from your Genesys trunk. Use the following format:

{
"generic": [
{
"response_type": "connect_to_agent",
"transfer_info": {
"target": {
"service_desk": {
"sip": {
"uri": "sip:+18883334444\@example.com",
"transfer_headers_send_method": "refer_to_header"
}
}
}
},
"agent_available": {
"message": "Ok, I'm transferring you to an agent"
},
"agent_unavailable": {
"message": ""
}
}
If an error occurs during a conversation, the phone integration disconnects the call by sending a SIP BYE request.

Use [Onrelease](https://help.nice-incontact.com/content/studio/actions/onrelease/onrelease.htm) to process the BYE request and transfer a call to a live agent.

In this example, when Onrelease is triggered, the script verifies whether the call was already transferred. If not, it calls the Signal action and sets an indication that the call is being transferred to a live agent. The indication is set using the Assign action.



* Variable transferred
* Value true



![Image of call disconnect on failure](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/cxone-disconnect-on-failure.png)

If the Hangup action is executed and an [Onrelease](https://help.nice-incontact.com/content/studio/actions/onrelease/onrelease.htm) event action is present, CXone will hang up on the caller, and the script will jump to the OnRelease action. Design your script so it can distinguish whether the OnRelease event is triggered due to a transfer or hangup.









 Adding transfer support to your assistant 

Configure your assistant to transfer calls to an agent using the Connect To Agent response_type. For instructions, see [Transferring a call to a live agent](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-phone-actionsphone-actions-transfer).

Use the following format:

{
"generic": [
{
"response_type": "connect_to_agent",
"transfer_info": {
"target": {
"nice_cxone": {
"custom_data": {
"p2": "test"
}
}
}
},
15 May 2023 

Change to dialog skill context variables named request
: If your dialog skill used a context variable that is named request, it was removed from the response payload of any /message calls in the V1 or V2 API, or through the Watson Assistant user interface. After 15 May 2023, this behavior changes. Watson Assistant doesn't remove context variables that are named request from the response payload anymore.





 5 May 2023 

New validation choices for date, time, and numeric customer responses
: For Number, Date, Time, Currency, and Percentage customer responses, you can now customize the validation to check for a specific answer, such as a range of dates or a limited currency amount. For more information, see [Customizing validation for a response](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-handle-errorscustomize-validation).





 3 May 2023 

Algorithm version Beta provides improved intent detection and action matching
: The algorithm version Beta now provides improved intent detection and action matching. It includes a new foundation model that is trained using a transformer architecture to improve intent detection and action matching for English.

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).





 24 April 2023 

Response modes randomization behavior
: The response modes beta now uses the same randomization behavior during clarification that your actions have without response modes enabled. Previous to this change, when response modes were enabled, the clarification feature no longer periodically modified the options for clarification. Randomizing the clarification helps prevent bias that can be introduced by a percentage of people who always pick the first option without carefully reviewing all of their choices beforehand.
// round of input.
const newText = prompt('>> ');
messageInput = {
text: newText,
}
}
sendMessage(messageInput);
} else {
// We're done, so we delete the session.
service
.deleteSession({
assistantId,
sessionId,
})
.then(res => {
return;
})
.catch(err => {
console.log(err); // something went wrong
});
}
}
Show more

All we have to do is use the value.input object from the selected response as the next round of message input, rather than building a new input object using text input. The assistant then responds exactly as it would if the user had typed the input text directly.

Welcome to the Watson Assistant example!
>> hi
Good day to you.
>> what are the choices?
What do you want to do?
1. Send greeting
2. Display the local time
3. Exit
? 2
The current time is 1:29:14 PM.
>> bye
OK! See you later.

We can now access all of the functions of the assistant either by making natural-language requests or by selecting from a menu of options.

Note that the same approach is used for suggestion responses as well. If your plan supports the disambiguation feature, you can use similar logic to prompt users to select from a list when it isn't clear which of several possible options is correct. For more information about the disambiguation feature, see [Disambiguation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-runtimedialog-runtime-disambiguation).
This documentation is for the classic Watson Assistant experience. To see the documentation for the new Watson Assistant, please go [here](https://cloud.ibm.com/docs/watson-assistant).



 Phone integration context variables 

You can use context variables to manage the flow of conversations with customers who interact with your assistant over the telephone.

The following tables describe the context variables that have special meaning in the context of the phone integration. They should not be used for any purpose other than the documented use.



 Context variables that are set by your dialog or actions 



Voice context variables set by the dialog or actions

 Name Type Description Default 

 final_utterance_timeout_count Number The time (in milliseconds) that the phone integration waits to receive a final utterance from the Speech to Text service. The timeout occurs if the phone integration does not receive a final utterance within the specified time limit, even if hypotheses continue to be generated. When the timeout occurs, the phone integration sends Watson Assistant a text update that includes the word vgwFinalUtteranceTimeout to indicate that no final utterance was received. N/A 
 post_response_timeout_count Number The time (in milliseconds) to wait for a new utterance after the response is played back to the caller. When this timeout occurs, the phone integration channel sends a text message to the assistant that includes the word vgwPostResponseTimeout and sets the context variable input.integrations.voice_telephony.post_response_timeout_occurred to true. 7000 
 turn_settings.timeout_count Number The time (in milliseconds) to wait for a response from Watson Assistant. If this time is exceeded, the phone integration tries again to contact Watson Assistant. If the service still can't be reached, the call fails. N/A 
 cdr_custom_data object Any JSON key/value pairs to collect and store with the CDR record at the end of the phone call. Each time this object is received, it is merged with any previously received cdr_custom_data context. N/A 





 Example 

{
"output": {
For more information about expressions, see [Writing expressions](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-expressions). 
 Action variables Select an action variable to use the value of a customer response in another step. The choices that are listed match the type of variable that you want to set. 
 Session variables Select another session variable to use its value. The choices that are listed match the type of variable that you want to set. 
 Assistant variables Select a built-in system variable to use its value. The choices that are listed match the type of variable that you want to set. 
 Integration variables If you are setting an integration variable, you can choose other integration variables as the value. 



5. To set more variable values in the same step, click Set new value.







 Using variables to manage conversation flow 

One of the ways you can use variables is to choose the correct path through the conversation, based on customer responses and other values available at run time. You can do this by defining step conditions, which determine whether a specific step in an action is executed based on runtime conditions.

By defining a condition based on an action variable, you can control whether a step is executed based on the customer's response to a previous step. You can also build step conditions based on session variables, which can store information from other actions.

For more information about step conditions, see [Defining step conditions](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-step-conditions).





 Using variables to customize the conversation 

You can also use variables in what your assistant says, dynamically referencing information that has been collected during the conversation. This is useful for confirming information the customer has provided (for example, You want to transfer $153.14 to your checking account. Is that correct?), and for simply personalizing the conversation to make it more human (Hi, John. How can I help you today?).

To reference a variable in what your assistant says:



1. In the Assistant says field, start typing the text for the response.
2.
: GB18030 is a Chinese standard that specifies an extended code page for use in the Chinese market. This code page standard is important for the software industry because the China National Information Technology Standardization Technical Committee has mandated that any software application that is released for the Chinese market after September 1, 2001, be enabled for GB18030. The Watson Assistant service supports this encoding, and is certified GB18030-compliant.





 9 November 2017 

Intent examples can directly reference entities
: You can now specify an entity reference directly in an intent example. That entity reference, along with all its values or synonyms, is used by the Watson Assistant service classifier for training the intent. For more information, see [Entity as example](https://cloud.ibm.com/docs/assistant?topic=assistant-intentsintents-entity-as-example) in the [Intents](https://cloud.ibm.com/docs/assistant?topic=assistant-intents) topic.

Currently, you can only directly reference closed entities that you define. You cannot directly reference [pattern entities](https://cloud.ibm.com/docs/assistant?topic=assistant-entitiesentities-patterns) or [system entities](https://cloud.ibm.com/docs/assistant?topic=assistant-system-entities).





 8 November 2017 

Watson Assistant connector
: You can use the new Watson Assistant connector tool to connect your workspace to a Slack or Facebook Messenger app that you own, making it available as a chat bot that Slack or Facebook Messenger users can interact with. This tool is available only for the IBM Cloud US South region.





 3 November 2017 

Dialog updates
: The following updates make is easier for you to build a dialog. (See [Building a dialog](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-build) for details.)



* You can add a condition to a slot to make it required only if certain conditions are met. For example, you can make a slot that asks for the name of a spouse required only if a previous (required) slot that asks for marital status indicates that the user is married.