GETTING STARTED
Kore.ai XO Platform
Virtual Assistants Overview
Natural Language Processing (NLP)
Concepts and Terminology
Quick Start Guide
Accessing the Platform
Working with the Builder
Building a Virtual Assistant
Using Workspaces
Release Notes
Current Version
Previous Versions
Deprecations

CONCEPTS
Design
Storyboard
Dialog Tasks
Overview
Dialog Builder
Node Types
Intent Node
Dialog Node
Entity Node
Form Node
Confirmation Node
Message Nodes
Logic Node
Bot Action Node
Service Node
Webhook Node
Script Node
Group Node
Agent Transfer
User Prompts
Voice Call Properties
Dialog Task Management
Connections & Transitions
Component Transition
Context Object
Event Handlers
Knowledge Graph
Introduction
Knowledge Extraction
Build Knowledge Graph
Add Knowledge Graph to Bot
Create the Graph
Build Knowledge Graph
Add FAQs
Run a Task
Build FAQs from an Existing Source
Traits, Synonyms, and Stop Words
Manage Variable Namespaces
Update
Move Question and Answers Between Nodes
Edit and Delete Terms
Edit Questions and Responses
Knowledge Graph Training
Knowledge Graph Analysis
Knowledge Graph Import and Export
Importing Knowledge Graph
Exporting Knowledge Graph
Creating a Knowledge Graph
From a CSV File
From a JSON file
Auto-Generate Knowledge Graph
Alert Tasks
Small Talk
Digital Skills
Digital Forms
Views
Introduction
Panels
Widgets
Feedback Survey
Train
Introduction
ML Engine
Introduction
Model Validation
FM Engine
KG Engine
Traits Engine
Ranking and Resolver
NLP Configurations
NLP Guidelines
Intelligence
Introduction
Contextual Memory
Contextual Intents
Interruption Management
Multi-intent Detection
Amending Entities
Default Conversations
Sentinment Management
Tone Analysis
Test & Debug
Talk to Bot
Utterence Testing
Batch Testing
Conversation Testing
Deploy
Channels
Publish
Analyze
Introduction
Conversations Dashboard
Performance Dashboard
Custom Dashboards
Introduction
Meta Tags
Dashboards and Widgets
Conversations History
Conversation Flows
Feedback Analytics
NLP Metrics
Containment Metrics
Usage Metrics
Smart Bots
Universal Bots
Introduction
Universal Bot Definition
Universal Bot Creation
Training a Universal Bot
Universal Bot Customizations
Enabling Languages
Store
Manage Assistant
Plan & Usage
Overview
Usage Plans
Support Plans
Invoices
Authorization
Multilingual Virtual Assistants
Masking PII Details
Variables
IVR Settings
General Settings
Assistant Management
Data Table
Table Views
App Definitions
Sharing Data Tables or Views

HOW TOs
Build a Flight Status 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
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
Web SDK Tutorial
Widget SDK Tutorial
Analyze the Assistant
Create a Custom Dashboard
Use Custom Meta Tags in Filters

APIs & SDKs
API Reference
API Introduction
API List
API Collection
koreUtil Libraries
SDK Reference
SDK Introduction
SDK Security
SDK Registration
Web Socket Connect and RTM
Using the BotKit SDK
BotKit SDK Tutorial - Blue Prism

ADMINISTRATION
Introduction
Assistant Admin Console
Administration Dashboard
User Management
Add Users
Manage Groups
Manage Roles
Assistant Management
Enrollment
Invite Users
Send Bulk Invites
Import User Data
Synchronize Users from AD
Security & Compliance
Using Single-Sign On
Security Settings
Cloud Connector
Analytics
Billing
  1. Home
  2. Docs
  3. Virtual Assistants
  4. Builder
  5. Knowledge Graph
  6. Importing and Exporting Bot Ontology10 min read

Importing and Exporting Bot Ontology10 min read

You can build a Knowledge Graph in a CSV or JSON file and upload it to a bot. Similarly, you can export the existing Knowledge Graph to CSV or JSON. Exporting a Knowledge Graph helps you edit it in a spreadsheet or import it to another Bot.

There is a platform restriction of a maximum of 50k FAQs spread across a maximum of 20k nodes. Import of files exceeding these numbers is rejected.

The platform now allows you to import any bot with a file size up to 50MB.

Note: If you try import a bot with more than 50MB size, the import process will fail.

