Chatbot Overview
Conversational Bots
Intents & Entities
Intelligent Bots
Kore.ai's Approach
Kore.ai Conversational Platform
Bot Concepts and Terminology
Natural Language Processing (NLP)
Bot Types
Bot Tasks
Starting with Kore.ai Platform
How to Access Bot Builder
Working with Kore.ai Bot Builder
Building your first Bot
Getting Started with Building Bots
Using the Dialog Builder Tool
Creating a Simple Bot
Release Notes
Latest Updates
Older Releases
Bot Builder
Creating a Bot
Design
Develop
Storyboard
Dialog Task
User Intent Node
Dialog Node
Entity Node
Supported Entity Types
Composite Entities
Supported Time Zones
Supported Colors
Supported Company Names
Message Nodes
Confirmation Nodes
Service Node
Custom Authentication
2-way SSL for Service nodes
Script Node
Agent Transfer Node
WebHook Node
Connections & Transitions
Managing Dialogs
Prompt Editor
Alert Tasks
Alert Tasks
Ignore Words and Field Memory
Digital Views
Knowledge Graph
Terminology
Building
Generation
Importing and Exporting
Analysis
Knowledge Extraction
Small Talk
Action & Information Task
Action Tasks
Information Tasks
Establishing Flows
Natural Language
Overview
Machine Learning
ML Model
Fundamental Meaning
NLP Settings and Guidelines
Knowledge Graph Training
Traits
Ranking and Resolver
NLP Detection
Bot Intelligence
Overview
Context Management
Session and Context Variables
Context Object
Dialog Management
Sub-Intents
Amend Entity
Multi-Intent Detection
Sentiment Management
Tone Analysis
Sentiment Management
Default Conversations
Default Standard Responses
Channel Enablement
Test & Debug
Talk to Bot
Utterance Testing
Batch Testing
Record Conversations
Publishing your Bot
Analyzing your Bot
Overview
Dashboard
Custom Dashboard
Conversation Flows
Bot Metrics
Advanced Topics
Bot Authorization
Language Management
Collaborative Development
IVR Integration
koreUtil Libraries
Universal Bots
Defining
Creating
Customizing
Enabling Languages
Smart Bots
Defining
Sample Bots
Github
Asana
Travel Planning
Flight Search
Event Based Bot Actions
Bot Settings
Bot Functions
General Settings
PII Settings
Customizing Error Messages
Bot Management
Using Bot Variables
API Guide
API Overview
API List
API Collection
SDKs
SDK Overview
SDK Security
SDK App Registration
Web SDK Tutorial
Message Formatting and Templates
Mobile SDK Push Notification
Widget SDK Tutorial
Widget SDK – Message Formatting and Templates
Web Socket Connect & RTM
Using the BotKit SDK
Installing
Configuring
Events
Functions
BotKit SDK Tutorial – Agent Transfer
BotKit SDK Tutorial – Flight Search Sample Bot
Using an External NLP Engine
Bot Administration
Bots Admin Console
Dashboard
User Management
Managing Users
Managing Groups
Managing Role
Bots Management
Enrollment
Inviting Users
Bulk Invites
Importing Users
Synchronizing Users from AD
Security & Compliance
Using Single Sign-On
Security Settings
Cloud Connector
Analytics
Billing
How Tos
Creating a Simple Bot
Creating a Banking Bot
Transfer Funds Task
Update Balance Task
Context Switching
Using Traits
Schedule a Smart Alert
Configuring Digital Views
Custom Dashboard
Custom Tags to filter Bot Metrics
Patterns for Intents & Entities
Build Knowledge Graph
Global Variables
Content Variables
Using Bot Functions
Configure Agent Transfer
  1. Home
  2. Docs
  3. Bots
  4. Intelligence
  5. Default Conversations

Default Conversations

There are multiple places where the platform responds to user utterances, without the developer having to code the details. Examples include:

  • Default Dialog when the user intent is not found or understood by the Bot, see here.
  • Standard Responses to certain questions, greetings, error and warning scenarios etc., see here.
  • Event Handlers for certain common bot events can be defined, see here for more.

Though these are set by default by the platform, you can customize them as per your business requirements. In this document, we look into such customizations.

Default Dialog

You can choose to run a dialog task or display a standard error message if the Natural Language Processor for Kore.ai cannot determine the user intent. The default setting is to display a standard error message.

From the Natural Language -> Default Conversation section, select the Default Dialog tab to define a default dialog task.

For example, you can switch the conversation from the bot to a live agent, or run a generic dialog such as the main menu if the user intent could not be determined in the bot conversation.

If a default dialog task is not defined, standard error messages and any customizations defined in the Standard Responses section are used.

The following illustration is an example of the Default Dialog section in Bot Builder configured to run the Get Account Help dialog task when the user intent cannot be determined in Banking Portal bot.

To define a default dialog

To complete the following procedure, you must have already defined a dialog to select as the default dialog.

  1. On the Natural Language -> Default Conversation tab, select the Default Dialog section
  2. In the If user’s intent is not understood section, select Automatically run a dialog task.
  3. In the Default Dialog Task field displayed, select a default dialog from the list, and then click Save.

The Settings successfully saved message is displayed.

Standard Responses

In the Kore.ai Bot Builder tool, you can view the default Natural Language Processing, or NLP interpreter responses to user inputs or events.

For example, a reply to a user input of Hi! The Bot will reply with one of the following responses, chosen at random at runtime:

  • Hi!
  • Hello
  • Hi there!
  • Hey 🙂

The NLP interpreter displays pre-defined text responses to users based on an event, condition, trigger, or user input. Depending on your custom Bot and users of that Bot, you may want to modify the default responses to users displayed for an event or request for input.

