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

Dialog Tasks
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
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
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
ML Engine
Model Validation
FM Engine
KG Engine
Traits Engine
Ranking and Resolver
NLP Configurations
NLP Guidelines
Contextual Memory
Contextual Intents
Interruption Management
Multi-intent Detection
Amending Entities
Default Conversations
Sentinment Management
Tone Analysis
Test & Debug
Talk to Bot
Utterence Testing
Batch Testing
Conversation Testing
Conversations Dashboard
Performance Dashboard
Custom Dashboards
Meta Tags
Dashboards and Widgets
Conversation Flows
NLP Metrics
Containment Metrics
Usage Metrics
Smart Bots
Universal Bots
Universal Bot Definition
Universal Bot Creation
Training a Universal Bot
Universal Bot Customizations
Enabling Languages
Manage Assistant
Plan & Usage
Usage Plans
Support Plans
Multilingual Virtual Assistants
Masking PII Details
IVR Settings
General Settings
Assistant Management
Data Table
Table Views
App Definitions
Sharing Data Tables or Views

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

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

Assistant Admin Console
Administration Dashboard
User Management
Add Users
Manage Groups
Manage Roles
Assistant Management
Invite Users
Send Bulk Invites
Import User Data
Synchronize Users from AD
Security & Compliance
Using Single-Sign On
Security Settings
Cloud Connector
  1. Home
  2. Docs
  3. Virtual Assistants
  4. Overview
  5. Natural Language Processing (NLP)

Natural Language Processing (NLP)

Conversational AI is all about enabling a machine to have natural conversations with users. The key for a conversational VA to understand human interactions lies in its ability to identify the intention of the user (Intent Detection), extract useful information from their utterance (Entity Extraction), and map them to relevant actions or tasks (Dialog Task execution). The crucial idea here is understanding the natural language.understanding the natural language.

NLP is the science of deducing the intention and related information from natural conversations. The conversation flow in virtual assistants passes through various NLU engines and conversation engines before deciding upon action and response.

This document aims at providing an overview of the NLP flow within a virtual assistant and how you, as a developer, can leverage its features for an efficient and accurate VA response thus improving the user experience.

NLP Approach

The X Platform employs a multi-pronged approach to natural language, which combines the following three models for optimal outcomes:

  • Fundamental Meaning: A computational linguistics approach that is built on ChatScript. The model analyzes the structure of a user’s utterance to identify each word by meaning, position, conjugation, capitalization, plurality, and other factors.
  • Custom Machine Learning (ML): uses state-of-the-art NLP algorithms and models for machine learning.
  • Ontology-based Knowledge Graph Engine (KG): Knowledge Graph helps you turn your static FAQ text into an intelligent and personalized conversational experience.

With its three-fold approach, the XO Platform enables you to accelerate the NLU performance of the virtual assistant and achieve optimal NLU accuracy with relatively less training data. It automatically enables the NLP capabilities to all built-in and custom VAs, and powers the way they communicate, understand, and respond to a user request. NLP Building Blocks

When a virtual assistant built on the XO Platform receives a user utterance, it is processed to identify the user intent, extract any additional information, and then answer the user via a task execution. NLP is mostly concerned with the first two – intent detection and entity extraction.

Steps in a conversation flow:

  1. The user utterance goes through a series of NLU engines for entity extraction and intent detection. The various NLU engines provided by the XO Platform are as follows:
    • Fundamental Meaning Engine which breaks up the utterances based on the grammar constructs;
    • Machine Learning Engine which classifies individual words in the utterance example-based auto-learning training process;
    • Knowledge Collection Engine which mostly deals with FAQ type user queries, it can also be configured to trigger tasks in response to the user query;
    • Traits Engine which is a multiclass classifier and can identify multiple categories in user utterances thus aiding in refining user intent detection;
    • Small Talk Engine which adds human flavor to the conversations;
    • Ranking and Resolver to score the results from the above engines and rank them according to the set business rules.
  2. You can extend the above out-of-the-box NLU functionality to use your own NLU engine. You can install the Bot Kit SDK and easily integrate the virtual assistant with any 3rd party NLP engines. The output from the 3rd party NLP engine complements the outputs from the NLU engines thus adding to the efficiency and accuracy of the engine.
  3. The winning intent along with the entities extracted then passes through the conversation engine for the actual task execution. This engine maintains the state or context of the conversation with information like user details, the previous intents requested by the user, and any other information as tagged by the business rules which would aid in providing a near-human conversation experience. The conversation engine uses this state information along with the following conditions to accept or reject the intent identified by the NLU engines
    • Pre-conditions – if an intent has a set of predefined conditions configured and if any of these conditions are not satisfied the winning intent is then rejected. For example, bill payment intent should have the payee details available.
    • Negative patterns – to capture the presence of a pattern that should not identify a particular intent. For example “I lost my card, how do I apply for a new card” should, instead of triggering “Apply Card” intent, attempt to disable the current card and report fraudulent activity due to the presence of the phrase “lost my card”
    • Event handling – events defined for a welcome message, sentiment analysis, etc
  4. Other conditions like Interruption settings (to handle situations where another intent is identified during the course of an ongoing task) or Sentiment Analysis settings (user sounds angry and hence should be transferred to an agent) are crucial for the action to be taken.
  5. A response is generated and presented to the user based on the channel of interaction. The response could be a success message, information as requested by the user, or prompt for missing information.

