OVERVIEW
Virtual Assistants
Kore.ai Platform
Key Concepts
Natural Language Processing (NLP)
Accessing Platform
VIRTUAL ASSISTANTS
Virtual Assistant Builder
Virtual Assistant Types
Getting Started
Creating a Simple Bot
SKILLS
Storyboard
Dialog Task
Introduction
Dialog Builder (New)
Dialog Builder (Legacy)
User Intent Node
Dialog Node
Entity Node
Supported Entity Types
Composite Entities
Supported Colors
Supported Company Names
Form Node
Logic Node
Message Nodes
Confirmation Nodes
Bot Action Node
Service Node
Custom Authentication
2-way SSL for Service nodes
Script Node
Agent Transfer Node
WebHook Node
Grouping Nodes
Connections & Transitions
Manage Dialogs
User Prompts
Knowledge Graph
Terminology
Building
Generation
Importing and Exporting
Analysis
Knowledge Extraction
Build
Alert Tasks
Introduction
Ignore Words and Field Memory
How to Schedule a Smart Alert
Small Talk
Digital Views
Overview
Configuring Digital Views
Digital Forms
Overview
How to Configure Digital Forms
NATURAL LANGUAGE
Overview
Machine Learning
Introduction
Model Validation
Fundamental Meaning
Introduction
NLP Guidelines
Knowledge Graph
Traits
Introduction
How to Use Traits
Ranking and Resolver
Advanced NLP Configurations
INTELLIGENCE
Overview
Context Management
Overview
Session and Context Variables
Context Object
How to Manage Context Switching
Manage Interruptions
Dialog Management
Sub-Intents & Follow-up Intents
Amend Entity
Multi-Intent Detection
Sentiment Management
Tone Analysis
Sentiment Management
Event Based Bot Actions
Default Conversations
Default Standard Responses
TEST & DEBUG
Talk to Bot
Utterance Testing
Batch Testing
Conversation Testing
CHANNELS
PUBLISH
ANALYZE
Overview
Dashboard
Custom Dashboard
Overview
How to Create Custom Dashboard
Conversation Flows
NLP Metrics
ADVANCED TOPICS
Universal Bots
Overview
Defining
Creating
Training
Customizing
Enabling Languages
Store
Smart Bots
Defining
koreUtil Libraries
SETTINGS
Authorization
Language Management
PII Settings
Variables
Functions
IVR Integration
General Settings
Management
Import & Export
Delete
Versioning
Collaborative Development
PLAN & USAGE
Overview
Usage Plans
Support Plans
Invoices
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
ADMINISTRATION
HOW TOs
Creating a Simple Bot
Creating a Banking Bot
Context Switching
Using Traits
Schedule a Smart Alert
Configure UI Forms
Add Form Data into Data Tables
Configuring Digital Views
Add Data to Data Tables
Update Data in Data Tables
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
Update Balance Task
Transfer Funds Task
RELEASE NOTES
  1. Docs
  2. Virtual Assistants
  3. How Tos
  4. Intent Scoping using Group Node

Intent Scoping using Group Node

Adding contextually relevant sub-intents is one of the important elements in building conversational bots. Contextually relevant intents could be required for various purposes like taking a different path in the dialog flow, amending previously provided entity values, etc.

We have seen how to use the contextual data in combination with the interruption handling to achieve a more natural and human-like interaction with the bot in How to Manage Context Switching. This feature primarily aims to let you define the interruption behavior across any two intents. Defining behavior for contextual relevant intents with custom fulfillment behavior can be difficult using this feature.

With the objective of simplifying the contextual NLU, the Group node functionality has been enhanced with intent scoping, training, and fulfillment configuration, refer here for details.

In this How-To, we will explore a scenario in a Flight Booking Bot which includes digressions, amending input values, and contextual follow-ups queries. We will be using the Group Node to achieve all this easily and from a single place.

Problem Statement

During the course of booking a flight ticket:

  1. the user might change their mind regarding the destination, and/or the travel date;
  2. the user might want to check for weather information, that is not part of the book flight task, before confirming the booking;
  3. the user might have a follow-up question regarding their booking;
  4. the user may choose to cancel the task.

Prerequisites

In this how-to, we are using a Flight Details bot with the following dialog tasks

  1. Book Flight dialog which
    1. prompts the user for source, destination, date of travel, and web check-in options;
    2. display a booking confirmation message (for simplicity we have not added the service call to do the actual booking);
    3. check if the user needs any further assistance;
    4. end the conversation.

  2. Weather Report dialog which
    1. prompts the user for the location they want the weather report;
    2. display the weather report message (for simplicity we have not added the service call to do the actual weather lookup);

Implementation

Amend Entities

Let us look at the case where the user might want to change the destination and/or travel date.
Following are the steps to achieve the same:

Step 1: Group the nodes for sub-intent scoping:

The first step would be to define the scope for the sub-intent which would trigger changes to the destination and travel date.

  1. The user should be able to change the destination or the travel date any time during the conversation but before the actual booking, hence the scope would be entity nodes.
    Using the mouse, select the entities forming a Group Node.
  2. Name the Group, say Travel Details Group

