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. Natural Language
  5. Traits

Traits

In natural conversations, it is very common that a user provides background/relevant information while describing a specific scenario. Traits are specific entities, attributes, or details that the users express in their conversations. The utterance may not directly convey any specific intent, but the traits present in the utterance are used in driving the intent detection and bot conversation flows.

For example, the utterance: My flight is late and I will miss my connection because of it expresses two traits: flight delay and emergency. In this scenario, the utterance does not convey any direct intent. However, the presence of the emergency trait is used to directly assign the conversation to a human agent.

The Traits feature of the XO Platform is aimed at identifying such characteristics present in user utterances and use them for intent detection and in customizing the VA definition using these characteristics.

How Traits work

Traits are entities that can be extracted from user input, before intent recognition. They can be used in multiple scenarios

  • They are involved in Indirect entity extraction, e.g.: gender or age-specific words can be inferred from the text.  A phrase such as: “Seat in front of the plane with extra legroom” implies, for example, a First Class seat.
  • Traits can be used for intent recognition, using rules. Any rule match for intent will be considered a definitive match.
  • Traits can be identified based on keywords/phrases and their synonyms. For Example, Trait-Color: Blue – “Blue”, “Sapphire”, “Teal”; Trait-Color-Red – Red, Maroon, Crimson Trait-Status: NotWorking: “doesn’t work”, “switched off”;  Trait-Status:Working: “working”, “turned on”
  • Traits can also be inferred from a keyword or specific phrase in the sentence. There is no obvious association between certain words in the sentence and the value of the entity, but rather you need the sentence as a whole to determine the value. For example, Trait-Greeting-Emotion: Positive – “Good Morning”, “How are you”;  Trait-Greeting-Emotion: Negative – “I hate to say”, “I am not having trouble”.

Configuring Traits involves:

  • Trait Definition
  • Trait Association Rules
  • Trait Detection

We will discuss these in detail throughout this article, but first, let us look at a use case for traits.

Use Case

A Travel Planning VA might have an added requirement to book a flight based on the cost preference.

You might have the following user utterance: I am looking for a low-cost option to London, which must result in ordering the available flights and picking the lowest-priced ticket.

This can be achieved by:

  • Adding a Trait Type called Flight Fare with Trait Economy trained with the utterance low cost.
  • Adding a Rule for book flight to be triggered in the presence of Economy Trait.
  • Add transition conditions in case Trait Economy is present in the context.

Trait Definition

To define Traits:

  1. Select the VA that you want to work with,
  2. Go to Build > Natural Language > Training > Traits

 

Following are the key features to be considered while defining Traits:

  1. Trait Type is a collection of related traits like Travel Class in the above example.
    1. Trait Type can be ML Based or Pattern Based. Each trait of a trait type can be trained using words, phrases, utterances, or patterns based on the type. Manage Trait Type allows you to define the training configuration. See below for ML-based trait configuration.
    2. A Trait Type can have one or more Traits.

  2. Traits names should be unique in a group. But traits with the same name can be present in multiple groups.
    1. For ML-based Traits, you can define the words, phrases, or utterances that identify the trait. One trait per trait type is detected for ML-based trait types.
    2. For Pattern-based Traits, you can define the patterns associated with the given trait. There is a possibility of multiple traits getting detected for pattern-based trait types. Ordering of Traits within the Trait Type signifies the importance of a trait in a trait type and detects only one trait.
  3. Note: The latest version of the Platform supports a new patterns engine flag for performance optimization. It offers better response times for pattern evaluation after the virtual assistant training is done.

  4. Once added, Train the assistant for the Traits to be detected from user utterances.

Notes:

  1. You can add language-specific traits in the case of multi-lingual assistants.
  2. When a trait name is modified, ensure that all the rules defined using that trait are corrected. This has to be done manually, the Platform will not handle it automatically.
  3. The trait name must be unique in a group.
  4. Traits with the same name can be present in multiple groups, but distinguishing them in trait rules or trait detection results is difficult.

 

The ML Model for Traits

When choosing to train traits using the ML model, by default, the n-gram model is used. An n-gram is the contiguous sequence of words used from training sentences to train the model. But this might not be effective when the corpus is very less or when the training sentences, in general, contain fewer words.