For example:

  • User Input – When were you born?
  • Event – Authorization Failure.
  • Trigger – Task canceled.

You can define both standard bot responses, or if desired, add a channel override response that is displayed only in the specified channel the user is in, otherwise, one of the standard default responses are displayed. See here for a comprehensive list of default standard responses.

For example, in the SMS channel, you may only want to use short Bot responses to save data.

Default Responses

To access and manage the default responses in Bot Builder,

  • Hover over the left navigation menu and select Natural Language -> Default Conversation
  • Select Standard Responses section to display the Statements tab as shown in the following illustration.

For each standard response category tab, the event or user input is listed followed by one or more NLP interpreter standard responses. You can modify the default response, and if needed, add additional responses selected randomly by the NLP interpreter in response to user input or system event.

In the Standard Response section, the standard bot responses are categorized in the following tabs:

  • Statements – Responses displayed to the user as the result of an action by the bot or user. For example, a user cancels a task, or a user gives an invalid response to your bot request.
  • Queries – Statements from the bot to the user to ask for more information, for example, Which field do you want to change?
  • Error & Warnings – Statements from the bot to the user when an error occurs during the scenario, such as End date cannot be before or same as the start date!
  • Questions – Questions the Bot may pose to the user when not included in any other category.
  • Choices – The bot is asking for Yes/No input, for example, Would you like to receive push notifications every time this task occurs?
  • Greeting – Initial responses by the bot when the bot is installed, or other initial contacts, for example, when a user returns to the interaction after a period of inactivity.

The previous illustration shows the Statements tab in the Standard Responses section on the Natural Language tab for a Bot.

Add & Edit Responses

To add a new Standard Response

Note: If the standard responses are updated at the conditions wherein an ambiguity will be presented to the user, the bot response will not display the ambiguous choices to the user and you need to use the function “getChoices()“ to present the ambiguity list (see point 6 below).

  1. Select a tab category for the standard response, for example, Greeting, and then hover the situation for which you want to add the response. Click Add Response:
    1. The Add Channel Overrides dialog is displayed.
    2. In the Choose a channel drop-down list, select a channel to create a channel-specific response. You can go with Any Channel option to enable the response for all channels.
    3. In case of Channel specific response, Choose a Task drop-down list, select Any Task to apply this channel-specific response to all tasks, or select a specific task.
    4. When a specific task is selected, the Choose a Field is drop-down is displayed. Select Any Field or a specific field for this channel-specific response.
    5. In the Bot Response editor, you can override the default Bot Response for this channel using basic editor controls on the Simple Mode tab, or write custom JavaScript for the response on the Advanced Mode tab. For the:
      • Simple Mode tab – Enter the text for the default standard response, for example, *There* you are, I was ~hoping~ you would return soon! and then optionally, format the text using the formatting buttons for bold, italics, header styles, hyperlinks, ordered and unordered lists, and inserting a line. For more information, see Using the Prompt Editor.
      • Advanced Mode tab – Enter JavaScript to override the channel message as described in the following code examples.

        Note: Use the following keys to return default values for:
        response.message – Returns the default message as a string.
        response.choices – Returns the options choice or confirmation message types as an array.

        • Slack Channel Override Example
          var message = {};
          var attachments = [];
          var attachment = {
              'text': "Exception occurred during API execution",
              'color': '#FFCC00',
              'attachment_type': 'default'
          };
          attachments.push(attachment);
          message.attachments = attachments;
          print(JSON.stringify(message));
        • FaceBook Channel Override Example
          var message = {
              text: response.message
          };
          var buttons = [];
          for (var i = 0; i < response.choices.length; i++) {
              var choiceItem = response.choices[i];
              if (choiceItem.length > 20) {
                  choiceItem = choiceItem.substring(
                      0, 18) + '..';
              }
              var element = {
                  content_type: 'text',
                  title: choiceItem,
                  payload: choiceItem
              };
              buttons.push(element);
          }
          message.quick_replies = buttons;
          print(JSON.stringify(message));
        • Email Channel Override Example
          var message = {};
          var text = response.message + ' <br> ';
          for (var i = 0; i < response.choices.length; i++) {
              text = text.concat(
                  '<u> + response.choices[i] + ' <
                  /u> <br>');
              }
              message.text = text;
              print(JSON.stringify(message));
        • SMS Channel Override Example
          var message = {};
              var indexArray = ['a', 'b', 'c',
                  'd', 'e',
                  'f', 'g', 'h', 'i', 'j',
                  'k', 'l', 'm', 'n', 'o',
                  'p', 'q', 'r', 's', 't',
                  'u', 'v', 'w', 'x', 'y',
                  'z'
              ];
              var text = response.message + '\\n';
              for (var i = 0; i < response.choices
                  .length; i++) {
                  text = text.concat(indexArray[i] +
                      ') ' + response.choices[
                          i] + '\\n');
              }
              message.text = text;
              print(JSON.stringify(message));
    6. Using the getChoices() function, you can also customize the response display format using the message formatting templates. When the getChoices() function is called and there is an ambuguity, the platform returns the ambiguous choices information as an array which can be used to present the options to the end users.
      For example, to display the standard response for “Did you mean” in a button format you can use the following code:

      var info =getChoices() ;
      var message = {
      "type": "template",
      "payload": {
        "template_type": "button",
        "text": "Did you mean",
        "subText": "You can now customize response for did you mean",
        "buttons": []
       }
      };
      for (i = 0; i < info.length; i++) {
      var button = {
        "type": "postback",
        "title": info[i],
        "payload": "payload1"
      };
      
      message.payload.buttons.push(button);
      }
      print(JSON.stringify(message)); 
      
    7. Click Done to save and close the Edit Response dialog and apply the new standard response.
Menu