Step 2a: Define sub-intents, train and set behavior properties for destination and travel date changes

Next, we need to define the sub-intents, add training, and optionally set the conditions when the sub-intent should be identified, and the bot behavior in such a case.

Let us first consider the case of enabling changes to destination and travel date:

  1. From the Entity Group window, click the Add Intent button
    1. Create Intent for allowing a change in travel date and destination
      • Enter a name for the intent, say Change Date and Destination
      • Enter a description
    2. Using the Machine Learning option under Training, let us train with user utterance that would identify this intent
      • Add an utterance, say “Let’s try a different date and destination
      • Optionally add another utterance, say “I have changed my mind, let’s start over again
      • Train the sub-intent for this utterance

    3. Reset the destination and travel date values:
      • In the Set Context Variables option under Fulfillment reset the destination city and the travel date using the following key-value pairing:
        Key Value
        context.entities.To null
        context.entities.When null
    4. Optionally Present a Message to the user regarding the changes, say “Alright, starting all over again”
    5. Under Transition Flow, take the flow back to the From entity node using the Jump To A Node option. Since the From entity value is not changed, the flow would go to the next entity To and When

Step 2b: Define sub-intents, train and set behavior properties for destination changes along with NER training

Continuing with the above use case of changing original entity values, chances are users would be specifying the changes in their utterance. Consider the case where the user indicates the change in the destination in their utterance.

  1. Click the Add Intent button to add a new sub-intent
    1. Create Intent for allowing a change in destination
      • Enter a name for the intent, say Change Destination
      • Enter a description
    2. Using the Machine Learning option under Training, let us train with user utterance that would identify this intent
      • Add an utterance, say “Instead let’s go to Chicago
      • Using the NER approach, annotate the To entity in the utterance.
      • Train the sub-intent for this utterance

    3. Set the destination values to the captured value. This value is stored as an identifiedSubIntents array in the context object. Note that the latest identified sub-intent is always stored at the 0th index of the array.
      • In the Set Context Variables option under Fulfillment set the destination city using the following key-value pairing:
        Key Value
        context.entities.To context.identifiedSubIntents[0].entities.To
    4. Optionally Present a Message to the user, say “Changing destination to {{context.identifiedSubIntents[0].entities.To}}”
    5. Under Transition Flow, take the flow back to the From entity node using the Jump To A Node option.

Test the bot

  1. Using the Talk to Bot option test the bot
  2. Try the various amend scenarios and see the bot response

Contextual Digression

Conversations never happen in a linear fashion. Users might digress from the main intent and then come back to it.
Let us look at the steps in achieving this using Group.

While booking a flight, users might want to check the weather at the destination city before committing to the date of travel. They might ask “What is the weather like at XYZ city tomorrow” while the bot is waiting on the travel date input. In such a case, the user should be presented with the weather information before being re-prompted for the date.
Same as the above Amend Entity case, the steps would be to set the scope for the Weather Report dialog, train, and set the behavior.

  1. Since the scope for a query related to Weather Report would be anytime before the actual booking, we will go with the same Entity Group used for the Amend Entity use case.
  2. Add a Dialog Task node to run the Weather Report dialog from the current dialog.
    Tip: Add Weather Report Dialog task to an existing node and then remove it from the connection, making it a floating node – not connected to any other node.
  3. This task needs location as input and in our case, it can be set to the destination city entered by the user.
  4. The connection rule for this dialog should loop back to the From entity. This would ensure that the user resumes from where he left in the original conversation flow.
  5. From the Entity Group settings dialog
    1. Add New intent
    2. Select Weather Report from the Choose Intent drop-down
    3. Training is populated from the Weather Report dialog training utterances, patterns, and rules. You can add to this list, but be aware that this would be common training data and would affect all the instances where Weather Report is used.
    4. Ensure that the Transition Flow is set to Jump to a Node and the Weather_Report node is selected
  6. Using Talk to Bot test the scenario

Contextual FAQ

Group nodes can also be used to answer contextual queries.

A user might have a query regarding the check-in process after completing the booking.
Let us see how that can be achieved, the steps are the same as amending input values, contextual digression – scoping, training and behavior definition:

  1. Since the scope now would be after booking confirmation, we will group the nodes post-booking formalities
    • Name the group, say Query Group
    • Enter a Description

  2. From the Query Group settings dialog, Add New intent
    1. Create Intent for allowing a query from user
      1. Enter a name for the intent, say Checkin Query
      2. Enter a description
    2. Using the Machine Learning option under Training, let us train with user utterance that would identify this intent
      1. Add an utterance, say “What time should I report at the airport?
      2. Optionally add another utterance, say “What is the check in time?
      3. Train the sub-intent for this utterance

       

    3. Use the Present a Message entry to answer the user, say “Since you have opted for web-check-in, you need to report 30mins before flight take-off
    4. Ensure that the Transition Flow is set to Resume the Dialog

     

  3. Using Talk to Bot option, test for the scenario.
메뉴
Kore.ai Named a Leader in 2022 Gartner® Magic Quadrant™ for Enterprise Conversational AI PlatformsGet the Report