From v8.0 of the platform, an option is included to skip or use the n-gram model. Further, the option to parameterize the n-gram algorithm is included.

  • When the n-gram option is selected, you can configure the n-gram Sequence Length by setting the maximum value of the n-gram. It is set to 1 by default and can be configured to any integer value between 1 and 5.
  • When skip-gram is selected, you can configure
    • Sequence Length specifying the number of words to be included in a non-consecutive sequence. It is set to 2 by default and it can take any integer value between 2 and 4.
    • Maximum Skip Distance for the number of words that can be skipped to form a non-consecutive sequence of words. This value is set to 1 by default and can take any integer value from 1 to 3.

Note: While the settings are same for all languages (in case of multilingual bot), for some languages like Chinese and Korean sequence of characters from grams and for other (Latin-based) languages are word grams.

 

Trait Association Rules

Trait Rules define Dialog Execution and Knowledge Graph Intent detection.

 

Dialog Execution

Intent detection or Dialog execution is achieved using traits, along with the ML utterances and patterns. To achieve this, intent must be associated with the required traits by adding Rules.

There are multiple ways to add rules:

  1. From the Traits section using the Add New Rule link.

  2. From the Intent Node using the Rules section under the NLP Properties.

  3. From the Rules tab for a given Intent, under Build > Natural Language > Training.

Each rule can have one or more conditions with AND as the operator. Multiple trait rules can be defined for a given intent and the intent is considered as a definite match if any one of the rules matches.

 

Knowledge Graph Intents

The Knowledge Graph can also be part of the discovery process using Traits. For this, each term or node can be associated with a trait. A given term can be associated with a single Trait.

Trait Detection

Only one trait from a group (trait type) will be detected and is considered as a definite match.

Traits detected are included in the context object. The context is populated with unique traits identified (without reference to trait type). This information can be used in:

  • Intent identification
  • Dialog transition
  • Entity population
  • VA definitions

Batch Testing reports also include information about traits detected as do the Find Intent API.

Intent Detection

The Ranking and Resolver gets input from the three NL engines and Traits to analyze and come up with the possible/definitive matches.

  • The intent is considered as a definite match only if all the traits (one in the case of Knowledge Graph) present in a trait rule are detected.
  • NL Analysis includes information on traits detected and the NLP Flow shows the information about traits detected.

Dialog Transition

The Conversation Flow is controlled using Traits. For a Dialog, Connection Rules are defined using the Trait Context. This is done from the Connection tab under the Properties Panel for the Dialog.

The Traits Context is accessed using context.traits. It returns an array of all traits matching the intent, hence the condition to be used is ‘contains’.

Traits

In natural conversations, it is very common that a user provides background/relevant information while describing a specific scenario. Traits are specific entities, attributes, or details that the users express in their conversations. The utterance may not directly convey any specific intent, but the traits present in the utterance are used in driving the intent detection and bot conversation flows.

For example, the utterance: My flight is late and I will miss my connection because of it expresses two traits: flight delay and emergency. In this scenario, the utterance does not convey any direct intent. However, the presence of the emergency trait is used to directly assign the conversation to a human agent.

The Traits feature of the XO Platform is aimed at identifying such characteristics present in user utterances and use them for intent detection and in customizing the VA definition using these characteristics.

How Traits work

Traits are entities that can be extracted from user input, before intent recognition. They can be used in multiple scenarios

  • They are involved in Indirect entity extraction, e.g.: gender or age-specific words can be inferred from the text.  A phrase such as: “Seat in front of the plane with extra legroom” implies, for example, a First Class seat.
  • Traits can be used for intent recognition, using rules. Any rule match for intent will be considered a definitive match.
  • Traits can be identified based on keywords/phrases and their synonyms. For Example, Trait-Color: Blue – “Blue”, “Sapphire”, “Teal”; Trait-Color-Red – Red, Maroon, Crimson Trait-Status: NotWorking: “doesn’t work”, “switched off”;  Trait-Status:Working: “working”, “turned on”
  • Traits can also be inferred from a keyword or specific phrase in the sentence. There is no obvious association between certain words in the sentence and the value of the entity, but rather you need the sentence as a whole to determine the value. For example, Trait-Greeting-Emotion: Positive – “Good Morning”, “How are you”;  Trait-Greeting-Emotion: Negative – “I hate to say”, “I am not having trouble”.

Configuring Traits involves:

  • Trait Definition
  • Trait Association Rules
  • Trait Detection

We will discuss these in detail throughout this article, but first, let us look at a use case for traits.

Use Case

A Travel Planning VA might have an added requirement to book a flight based on the cost preference.

You might have the following user utterance: I am looking for a low-cost option to London, which must result in ordering the available flights and picking the lowest-priced ticket.

This can be achieved by:

  • Adding a Trait Type called Flight Fare with Trait Economy trained with the utterance low cost.
  • Adding a Rule for book flight to be triggered in the presence of Economy Trait.
  • Add transition conditions in case Trait Economy is present in the context.

