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 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
Dynamic Intent Node
GenAI Node
GenAI Prompt
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
Terminology
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
Introduction
LLM Integration
Kore.ai XO GPT Module
Prompts & Requests Library
Co-Pilot Features
Dynamic Conversations Features
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
Asana
Configure
Templates
Azure OpenAI
Configure
Templates
BambooHR
Configure
Templates
Bitly
Configure
Templates
Confluence
Configure
Templates
DHL
Configure
Templates
Freshdesk
Configure
Templates
Freshservice
Configure
Templates
Google Maps
Configure
Templates
Here
Configure
Templates
HubSpot
Configure
Templates
JIRA
Configure
Templates
Microsoft Graph
Configure
Templates
Open AI
Configure
Templates
Salesforce
Configure
Templates
ServiceNow
Configure
Templates
Stripe
Configure
Templates
Shopify
Configure
Templates
Twilio
Configure
Templates
Zendesk
Configure
Templates
Agents
Agent Transfer Overview
Custom (BotKit)
Drift
Genesys
Intercom
NiceInContact
NiceInContact(User Hub)
Salesforce
ServiceNow
Configure Tokyo and Lower versions
Configure Utah and Higher versions
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
LLM and Generative AI Logs
NLP Insights
Task Execution Logs
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
Team Collaboration
Plan & Usage
Overview
Usage Plans
Templates
Support Plans
Invoices
Authorization
Conversation Sessions
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
Rate Limits
API List
koreUtil Libraries
SDK Reference
SDK Introduction
Web SDK
How the Web SDK Works
SDK Security
SDK Registration
Web Socket Connect and RTM
Tutorials
Widget SDK Tutorial
Web SDK Tutorial
BotKit SDK
BotKit SDK Deployment Guide
Installing the BotKit SDK
Using the BotKit SDK
SDK Events
SDK Functions
Tutorials
BotKit - Blue Prism
BotKit - Flight Search Sample VA
BotKit - Agent Transfer
  1. Home
  2. Docs
  3. Virtual Assistants
  4. Advanced Topics
  5. Tone Analysis

Tone Analysis

The XO Platform Natural Language Processing (NLP) interpreter can parse user utterances for specific words and phrases, and then provide an average tone score based on the connotation, word placement, and any added modifiers. You can use the score to help assess the user input and direct the flow of the conversation between the Virtual Assistant and the user.

For example, if the tone score indicates a user is angry or sad, you want to transition the conversation to a live agent. In a dialog task, you can access the tone score from the Context object or you can configure events to be triggered, from the Sentiment Management option under Intelligence.

Tones Types

The Kore.ai XO Platform evaluates user inputs to find the following six possible emotions:

  • angry
  • disgust
  • fear
  • sad
  • joy
  • positive – A special tone used to evaluate the general positivity of an utterance.

The XO Platform tone algorithm provides a nuanced overview of the user utterance tone by not making the emotions mutually exclusive. For example, an input could yield a high score for fear and a mild score for sadness. Another input could yield a very high score for joy while having a negative score for sadness.

Post v8.1, the platform can identify the emojis in user utterance and set the tone accordingly.

Score Tone Emotions

The XO Platform scores a tone emotion on a scale range of -3 to +3 where positive values represent an expressed tone emotion and a negative value represents a suppressed tone emotion.

For positive values, the tone emotion is explicitly communicated, while negative values are explicitly negated.

For example, a user’s utterance, I am happy about this news, returns a positive tone score for joy, while I am not happy about this news returns a negative score for joy.

The following scale shows the relationship of the score to the level of positive expression of the tone emotion or negative suppression of the tone emotion.

  • +3 – The user definitely expressed the tone emotion.
  • +2 – The user expressed the tone emotion.
  • +1 – The user likely expressed the tone emotion.
  • 0 – The user tone emotion is neutral.
  • -1 – The user likely suppressed the tone emotion.
  • -2 – The user suppressed the tone emotion.
  • -3 – The user definitely suppressed the tone emotion.

About Tone Scores

The overall tone score is calculated as a function of the base tone value and any tone modifiers. Modifiers are generally adverbs or adjectives that supplement a tone emotion word, either to increase or decrease the base tone score.

For example, a user’s utterance, I am extremely disappointed, returns a higher tone score for the angry tone emotion than if the user utterance is I am disappointed. Conversely, a user utterance of I am not disappointed negates the tone emotion and the tone score.

The value of the base tone and modifiers are used to calculate the final tone score for each tone emotion. The tone analyzer compiles all base tones based on the tone emotion type and then calculates the average score of each tone emotion type in the current dialog task node and the tone total score since the last reset.

