Chatbot Overview
Conversational Bots
Intents & Entities
Intelligent Bots
Kore.ai's Approach
Kore.ai Conversational Platform
Bot Concepts and Terminology
Natural Language Processing (NLP)
Bot Types
Bot Tasks
Starting with Kore.ai Platform
How to Access Bot Builder
Working with Kore.ai Bot Builder
Building your first Bot
Getting Started with Building Bots
Using the Dialog Builder Tool
Creating a Simple Bot
Release Notes
Latest Updates
Older Releases
Deprecations
Bot Builder
Creating a Bot
Design
Develop
Storyboard
Dialog Task
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
Service Node
Custom Authentication
2-way SSL for Service nodes
Script Node
Agent Transfer Node
WebHook Node
Grouping Nodes
Connections & Transitions
Managing Dialogs
User Prompts
Alert Tasks
Alert Tasks
Ignore Words and Field Memory
Digital Forms
Digital Views
Knowledge Graph
Terminology
Building
Generation
Importing and Exporting
Analysis
Knowledge Extraction
Small Talk
Action & Information Task
Action Tasks
Information Tasks
Establishing Flows
Natural Language
Overview
Machine Learning
Model Validation
Fundamental Meaning
NLP Settings and Guidelines
Knowledge Graph Training
Traits
Ranking and Resolver
NLP Detection
Advanced NLP Configurations
Bot Intelligence
Overview
Context Management
Session and Context Variables
Context Object
Dialog Management
Sub-Intents & Follow-up Intents
Amend Entity
Multi-Intent Detection
Sentiment Management
Tone Analysis
Sentiment Management
Default Conversations
Default Standard Responses
Channel Enablement
Test & Debug
Talk to Bot
Utterance Testing
Batch Testing
Record Conversations
Publishing your Bot
Analyzing your Bot
Overview
Dashboard
Custom Dashboard
Conversation Flows
Bot Metrics
Advanced Topics
Bot Authorization
Language Management
Collaborative Development
IVR Integration
Data Table
Universal Bots
Defining
Creating
Training
Customizing
Enabling Languages
Smart Bots
Defining
Sample Bots
Github
Asana
Travel Planning
Flight Search
Event Based Bot Actions
koreUtil Libraries
Bot Settings
Bot Functions
General Settings
PII Settings
Customizing Error Messages
Manage Sessions
Bot Management
Bot Versioning
Using Bot Variables
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
Bot Administration
Bots Admin Console
Dashboard
User Management
Managing Users
Managing Groups
Managing Role
Bots Management
Enrollment
Inviting Users
Bulk Invites
Importing Users
Synchronizing Users from AD
Security & Compliance
Using Single Sign-On
Security Settings
Cloud Connector
Analytics
Billing
How Tos
Creating a Simple Bot
Creating a Banking Bot
Transfer Funds Task
Update Balance Task
Context Switching
Using Traits
Schedule a Smart Alert
Configure Digital 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
Using nlMeta
Global Variables
Content Variables
Using Bot Functions
Configure Agent Transfer
  1. Home
  2. Docs
  3. Bots
  4. How Tos
  5. How to Use Traits

How to Use Traits

In this How-To, we will explore a scenario in a Banking Bot, where traits can be used to steer the conversation flow in a more natural and predictable direction. For details on what Trait is and how it is implemented in the Kore.ai Bots platform, refer here.

Problem Statement

Consider the cases where the user is trying to report an issue or ask a question pertaining to “Transfer Funds”. The Bot will trigger the “Transfer Amount” intent as opposed to “Issue Resolution” or “FAQ regarding Funds Transfer”

Without Traits Knowledge:

Using Traits:

Without Traits Knowledge:

Using Traits:

In this document, we will show how Traits can be used to identify such situations and take appropriate action.

Pre-requisites

  • Bot building knowledge
  • A Banking Bot with the dialogs as mentioned below:
    • Transfer Funds – Dialog task prompting the user for Payer and Payee account numbers and the amount to be transferred and transferring the specified amount from the payer account to the payee account.
    • Issue Resolution – Dialog task to assist in any issues faced by the user. It would display a regret message and transfer to a Live Agent.
    • Knowledge Collection – A node “transfer funds” with an FAQ  “How do I transfer funds”

Implementation

Intent Detection using Traits

We will be using Trait to steer the conversation to “Issue Resolution” when the word “issue” is present in the User Utterance.

Steps:

  1. From Natural Language -> Training open the Traits page.
  2. Click Add New Trait. We will be using a trait to identify the existence of issue in the user utterance.
    1. Add a Trait Type as Problem Statement, and Traits as issue. A given Trait Type can have multiple Traits grouped together logically.
    2. Optionally you can add utterances for Issues as ‘problem’, ‘unable to’, and ‘not working’. These are the alternate words that user might use to indicate an issue.
    3. Save  the Trait.
  3. Click Add New Rule. We will be defining the intent that needs to be triggered in the presence of this Issue trait.
    1. Select IntentIssue Resolution to be triggered in presence of the trait.
    2. Add the Trait Rulesissue as the trait that should trigger the above selected intent.
    3. Save the Trait Mapping
  4. Train the Traits.
  5. Open the Issue Resolution Intent to see the Trait Rules under the NLP properties panel updated with the issue trait.
  6. Run the Bot and see the changed flow.

Knowledge Intent using Traits

Here we will see how to drive the query from user to appropriate FAQ instead of the dialog task.

Steps

  1. From Natural Language -> Training open Traits dialog.
  2. Click Add New Trait. We will be using a trait to identify the existence of question in the user utterance.
    1. Add a Trait Type as Enquiry, and Traits as ask. A given Trait Type can have multiple Traits grouped together logically.
    2. Optionally you can add utterances for Issues as ‘wondering’,  and ‘want to know’These are the alternate words that user might use to indicate an enquiry.
    3. Save  the Trait.
    4. Train the Traits.
  3. Associate the Trait to the FAQ
    1. Open the Knowledge Collection and hover over the node with the question pertaining to Transfer Funds.
    2. Click the Settings or gear icon
    3. Under Traits type and select ask trait.
  4. Run the Bot. You will see that the Bot is still going to the “Transfer Funds” intent.
  5. To understand the reason behind this:
    1. Open Traning -> Utterance Testing.
    2. Type the utterance, you will see that the Trait has been identified.
    3. Select the Ranking and Resolver. You will see that both the intent and FAQ were identified but the intent got a higher score.
  6. To ensure that the intent is not selected, we will add a Negative Pattern to the “Transfer Funds” intent.
    1. Under Natural Language -> Training open Advanced Settings.
    2. Enable Negative Patterns. This will add Negative Patterns tab.
    3. Select Negative Patterns.
    4. Search for “Transfer Funds” intent and add “know more” as the negative pattern. This will ensure that the ‘Transfer Funds’ intent is not identified when ‘know more‘ is present in the user utterance.
    5. Check the Utterance Training.
  7. Run the Bot and see the change.
Menu