GETTING STARTED
Kore.ai XO Platform
Virtual Assistants Overview
Natural Language Processing (NLP)
Concepts and Terminology
Quick Start Guide
Accessing the Platform
Navigating the Kore.ai XO Platform
Building a Virtual Assistant
Help & Learning Resources
Release Notes
Current Major Version
Recent Updates
Previous Versions
Deprecations
Request a Feature
CONCEPTS
Design
Storyboard
Overview
FAQs
Conversation Designer
Overview
Dialog Tasks
Mock Scenes
Dialog Tasks
Overview
Navigate Dialog Tasks
Build Dialog Tasks
Node Types
Overview
Intent Node
Dialog Node
Entity Node
Form Node
Confirmation Node
Message Nodes
Logic Node
Bot Action Node
Service Node
Webhook Node
Script Node
Process Node
Agent Transfer
Node Connections
Node Connections Setup
Sub-Intent Scoping
Entity Types
Entity Rules
User Prompts or Messages
Voice Call Properties
Knowledge AI
Introduction
Knowledge Graph
Introduction
Build a Knowledge Graph
Manage FAQs
Knowledge Extraction
Import or Export Knowledge Graph
Prepare Data for Import
Importing Knowledge Graph
Exporting Knowledge Graph
Auto-Generate Knowledge Graph
Knowledge Graph Analysis
Answer from Documents
Alert Tasks
Small Talk
Digital Skills
Overview
Digital Forms
Digital Views
Introduction
Widgets
Panels
Session and Context Variables
Context Object
Intent Discovery
Train
NLP Optimization
ML Engine
Overview
Model Validation
FM Engine
KG Engine
Traits Engine
Ranking and Resolver
Training Validations
NLP Configurations
NLP Guidelines
LLM and Generative AI
Intelligence
Introduction
Event Handlers
Contextual Memory
Contextual Intents
Interruption Management
Multi-intent Detection
Amending Entities
Default Conversations
Conversation Driven Dialog Builder
Sentinment Management
Tone Analysis
Default Standard Responses
Ignore Words & Field Memory
Test & Debug
Overview
Talk to Bot
Utterance Testing
Batch Testing
Conversation Testing
Conversation Testing Overview
Create a Test Suite
Test Editor
Test Case Assertion
Test Case Execution Summary
Glossary
Health and Monitoring
NLP Health
Flow Health
Integrations
Actions
Actions Overview
Azure OpenAI
Overview
Templates
BambooHR
Overview
Templates
Freshdesk
Overview
Templates
Freshservice
Overview
Templates
HubSpot
Overview
Templates
JIRA
Overview
Templates
Microsoft Graph
Overview
Templates
Open AI
Overview
Templates
Salesforce
Overview
Templates
ServiceNow
Overview
Templates
Stripe
Overview
Templates
Twilio
Overview
Templates
Agents
Agent Transfer Overview
Custom (BotKit)
Drift
Genesys
Intercom
NiceInContact
Salesforce
ServiceNow
Unblu
External NLU Adapters
Overview
Dialogflow Engine
Test and Debug
Deploy
Channels
Publishing
Versioning
Analyze
Introduction
Dashboard Filters
Overview Dashboard
Conversations Dashboard
Users Dashboard
Performance Dashboard
Custom Dashboards
Introduction
Custom Meta Tags
Create Custom Dashboard
Create Custom Dashboard Filters
NLP Insights
Conversations History
Conversation Flows
Conversation Insights
Feedback Analytics
Usage Metrics
Containment Metrics
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
Get Started
Supported Components & Features
Manage Languages
Manage Translation Services
Multiingual Virtual Assistant Behavior
Feedback Survey
Masking PII Details
Variables
Collections
IVR Settings
General Settings
Assistant Management
Manage Namespace
Data
Overview
Data Table
Table Views
App Definitions
Data as Service
HOW TOs
Build a Travel Planning Assistant
Travel Assistant Overview
Create a Travel Virtual Assistant
Design Conversation Skills
Create an ‘Update Booking’ Task
Create a Change Flight Task
Build a Knowledge Graph
Schedule a Smart Alert
Design Digital Skills
Configure Digital Forms
Configure Digital Views
Train the Assistant
Use Traits
Use Patterns
Manage Context Switching
Deploy the Assistant
Use Bot Functions
Use Content Variables
Use Global Variables
Use Web SDK
Build a Banking 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
Composite Entities
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
Intent Scoping using Group Node
Analyze the Assistant
Create a Custom Dashboard
Use Custom Meta Tags in Filters
Migrate External Bots
Google Dialogflow Bot
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
Installing the BotKit SDK
Using the BotKit SDK
SDK Events
Tutorials
BotKit - Blue Prism
BotKit - Flight Search Sample VA
BotKit - Agent Transfer
Widget SDK Tutorial
Web SDK Tutorial
ADMINISTRATION
Introduction to Admin Console
Administration Dashboard
User Management
Add Users
Manage Groups
Manage Roles
Data Tables and Views
Assistant Management
Enrollment
Invite Users
Send Bulk Invites
Import User Data
Synchronize Users from AD
Security & Control
Using Single-Sign On (SSO)
Two-Factor Authentication (2FA)
Security Settings
Cloud Connector
Analytics
Billing
  1. Home
  2. Docs
  3. Virtual Assistants
  4. Intelligence
  5. Context Management