Importing Knowledge Graph

  1. Open the bot where you want to import the KG and select the Build tab.
  2. On the left pane, click Conversational Skills > Knowledge Graph.
  3. You can find the Import option on the respective Knowledge Graph.
  4. Click Import.
  5. On the Import dialog box, do one of the following:
    • If you are creating the Knowledge Graph from scratch, click Proceed.
      (or)
    • If you have an existing Knowledge Graph, make sure to take a backup of the same to a CSV or JSON file, and then Proceed.
      Note: Importing a Knowledge Graph does not update it but replaces the entire existing Knowledge Graph.
  6. Drag and drop the file in the Import window or click Browse to locate the file.
  7. Click Next to begin the import.
  8. After the import is complete, the success message appears in a dialog box. Click Done.
  9. The hierarchy is displayed in the Knowledge Graph and you can edit and train the same.

Exporting Knowledge Graph

To export a Knowledge Graph, follow the below steps:

  1. On the left pane, click Conversational Skills -> Knowledge Graph.
  2. You can find the Export option on the respective Knowledge Graph.
  3. Based on the preferred format: click Export JSON or Export CSV.
  4. The Knowledge Graph file is downloaded to your machine.

Creating a Knowledge Graph

Instead of creating the Knowledge Graph from the platform UI, you can work in your preferred editor like Spreadsheet or as a JSON file. The platform gives you the option to create a Knowledge Graph in a spreadsheet or JSON and use the same to import it into the bot.

To import, follow the below steps:

  1. Download sample CSV or a JSON file. You can download these sample files from a blank Knowledge Graph too.
  2. Edit the file by adding rows corresponding to the questions, responses, synonyms, etc.
  3. Import the file to your bot.

From a CSV File

You can create the Knowledge Graph using a sample spreadsheet that you can download from the bot. If you anticipate frequent changes to the Knowledge Graph, we recommend you to create it in a spreadsheet as it is easier to perform bulk updates compared to the application UI.

Follow the instructions below to build your Knowledge Graph in a spreadsheet.

Download the Sample CSV file

  1. On the left pane, click Bot Tasks > Knowledge Graph.
  2. You can find the Import option on the respective Knowledge Graph.
  3. You are prompted to back up the Knowledge Graph before proceeding. Choose the CSV or JSON format for the backup.
  4. After backup, click Proceed.
  5. On the corresponding dialog box, click Sample CSV. The CSV file is downloaded to your local computer.

Build the Knowledge Graph in a CSV

The format for the CSV file includes details regarding alternate answers, extended responses, and advanced responses.

  • The following types of entries are supported:
    • Faq – The leaf level nodes with questions and answers.
    • Node – For node/tags, traits, preconditions, and output context.
    • Synonyms
    • KG Params
    • Traits
  • Each of the above categories needs to be preceded by the appropriate header.
  • The header helps identify the new vs old versions of the JSON file by the platform.

The following is the detailed information for each section and the content expected for each.

FAQ

This contains the actual questions and answers along with the alternate questions, answers, and extended answers.

Following are the column-wise details that can be given:

  • Faq – Mandatory entry in the header, must be left blank in the following rows.
  • Que ID – The Question ID is auto-generated by the platform. This field uniquely identifies the FAQs and it should not be added or edited manually. Leave this field blank if you are adding a new FAQ. Do not alter the value of this field if you are updating an existing FAQ. Do not manually add any data in this field.
  • Path – To which the FAQ belongs
    • Mandatory node names must be prefixed with ** and organizer nodes with !!
  • Primary Question – The actual question user might ask: When left blank, the entry in the Answer column is considered as the alternative answer to the previous primary question.
  • Alternate Question – Optional: Alternate question to the primary question if there are multiple alternate questions, they must be given in multiple rows.
  • Tags – For each question or alternate question.
  • Answer – Answer to the question serves as an alternate answer when the primary question field is left blank. Answer format can be:
    • Plain text
    • Script with SYS_SCRIPT prefix i.e. SYS_SCRIPT <answer in javascript format>
    • Channel-specific formatted response when prefixed with SYS_CHANNEL_<channel-name>, the answer can be simple or in script format:
      • SYS_CHANNEL_<channel-name> SYS_TEXT <answer>
      • SYS_CHANNEL_<channel-name> SYS_SCRIPT <answer in javascript format>
    • Trigger a dialog then prefix with SYS_INTENT i.e. SYS_INTENT <dialog ref id>
  • Extended Answer-1: Optional to be used in case the response is lengthy.
  • Extended Answer-2: Optional to be used in case the response is lengthy.
  • ReferenceId – reference to any external content used as a source for this FAQ
  • Display Name – The name that would be used for presenting the FAQ to the end-users in case of ambiguity.

