GETTING STARTED
Kore.ai XO Platform
Virtual Assistants Overview
Natural Language Processing (NLP)
Concepts and Terminology
Quick Start Guide
Accessing the Platform
Working with the Builder
Building a Virtual Assistant
Using Workspaces
Release Notes
Current Version
Previous Versions
Deprecations

CONCEPTS
Design
Storyboard
Dialog Tasks
Overview
Dialog Builder
Node Types
Intent Node
Dialog Node
Entity Node
Form Node
Confirmation Node
Message Nodes
Logic Node
Bot Action Node
Service Node
Webhook Node
Script Node
Group Node
Agent Transfer
User Prompts
Voice Call Properties
Dialog Task Management
Connections & Transitions
Component Transition
Context Object
Event Handlers
Knowledge Graph
Introduction
Knowledge Extraction
Build Knowledge Graph
Add Knowledge Graph to Bot
Create the Graph
Build Knowledge Graph
Add FAQs
Run a Task
Build FAQs from an Existing Source
Traits, Synonyms, and Stop Words
Manage Variable Namespaces
Update
Move Question and Answers Between Nodes
Edit and Delete Terms
Edit Questions and Responses
Knowledge Graph Training
Knowledge Graph Analysis
Knowledge Graph Import and Export
Importing Knowledge Graph
Exporting Knowledge Graph
Creating a Knowledge Graph
From a CSV File
From a JSON file
Auto-Generate Knowledge Graph
Alert Tasks
Small Talk
Digital Skills
Digital Forms
Views
Introduction
Panels
Widgets
Train
Introduction
ML Engine
Introduction
Model Validation
FM Engine
KG Engine
Traits Engine
Training Validations
Ranking and Resolver
NLP Configurations
NLP Guidelines
Intelligence
Introduction
Contextual Memory
Contextual Intents
Interruption Management
Multi-intent Detection
Amending Entities
Default Conversations
Sentinment Management
Tone Analysis
Test & Debug
Talk to Bot
Utterance Testing
Batch Testing
Conversation Testing
Health and Monitoring
Deploy
Channels
Publish
Analyze
Introduction
Overview Dashboard
Conversations Dashboard
Users Dashboard
Performance Dashboard
Custom Dashboards
Introduction
Meta Tags
Dashboards and Widgets
NLP Insights
Conversations History
Conversation Flows
Analytics Dashboard Filters
Usage Metrics
Containment Metrics
Smart Bots
Universal Bots
Introduction
Universal Bot Definition
Universal Bot Creation
Training a Universal Bot
Universal Bot Customizations
Enabling Languages
Store
Manage Assistant
Plan & Usage
Overview
Usage Plans
Support Plans
Invoices
Authorization
Multilingual Virtual Assistants
Masking PII Details
Variables
IVR Settings
General Settings
Assistant Management
Data as Service
Data Table
Table Views
App Definitions
Sharing Data Tables or Views

HOW TOs
Build a Flight Status Assistant
Design Conversation Skills
Create a Sample Banking Assistant
Create a Transfer Funds Task
Create a Update Balance Task
Create a Knowledge Graph
Set Up a Smart Alert
Design Digital Skills
Configure Digital Forms
Configure Digital Views
Add Data to Data Tables
Update Data in Data Tables
Add Data from Digital Forms
Train the Assistant
Use Traits
Use Patterns for Intents & Entities
Manage Context Switching
Deploy the Assistant
Configure an Agent Transfer
Use Assistant Functions
Use Content Variables
Use Global Variables
Web SDK Tutorial
Widget SDK Tutorial
Analyze the Assistant
Create a Custom Dashboard
Use Custom Meta Tags in Filters

APIs & SDKs
API Reference
API Introduction
API List
API Collection
koreUtil Libraries
SDK Reference
SDK Introduction
SDK Security
SDK Registration
Web Socket Connect and RTM
Using the BotKit SDK
BotKit SDK Tutorial - Blue Prism

ADMINISTRATION
Introduction
Assistant Admin Console
Administration Dashboard
User Management
Add Users
Manage Groups
Manage Roles
Assistant Management
Enrollment
Invite Users
Send Bulk Invites
Import User Data
Synchronize Users from AD
Security & Compliance
Using Single-Sign On
Security Settings
Cloud Connector
Analytics
Billing
  1. Home
  2. Docs
  3. Virtual Assistants
  4. How Tos
  5. 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.
Menu