Tone results are returned as Context object variables as:

  • message_tone – An array of recognized tone emotions and scores for the current node in a dialog task.
  • dialog_tone – An array of average recognized tone emotions and scores for the entire conversation session. This value is reset at the end of each conversation session.

Each variable is populated with key/value pairs for each recognized tone emotion. Key/value pairs are not returned if a tone is not detected for an emotion. However, the NLP engine returns a tone score of 0 when a tone is recognized as neutral. When you access tone variables in the Context object, you must be able to handle positive, negative, zero, as well as undefined results.

Examples

message_tone
   0
      tone_name : positive
      level : 2
   1
      tone_name : disgust
      level : -2
   2
      tone_name : angry
      level : -2
dialog_tone
   0
      tone_name : angry
      level : -3
   1
      tone_name : sad
      level : -3
   2
      tone_name : positive
      level : 3
   3
      tone_name : joy
      level : 3

Here are some examples of test sentences with their associated tone emotion scores:
I don’t think that this is a good idea and I am not happy with how it came out, especially because of your attitude.

dialog_tone
   0
      tone_name : joy
      count : 1
      level : 0.67
   1
      tone_name : sad
      count : 1
      level : 0.5
   2
      tone_name : angry
      count : 1
      level : 0.5

This is a great idea! I’m super excited already.

dialog_tone
   0
      tone_name : joy
      count : 1
      level : 3
   1
      tone_name : sad
      count : 1
      level : 2.8
   2
      tone_name : angry
      count : 1
      level : -3
}

This was a funny and casually well-written book, a good read. But it’s a little frustrating because it abandons the narrative, if you will, without finishing it.

dialog_tone
   0
      tone_name : joy
      count : 1
      level : 1.5
   1
      tone_name : sad
      count : 1
      level : -1.5
   2
      tone_name : angry
      count : 1
      level : -1

You can access and use tone scores to help drive the flow of your dialog task using conditional transition statements. For example,

if context.message_tone.angry > 2.0
    then goTo liveAgent

For more information, refer to Context Object.

Adding Sentiment Words to Concepts

For identifying the tone and analyzing the sentiment of a user utterance/phrase, you can add those utterances in the Concepts.

The sentiment words are all stored in concepts and it is possible for a virtual assistant to extend the concepts by entering appropriate new words under the relevant concept name, during the concept training.

The syntax for the concept name is: ~tone-<tonename>-<level>, where <tonename> indicates any of the 6 tone types listed in Tone Types and <level> is a number from 1 to 7. 1 is equivalent to a -3, 7 is +3, and 4 is the neutral 0. Learn more.

Note: Apart from the basic tone words, sentiment analysis also uses words that can increase or decrease intensity, like “very” or “extremely”. However, you don’t have to add different phrases covering all the possibilities for various levels. Just add a basic tone word, and these intensifiers will adjust the level automatically.

The following are some examples of words that can be mapped to relevant concepts.

  • The word freaking could be defined as a synonym under ~tone-angry-7, which indicates real bad anger.
  • The word Yikes! could be defined as a synonym under ~tone-angry-5, which indicates a bit angry.
  • The word please would come under ~tone-angry-4 which indicates a neutral tone.
  • The word Thanks! indicates a happy tone and could be defined as a synonym under ~tone-angry-1, which is mapped to not angry at all tone.

Tone Analysis

The XO Platform Natural Language Processing (NLP) interpreter can parse user utterances for specific words and phrases, and then provide an average tone score based on the connotation, word placement, and any added modifiers. You can use the score to help assess the user input and direct the flow of the conversation between the Virtual Assistant and the user.

For example, if the tone score indicates a user is angry or sad, you want to transition the conversation to a live agent. In a dialog task, you can access the tone score from the Context object or you can configure events to be triggered, from the Sentiment Management option under Intelligence.

Tones Types

The Kore.ai XO Platform evaluates user inputs to find the following six possible emotions:

  • angry
  • disgust
  • fear
  • sad
  • joy
  • positive – A special tone used to evaluate the general positivity of an utterance.

The XO Platform tone algorithm provides a nuanced overview of the user utterance tone by not making the emotions mutually exclusive. For example, an input could yield a high score for fear and a mild score for sadness. Another input could yield a very high score for joy while having a negative score for sadness.

Post v8.1, the platform can identify the emojis in user utterance and set the tone accordingly.

Score Tone Emotions

The XO Platform scores a tone emotion on a scale range of -3 to +3 where positive values represent an expressed tone emotion and a negative value represents a suppressed tone emotion.

For positive values, the tone emotion is explicitly communicated, while negative values are explicitly negated.