Trait Definition

To define Traits:

  1. Select the VA that you want to work with,
  2. Go to Build > Natural Language > Training > Traits

 

Following are the key features to be considered while defining Traits:

  1. Trait Type is a collection of related traits like Travel Class in the above example.
    1. Trait Type can be ML Based or Pattern Based. Each trait of a trait type can be trained using words, phrases, utterances, or patterns based on the type. Manage Trait Type allows you to define the training configuration. See below for ML-based trait configuration.
    2. A Trait Type can have one or more Traits.

  2. Traits names should be unique in a group. But traits with the same name can be present in multiple groups.
    1. For ML-based Traits, you can define the words, phrases, or utterances that identify the trait. One trait per trait type is detected for ML-based trait types.
    2. For Pattern-based Traits, you can define the patterns associated with the given trait. There is a possibility of multiple traits getting detected for pattern-based trait types. Ordering of Traits within the Trait Type signifies the importance of a trait in a trait type and detects only one trait.
  3. Note: The latest version of the Platform supports a new patterns engine flag for performance optimization. It offers better response times for pattern evaluation after the virtual assistant training is done.

  4. Once added, Train the assistant for the Traits to be detected from user utterances.

Notes:

  1. You can add language-specific traits in the case of multi-lingual assistants.
  2. When a trait name is modified, ensure that all the rules defined using that trait are corrected. This has to be done manually, the Platform will not handle it automatically.
  3. The trait name must be unique in a group.
  4. Traits with the same name can be present in multiple groups, but distinguishing them in trait rules or trait detection results is difficult.

 

The ML Model for Traits

When choosing to train traits using the ML model, by default, the n-gram model is used. An n-gram is the contiguous sequence of words used from training sentences to train the model. But this might not be effective when the corpus is very less or when the training sentences, in general, contain fewer words.

From v8.0 of the platform, an option is included to skip or use the n-gram model. Further, the option to parameterize the n-gram algorithm is included.

  • When the n-gram option is selected, you can configure the n-gram Sequence Length by setting the maximum value of the n-gram. It is set to 1 by default and can be configured to any integer value between 1 and 5.
  • When skip-gram is selected, you can configure
    • Sequence Length specifying the number of words to be included in a non-consecutive sequence. It is set to 2 by default and it can take any integer value between 2 and 4.
    • Maximum Skip Distance for the number of words that can be skipped to form a non-consecutive sequence of words. This value is set to 1 by default and can take any integer value from 1 to 3.

Note: While the settings are same for all languages (in case of multilingual bot), for some languages like Chinese and Korean sequence of characters from grams and for other (Latin-based) languages are word grams.

 

Trait Association Rules

Trait Rules define Dialog Execution and Knowledge Graph Intent detection.

 

Dialog Execution

Intent detection or Dialog execution is achieved using traits, along with the ML utterances and patterns. To achieve this, intent must be associated with the required traits by adding Rules.

There are multiple ways to add rules:

  1. From the Traits section using the Add New Rule link.

  2. From the Intent Node using the Rules section under the NLP Properties.

  3. From the Rules tab for a given Intent, under Build > Natural Language > Training.

Each rule can have one or more conditions with AND as the operator. Multiple trait rules can be defined for a given intent and the intent is considered as a definite match if any one of the rules matches.

 

Knowledge Graph Intents

The Knowledge Graph can also be part of the discovery process using Traits. For this, each term or node can be associated with a trait. A given term can be associated with a single Trait.

Trait Detection

Only one trait from a group (trait type) will be detected and is considered as a definite match.

Traits detected are included in the context object. The context is populated with unique traits identified (without reference to trait type). This information can be used in:

  • Intent identification
  • Dialog transition
  • Entity population
  • VA definitions

Batch Testing reports also include information about traits detected as do the Find Intent API.

Intent Detection

The Ranking and Resolver gets input from the three NL engines and Traits to analyze and come up with the possible/definitive matches.

  • The intent is considered as a definite match only if all the traits (one in the case of Knowledge Graph) present in a trait rule are detected.
  • NL Analysis includes information on traits detected and the NLP Flow shows the information about traits detected.

Dialog Transition

The Conversation Flow is controlled using Traits. For a Dialog, Connection Rules are defined using the Trait Context. This is done from the Connection tab under the Properties Panel for the Dialog.

The Traits Context is accessed using context.traits. It returns an array of all traits matching the intent, hence the condition to be used is ‘contains’.

Menu