Context Management

Effective context management is important because it allows Virtual Assistants to interact with users in a way that is easier, quicker, more helpful, and less robotic and scripted. Contextual data helps users complete tasks faster and allows you to create more natural, human-like back and forth conversations.

For example, let us consider the following conversation:

User: What is the cost of an Economy flight ticket from London to Paris on Aug 15, 2022?
VA: It’s €242.
User: Great! I would like to book it.

In the above conversation, the booking is in the context of an economy flight on Aug. 15, 2022… The VA should not be asking the user whether they would like to book a flight or a hotel; what their departure and destination cities are or when they want to fly. The context from the previous intent should already be available to the VA, so it can handle the intent according to the existing contextual data. The XO Platform allows you to capture and reuse contextual data for a large variety of scenarios, so you can create more complex use cases and redefine the enterprise customer experience. The following are examples of a few such scenarios:

  • Sharing context across intents, FAQs: As seen from the above example, maintaining context for all intents i.e. dialog tasks, FAQs, makes it easy to customize the user experience
  • Context-driven FAQs: Certain intents (tasks or FAQs) can be made available only when certain other intents (tasks or FAQs) are in the context.
    For example, FAQ intent What are the meal options available? should be available only when Book a flight task is in the context.
  • Follow-up Intent: Context of the current intent can be used to identify subsequent intents from the user utterances.
    For example, User utterance what are the extra charges? should be responded with FAQ intent What are the charges for a Premium Economy seat ? if the user’s previous intent was what are the benefits of booking a Premium Economy seat?
  • Sharing Entity Values across Intents: Entity values or conversation flows can be driven using the previous intent’s context information.
    For example, The City Name entity in Check Weather intent can be pre-populated if the user has executed Check Flight Status intent and has provided value for the Destination City entity.

This document talks about the concepts behind the implementation of context management in the Kore.ai XO Platform. For a detailed step-by-step example, refer here.

Use Case Example

User: When is my flight to Singapore?
VA: Your flight from New York to Singapore is confirmed for Jun 20th.
User: Do I need a Visa?
VA: Yes, you need a visa to visit Singapore for business or tourism
User: I would like to apply for one
VA: Sure I can help with a Visa to Singapore. Let me know the duration of the stay.

To achieve the above conversation, the context object can be used as follows:

  • Flight Booking Enquiry emits the destination city entity value.
  • Visa FAQ uses the entity value emitted by the Booking Enquiry Intent.
  • Visa Application consumes the terms Visa and Singapore from the Visa FAQ.

This article will help you in achieving the above scenario.

Implementation

Context management involves the following steps:

  • Output Context to define tags that indicate the current intent is executed.
  • Intent Preconditions to extract the output context tags for scoping the subsequent intent detection.
  • Contextual Intent Detection using context tags to identify the terms/nodes from the FAQs.
  • Conversation Flows to customize the flows.

Output Context

