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
Record Conversations
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 Management
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. Home
  2. Docs
  3. Virtual Assistants
  4. Overview
  5. Natural Language Processing (NLP)

Natural Language Processing (NLP)

Kore.ai virtual assistant platform enables one to build a conversational AI virtual assistant. Conversational AI is all about enabling a machine to have natural conversations with users. The key for a conversational bot 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 term here is understanding the natural language.

NLP (Natural Language Processing) is the science of deducing the intention and related information from natural conversations. The conversation flow in Kore.ai 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 Kore.ai virtual assistant and how you, as a developer, can leverage its features for an efficient and accurate bot response thus improving the user experience.

NLP Approach

The Kore.ai Bots platform employs a multi-pronged approach to natural language, which combines the following two 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): Kore.ai uses state-of-the-art NLP algorithms and models for machine learning.
  • Ontology-based Knowledge Graph Engine (KG): Kore.ai Knowledge Graph helps you turn your static FAQ text into an intelligent and personalized conversational experience.

With its three-fold approach, the Kore.ai Bots platform enables you to instantly build conversational bots that can respond to 70% of conversations with no language training to get started. It automatically enables the NLP capabilities to all built-in and custom bots, and powers the way chatbots communicate, understand, and respond to a user request.

Kore.ai NLP Building Blocks

When the Kore.ai Virtual Assistant 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 Kore.ai 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 based on an 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 for adding a 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 Kore.ai 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 then the winning intent is 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) also are crucial on 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 Kore.ai virtual assistant, but it needs some training on your part to ensure that the process proceeds as per your requirements. So, how to train a fully functional bot to achieve the best results? How to make maximum use of the above features?

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

Scoping

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

Following are the basic guidelines suggested while scoping the bot:

  • Start with a problem to solve – get a clear idea of what the bot is supposed to accomplish. Talk to the business analyst and the bot developers to understand the requirements and the actual functionality of the bot.
  • Create a list of Intents for the use cases – this would streamline the entire process
    • For each intent, identify the key results that the bot is aiming to accomplish
    • The focus should be on the needs of the user and 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, clarifying questions
    • You can leverage the Storyboard feature of the platform for this. If it has not been already used for the bot development phase, you can use it now
  • Ask what a person 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 Kore.ai platform offers three main engines for NLU

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

Which engine to use when? Each of these engines has settings and configurations. These are dealt with in detail elsewhere (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 bot. 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. And the training utterances need not be full sentences, ML can learn from phrases too.

If you have a large corpus for each intent that you are planning to implement, then go for 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 large corpus could differ depending on the intents. For example, if the intents are very different from each other without any commonality 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 Transfer funds and Pay bill (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 bot to answer user queries from documents, then go for Knowledge Collection. Knowledge Collection can also be used to trigger dialog tasks in response to user queries thus works as a double-edged sword.

If you have a lot of Intents but do not have time to prepare alternate utterances, but you can manually annotate some important terms, go for Knowledge Collection. But it is advisable to spend some time in 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 could use idiomatic sentences or command-like sentences or if you are not too strict and can live with some false positives then go for FM engine.

Menu