For example, a user’s utterance, I am happy about this news, returns a positive tone score for joy, while I am not happy about this news returns a negative score for joy.

The following scale shows the relationship of the score to the level of positive expression of the tone emotion or negative suppression of the tone emotion.

  • +3 – The user definitely expressed the tone emotion.
  • +2 – The user expressed the tone emotion.
  • +1 – The user likely expressed the tone emotion.
  • 0 – The user tone emotion is neutral.
  • -1 – The user likely suppressed the tone emotion.
  • -2 – The user suppressed the tone emotion.
  • -3 – The user definitely suppressed the tone emotion.

About Tone Scores

The overall tone score is calculated as a function of the base tone value and any tone modifiers. Modifiers are generally adverbs or adjectives that supplement a tone emotion word, either to increase or decrease the base tone score.

For example, a user’s utterance, I am extremely disappointed, returns a higher tone score for the angry tone emotion than if the user utterance is I am disappointed. Conversely, a user utterance of I am not disappointed negates the tone emotion and the tone score.

The value of the base tone and modifiers are used to calculate the final tone score for each tone emotion. The tone analyzer compiles all base tones based on the tone emotion type and then calculates the average score of each tone emotion type in the current dialog task node and the tone total score since the last reset.

Tone results are returned as Context object variables as:

  • message_tone – An array of recognized tone emotions and scores for the current node in a dialog task.
  • dialog_tone – An array of average recognized tone emotions and scores for the entire conversation session. This value is reset at the end of each conversation session.

Each variable is populated with key/value pairs for each recognized tone emotion. Key/value pairs are not returned if a tone is not detected for an emotion. However, the NLP engine returns a tone score of 0 when a tone is recognized as neutral. When you access tone variables in the Context object, you must be able to handle positive, negative, zero, as well as undefined results.

Examples

message_tone
   0
      tone_name : positive
      level : 2
   1
      tone_name : disgust
      level : -2
   2
      tone_name : angry
      level : -2
dialog_tone
   0
      tone_name : angry
      level : -3
   1
      tone_name : sad
      level : -3
   2
      tone_name : positive
      level : 3
   3
      tone_name : joy
      level : 3

Here are some examples of test sentences with their associated tone emotion scores:
I don’t think that this is a good idea and I am not happy with how it came out, especially because of your attitude.

dialog_tone
   0
      tone_name : joy
      count : 1
      level : 0.67
   1
      tone_name : sad
      count : 1
      level : 0.5
   2
      tone_name : angry
      count : 1
      level : 0.5

This is a great idea! I’m super excited already.

dialog_tone
   0
      tone_name : joy
      count : 1
      level : 3
   1
      tone_name : sad
      count : 1
      level : 2.8
   2
      tone_name : angry
      count : 1
      level : -3
}

This was a funny and casually well-written book, a good read. But it’s a little frustrating because it abandons the narrative, if you will, without finishing it.

dialog_tone
   0
      tone_name : joy
      count : 1
      level : 1.5
   1
      tone_name : sad
      count : 1
      level : -1.5
   2
      tone_name : angry
      count : 1
      level : -1

You can access and use tone scores to help drive the flow of your dialog task using conditional transition statements. For example,

if context.message_tone.angry > 2.0
    then goTo liveAgent

For more information, refer to Context Object.

Adding Sentiment Words to Concepts

For identifying the tone and analyzing the sentiment of a user utterance/phrase, you can add those utterances in the Concepts.

The sentiment words are all stored in concepts and it is possible for a virtual assistant to extend the concepts by entering appropriate new words under the relevant concept name, during the concept training.

The syntax for the concept name is: ~tone-<tonename>-<level>, where <tonename> indicates any of the 6 tone types listed in Tone Types and <level> is a number from 1 to 7. 1 is equivalent to a -3, 7 is +3, and 4 is the neutral 0. Learn more.

Note: Apart from the basic tone words, sentiment analysis also uses words that can increase or decrease intensity, like “very” or “extremely”. However, you don’t have to add different phrases covering all the possibilities for various levels. Just add a basic tone word, and these intensifiers will adjust the level automatically.

The following are some examples of words that can be mapped to relevant concepts.

  • The word freaking could be defined as a synonym under ~tone-angry-7, which indicates real bad anger.
  • The word Yikes! could be defined as a synonym under ~tone-angry-5, which indicates a bit angry.
  • The word please would come under ~tone-angry-4 which indicates a neutral tone.
  • The word Thanks! indicates a happy tone and could be defined as a synonym under ~tone-angry-1, which is mapped to not angry at all tone.
Menu