Context Tags are generated and stored in the context object to be used for managing the assistant’s behavior and user experience. The Platform creates a context object for every user intent, like dialog tasks and FAQs (refer here for more on Context Object).

Default Contexts Tags

Intent names, Entity names, and FAQ Term/Node names are emitted by default.

Custom Context Tags

Additionally, the following can be defined to be included in the Context Object:

  • Context Tags – You can add context tags from the NLP settings for Dialog, Action, Alert, Info Tasks, and Entities.
  • Entity Value – You set an option to indicate whether entity values captured should be emitted or not for each entity node.
  • Use context tags for finding FAQ – You can indicate whether KG paths to be shortlisted using context tags.

Dialog Tasks

The Platform supports emitting details of a dialog task when executed by the user:

  • The intent name is emitted as a contextual tag for all dialog tasks when the task execution is initiated.
  • You can add any additional tags from the NLP Properties tab of the dialog task (you may have to scroll down).

  • You can emit output context tags from any place where JavaScript is written (script node, advanced prompts, run a script option, etc.) using the contextTags.add(string value).

Alert Tasks

The Platform supports emitting details of the alert tasks when executed by the user:

  • The task name is emitted as a contextual tag for all alert tasks when the task execution is initiated.
  • You can add any additional tags at the time of task creation under More Options or from the General Settings.
  • You can also emit output context tags from pre-processors or post-processors using the contextTags.add(string value).

 

Entity

Entity values captured from end-users are emitted based on the:

  • Auto emit the entity values captured switch. Entity Value Tags will be emitted as shown in the following section.
  • You have the option to add any additional tags.

 

Knowledge Graph

  • The Node/term name is emitted as a contextual tag for all mandatory and optional terms present in the path qualified when a question is answered.
  • You can add any additional tags per term from the Settings page for the term/node.
  • You can also emit output context tags from advanced prompts using the contextTags.add(string value).

Intent Preconditions

Intent pre-conditions are used to define the intent detection scope for intents and FAQs. These are a set of conditions that must be fulfilled for the intent/FAQ to be detected and executed.

Dialog Tasks

Intent pre-conditions for dialog intents are set to define when a dialog is detected i.e. making a dialog available for detection only when specific tags are available in the context.

  1. You can add one or more intent pre-conditions for making a dialog intent available.

  2. Dialog intents with pre-conditions are detected only if the defined pre-conditions are met.
  3. The intent with a precondition set is treated as a sub-intent and will be part of the Linked Task Exception behavior from the Dialog level Hold and Resume settings.

Alert Tasks

Intent pre-conditions for alert tasks are set to define when a task is detected i.e. making a task available for detection only when specific tags are available in the context.

  1. You can add one or more intent pre-conditions for making a task intent available.
  2. Task intents with pre-conditions must be detected only if the defined pre-conditions are met.

Knowledge Graph

Intent pre-conditions for Knowledge Graph can be associated with terms.

  1. You can define intent pre-conditions for any of the terms present in the Knowledge Graph.
  2. Paths that contain terms with pre-conditions are qualified only if the pre-conditions are met.

Contextual Intent Detection

Contextual intent detection helps in detecting relevant intents using the output context set by previously executed intents.

Tasks

You can define Rules for identifying contextually relevant intents by using output context tags the same as traits (refer here for more).

Knowledge Graph

The Platform consumes the output context tags and uses them for improving intent detection in the Knowledge Graph engine based on the flag set by the developer. This flag ensures that the context tags are used to qualify paths in the Knowledge Graph. Context tags are used to extract terms and these terms are clubbed with any other terms present in user utterance. The consolidated list of terms is used for qualifying the path.

You can configure this as follows:

  1. Select the Build tab from the top menu
  2. From the left menu, click Natural Language > Thresholds & Configurations.
  3. Click Knowledge Graph.
  4. Locate Qualify Contextual Paths and set it to Yes.

Conversation Flows

The context tags available in the context object are used to customize the conversation flows.

These can be used as follows:

  • To pre-populate entity values.
  • To define transition conditions.
  • For custom conversation flow.

The Scripts to access the context tags are:

  • From the current context: context.currentTags.tags
  • From the previous context: context.historicTags[0].tags

Menu