Chatbot Overview
Conversational Bots
Intents & Entities
Intelligent Bots's Approach Conversational Platform
Bot Concepts and Terminology
Natural Language Processing (NLP)
Bot Types
Bot Tasks
Starting with Platform
How to Access Bot Builder
Working with 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
Bot Builder
Creating a Bot
Dialog Task
Working with User Intent Node
Working with the Dialog Node
Working with Entity Node
Supported Entity Types
Working with Composite Entities
Supported Time Zones
Supported Colors
Supported Company Names
Working with Message Nodes
Working with the Confirmation Nodes
Working with Service Node
Implementing Custom Authentication
Enabling 2-way SSL for Service nodes
Working with Script Node
Working with Agent Transfer Node
Working with WebHook Node
Defining Connections & Transitions
Managing Dialogs
Prompt Editor
Action & Information Task
Working with Action Tasks
Working with Information Tasks
Establishing Flows
Alert Tasks
Working with Alert Tasks
Managing Ignore Words and Field Memory
Knowledge Graph
Building Knowledge Graph
Generation of Knowledge Graph
Importing and Exporting Knowledge Graph
Knowledge Graph Analysis
Knowledge Extraction
Natural Language
Machine Learning
ML Model
Fundamental Meaning
Knowledge Graph Training
Ranking and Resolver
NLP Detection
NLP Settings and Guidelines
Bot Intelligence
Context Management
Session and Context Variables
Context Object
Dialog Management
Amend Entity
Multi-Intent Detection
Sentiment Management
Tone Analysis
Sentiment Management
Default Conversations
Default Standard Responses
Channel Enablement
Test & Debug
Talking to Bot
Utterance Testing
Batch Testing
Recording Conversations
Publishing your Bot
Analyzing your Bot
Custom Dashboard
Conversation Flows
Bot Metrics
Advanced Topics
Bot Authorization
Language Management
Collaborative Development
IVR Integration
Universal Bots
Enabling Languages
Smart Bots
Sample Bots
Travel Planning
Flight Search
Event Based Bot Actions
Bot Settings
Bot Functions
General Settings
PII Settings
Customizing Error Messages
Bot Management
Using Bot Variables
API Guide
API Overview
API List
API Collection
SDK Overview
SDK Security
SDK App Registration Web SDK Tutorial
Message Formatting and Templates
Mobile SDK Push Notification
Web Socket Connect & RTM
Using the BotKit SDK
Installing the BotKit SDK
BotKit SDK Configuration
Events for the BotKit SDK
Functions for the BotKit SDK
BotKit SDK Tutorial – Agent Transfer
BotKit SDK Tutorial – Flight Search Sample Bot
Using an External NLP Engine
Bot Administration
Bots Admin Console
User Management
Managing Users
Managing Groups
Managing Role
Bots Management
Inviting Users
Sending Bulk Invites to Enroll Users
Importing Users and User Data
Synchronizing Users from Active Directory
Security & Compliance
Using Single Sign-On
Cloud Connector
How Tos
Context Switching
Using Traits
Live Agent Transfer
Schedule a Smart Alert
Configure Agent Transfer
Custom Dashboard
Patterns for Intents & Entities
Build Knowledge Graph
  1. Home
  2. Docs
  3. Bots
  4. Bot Building
  5. Knowledge Graph
  6. Knowledge Graph

Knowledge Graph’s Knowledge Graph helps you turn your static FAQ text into an intelligent, personalized conversational experience. It goes beyond the usual practice of capturing FAQs in the form of flat question-answer pairs. Instead, Knowledge Graph enables you to create an ontological structure of key domain terms and associate them with context-specific questions and their alternatives, synonyms, and Machine learning-enabled traits. This Graph, when trained by the platform, enables an intelligent FAQ experience.

This document talks of the concepts, terminology and implementation of Knowledge Graph. For a use case driven approach to Knowledge Graph, refer here.

Why Knowledge Graph

Any query can be expressed in multiple ways by the user. It is a difficult task for you to visualize and add all the alternative questions manually. designed Knowledge Graph with nodes, tags, and synonyms which would make the work easier for you to cover all the possible matches. The Knowledge Graph can handle various alternate questions with the training using the nodes, tags, and synonyms.

Whenever a question is asked by the user the node names in the Knowledge Graph will be checked and matched with the keywords from the question. Node names, tags, and synonyms will be checked and based on the score, the best possible intent will be presented to the user which can take the form of either a simple response or execution of a dialog task.

This way, you can add a very few completely different alternative questions in the FAQ and provide tags, synonyms and node names appropriately such that any untrained question can also be matched. The performance and intelligence of the Knowledge Graph depend on the way you train it with the appropriate node names, tags, and synonyms.


This document is intended to familiarize the reader with the terms used in building Knowledge Graph.

Jump directly to KG Creation.

Terms or Nodes

Terms or Nodes are the building blocks of an ontology and they can be used to define the fundamental concepts and categories of a business domain.

As shown in the image below, you can organize the terms on the left-hand panel of the Bot Ontology window in a hierarchical order to represent the flow of information in your organization. You can create, organize, edit, and delete terms from there.

For easier representation, we identify some special nodes using the following names:

Root Node