Nodes

This section includes settings for both nodes and tags.

  • Node – Mandatory entry in the header must be blank in the following rows.
  • Que ID – The Question ID is auto-generated by the platform. This field uniquely identifies the FAQs and it should not be added or edited manually. Leave this field blank if you are adding a new FAQ. Do not alter the value of this field if you are updating an existing FAQ. Do not manually add any data in this field.
  • Nodepath – Path for reaching the node/tag.
  • Tag – Mandatory for tag settings, leave blank for node.
  • Precondition – For qualifying this node/tag.
  • outputcontext – Context to be populated by this node/tag.
  • Traits – for this node/tag.

Synonyms

Use this section to enter the synonyms as key-value pairs.

  • Synonyms – Mandatory entry in the header, must be blank in the following rows.
  • Phrase – for which the synonym needs to be entered.
  • Synonyms – Comma-separated values.

Use of bot synonyms in KG term identification can be enabled using the following:

  • confidenceConfigs – Mandatory entry in the header, must be blank in the following rows.
  • parameter – useBotSynonyms in this case
  • value – true or false

KG Params

  • KG Params – mandatory entry in the header, must be blank in the following rows.
  • lang – Bot language code. For example, en for English.
  • stopwords – Comma-separated values.

Traits

Trait related information can be specified as follows:

  • Traits – Mandatory entry in the header, must be blank in the following rows.
  • lang – Bot language code. For example, en for English.
  • GroupName – Trait group name.
  • matchStrategy – Pattern or probability (for ML-based).
  • scoreThreshold – Threshold value (between 0 and 1) when the matchStrategy above is set to ML-based.
  • TraitName – The name of the trait.
  • Training data – Utterances for the trait.

For Taxonomy Based KG, the following fields can be included if there are one or more faqs linked to another faq in the KG. :

  • faqLinkedTo – The faqLinkedto field identifies the source FAQ to which another FAQ is linked to. The faqLinkedTo field must contain a single, valid ‘Que ID’ of the source FAQ. ‘Que Id’ should be a valid identity generated by the platform. Do not give a reference to an FAQ that is already linked to another FAQ.
  • faqLinkedBy – The faqLinkedBy field contains the list of ‘Que Ids’ of the FAQs that are linked to a particular FAQ. ‘Que Id’ should be a valid identity generated by the platform..
  • isSoftDeleted – The isSoftDeleted field is used to identify the FAQs that are deleted but it has one or more FAQs linked to it.

From a JSON file

Kore.ai allows you to create the Knowledge Graph in JSON and upload it. You can download a sample JSON from the bot to understand its structure.

Follow the instructions below to build your Knowledge Graph using JSON:

Downloading the JSON sample

  1. On the left pane, click Conversational Skills –> Knowledge Graph.
  2. You can find the Import option on the respective Knowledge Graph.
  3. You are prompted to back up the Knowledge Graph before proceeding. Choose the CSV or JSON format for the backup.
  4. After backup, click Proceed.
  5. On the corresponding dialog box, click Sample JSON. The JSON file is downloaded to your local computer.

JSON Reference

Property Name Type Description
FAQ Array

Consists of the following:

  • Question
  • Answer
  • Leaf and parent terms up to the First-level node in the path
  • Alternative question
Question String Primary question; included in the FAQ array.
Answer String Bot response; included in the FAQ array.
Terms Array Includes the leaf node to which the question is added, and its parents up to the First-level node.
refId String Optional reference to any external content used as a source for this FAQ
Alternate Questions Array Consists of alternative question and terms. Include terms from leaf to the First-level node.
Synonyms Object Consists of arrays of terms and their synonyms.
Unmappedpath Array Consists of arrays of nodes that do not have any questions, and all their parents up to the First-level node.
Traits Object Consists of trait names as keys and an array of utterances as values.

For Taxonomy Based KG, the following fields can be included if there are one or more faqs linked to another faq in the KG. :

  • faqLinkedTo – To identify source faq.
  • faqLinkedBy – To identify linked faqs.
  • isSoftDeleted – To identify faq is deleted but it has some linked faqs.
Menu