NLP Training

In the previous section, we have seen the NLP process of the virtual assistant, but it needs some training on your part to ensure that the process proceeds as per your requirements. So, how do you train a fully functional VA to achieve the best results? How do you make maximum use of the features above?

We will see some basic guidelines for NLP training in this section, before going into the details of each of the NLU engines.


The first step in NLP training would be to define the scope of the VA, narrowing down the problem the Virtual Assistant will need to solve helps in configuring the various training nuances. This involves brainstorming sessions with various stakeholders like SMEs/BAs, Conversation Experience Designers, VA Developers, NLP Analysts/Data Engineers, NLP Trainers, and Testers.

Following are the basic guidelines suggested while scoping the VA:

  • Start with a problem to solve – get a clear idea of what the VA is supposed to accomplish. Talk to the business analyst and the VA developers to understand the requirements and the actual functionality of the Virtual Assistant.
  • Create a list of Intents for the use cases – this would streamline the entire process
    • For each intent, identify the key results that the VA is aiming to accomplish
    • The focus should be on the needs of the user, not the platform requirements
  • Detail out example conversations – both utterances and responses
    • What is the ideal Person in the room result
    • Think through edge cases, follow-ups, and clarifying questions
    • You can leverage the Storyboard feature of the platform if it has not been already used for the VA development phase
  • Braistorm what an end user might ask as a part of achieving the actions – these would be the alternate utterances for every intent. Try to include idiomatic and slang usage also.

Which Engine?

We have seen above that the platform offers three main engines for NLU

  • Machine Learning (ML)
  • Fundamental Meaning (FM)
  • Knowledge Collection (KG)

When do you use each engine? Each of these engines has settings and configurations. These are dealt with in detail elsewhere in the documentation.(see here for details). Here we will list out broad guidelines as to which engine to use when.

Machine Learning Engine

ML is the recommended engine for training a VA. The reason for this is its flexibility and auto-learn feature. Given a few examples, the engine learns and is capable of understanding similar new utterances. The training utterances need not be full sentences, as the ML can learn from phrases too.

If you have a large corpus for each intent that you are planning to implement, then use Machine Learning. Even if you don’t have a corpus it would be a good idea to develop one. In the long run, it is better to spend time building a large corpus and use ML rather than going for the other less time-consuming, easier options.

Definition of a large corpus could differ depending on the intents. For example, if the intents are very different from each other and can be understood using their sample data like “Get Balance” and “Transfer Funds“, then a corpus of 200-300 for each intent is sufficient. However, if intents are closer to each other like “Pay Bills” and “Transfer Funds” (they usually start with a very similar utterance “I want to pay….”), then the corpus should be in 1000s.

Similarly, if you are planning to use Deep Neural Networks, you need a higher number of samples for better predictions of both True Positives and True Negatives, as these networks are data-hungry.

Knowledge Collection Engine

If your intents are more query-like in nature than transactional tasks or if the content is in documents and you want the VA to answer user queries from documents, then use Knowledge Collection. Knowledge Collection can also be used to trigger dialog tasks in response to user queries thus working as a double-edged sword.

If you have a lot of Intents but do not have time to prepare alternate utterances, but you are able to manually annotate some important terms, use Knowledge Collection. It is advisable to spend some time building a corpus and going for ML since annotation in KG works in a similar way to ML’s auto-learning process.

Fundamental Meaning Engine

If you have cases where users use idiomatic sentences or command-like sentences or if you are not too strict and can live with some false positives then use the Fundamental Meaning (FM) engine.