Root node forms the topmost term of your Bot Ontology. A Knowledge Graph consists of only one root node and all other nodes in the ontology become its child nodes. Root node takes the name of the bot by default, but you can change it if you want. This node is not used for node qualification or processing. The path qualification starts from first level nodes.

First-level Nodes

The immediate next level nodes of the root node are known as First-level nodes. There can be any number of First-level nodes in a collection. It is recommended to keep First-level nodes to represent high-level terms such as the names of departments or functionality. Examples – Personal Banking, Online Banking, and Corporate Banking.

Leaf Node

Any node to which question-answer set or dialog task is added is called a Leaf Node, be it at any level.

Node Relation

Depending on their position in the ontology, a node can be referred to as first-level nodes, second-level nodes, etc.. A first-level node is in simple terms a category that may have one or more subcategories under it, called the second-level nodes.

Examples: Loan is the first-level node of Home Loan and Personal Loan. Personal Loan can again have two subcategory nodes: Rate and Fees, Help and Support.

Note: This hierarchical organization of nodes is just for your convenience alone, to keep related questions together. Knowledge Graph Engine does not consider any parent-child relation while evaluating the questions for a match. The hierarchy does not in any way influence the FAQ matching processing, since all the nodes will be considered the same way irrespective of their position in the FAQ organization.


For each term/node you can add custom tags. Tags work exactly like terms but are not displayed in the Knowledge Graph ontology to avoid clutter. You can add synonyms and traits to tags as you do to terms.


Users would use a variety of alternatives for the terms of your ontology. Knowledge Graph allows you to add synonyms for the terms to include all possible alternative forms of the terms. Adding synonyms also reduces the need for training the bot with alternative questions.

For example, the Internet Banking node may have the following synonyms added to it: Online Banking, e-banking, E-banking, Cyberbanking, and Web banking.

When you add a synonym for a term in the Knowledge Graph, you can add them as local or global synonyms. Local synonyms apply to the term only in that particular path, whereas global synonyms apply to the term even if it appears on any other path in the ontology.


Note: From ver 7.0, Traits replace Classes of ver 6.4 and before.

A trait is a collection of typical end-user utterances that define the nature of a question when they ask for information related to a particular intent. See here for more on traits.

A trait can be applied to multiple terms across your Bot Ontology.

Note: Traits also help you filter nodes based on associated user utterances. So, if the user types an utterance that is present in a trait, the bot only searches the nodes to which the trait is applied. If the utterance is present in any other node to which the trait is not applied, the node is ignored by the bot.


A question may be asked differently by different users and to support this, you may associate multiple alternate forms for each question.

Bot can respond to a given question from the user either with an execution of a Dialog Task or an FAQ.

  • FAQ: The question-answer pairs must be added to relevant nodes in your bot ontology.
  • Task: Linking a Dialog task to a KG Intent helps to leverage the capabilities of the Knowledge Graph and Dialog tasks to handle FAQs that involve complex conversations.

Improving Performance

Though Knowledge Graph engine works well with the default settings, you, as a Bot developer, can fine-tune the KG engine performance in many ways:

  1. Configure Knowledge Graph properly by defining terms, synonyms, primary and alternative questions or user utterances. Though hierarchy does not affect the KG engine performance, it does help in organizing and guiding the working of the KG engine.
  2. Setting the following parameters:
    • Path Coverage – Define the minimum percentage of terms in the user’s utterance to be present in a path to qualify it for further scoring.
    • Definite Score for KG – Define minimum score for a KG intent match to be considered as a definite match and discard any other intent matches found.
    • Minimum and Definitive Level for Knowledge Tasks – Define minimum and definitive threshold to identify and respond in case of a Knowledge task.
    • KG Suggestions Count – Define the maximum number of KG / FAQ suggestions to be presented when a definite KG intent match is not available.
    • The proximity of Suggested Matches – Define the maximum difference to be allowed between top-scoring and immediate next suggested questions to consider them as equally important.

    While the platform provides default values for the above-mentioned thresholds, these can be customized from the Natural Language -> Training -> Thresholds & Configurations.

  3. Qualify Contextual Paths – This will ensure that the Bot context is populated and retained with the terms/nodes of the matched intent. This will further smooth the user experience.
  4. Traits – As mentioned earlier, traits can be used to qualify a nodes/terms even if the user utterance does not contain the term/node. Traits are also helpful in filtering the suggested intent list.

Working of KG Engine

Knowledge Graph engine uses a two-step approach while extracting the right response to the user utterance. It combines a search-driven intent detection process with rule-based filtering. The settings for path coverage (percentage of terms needed) and term usage (mandatory or optional) in user utterance helps in the initial filtering of the FAQ intents. Tokenization and n-gram based cosine scoring model aids in the fulfillment of the final search criteria.

Training of the Knowledge Graph involves the following steps:

  • All the terms/nodes along with synonyms are identified and indexed
  • Using these indices, a flattened path is established for each KG Intent.

Once the Knowledge Graph Engine receives a user utterance:

  • The user utterance and KG nodes/terms are tokenized and n-gram is extracted (a max of quad-gram is supported by Knowledge Graph Engine)
  • The tokens are mapped with the KG nodes/terms to obtain their respective indices
  • Path comparison between the user utterance and KG nodes/terms establishes the qualified path for that utterance. This step takes into consideration the path coverage and term usage mentioned above.
  • From the list of questions in the qualified path, the best match is picked based upon cosine scoring.