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
Bot Builder
Creating a Bot
Design
Develop
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 Tasks
Knowledge Ontology
Building Knowledge Graph
Importing and Exporting Bot Ontology
Knowledge Extraction
Natural Language
Overview
Machine Learning
ML Model
Fundamental Meaning
Knowledge Graph Training
Traits
Ranking and Resolver
NLP Detection
NLP Settings and Guidelines
Bot Intelligence
Overview
Context Management
Session and Context Variables
Context Object
Dialog Management
Sub-Intents
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
Overview
Dashboard
Conversation Flows
Bot Metrics
Advanced Topics
Bot Authorization
Language Management
Collaborative Development
IVR Integration
Universal Bots
Defining
Creating
Customizing
Enabling Languages
Smart Bots
Defining
Sample Bots
Github
Asana
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
SDKs
SDK Overview
SDK Security
SDK App Registration
Kore.ai 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
Enrollment
Inviting Users
Sending Bulk Invites to Enroll Users
Importing Users and User Data
Synchronizing Users from Active Directory
Security & Compliance
Overview
Using Single Sign-On
Cloud Connector
Analytics
Billing
How Tos
Context Switching
Using Traits
Live Agent Transfer
Schedule a Smart Alert
Configure Agent Transfer
  1. Home
  2. Docs
  3. Bots
  4. Bot Building
  5. Knowledge Task
  6. Importing and Exporting Bot Ontology

Importing and Exporting Bot Ontology

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

Importing Ontology

  1. Open Knowledge Collection.
  2. You will find the Import option against the Bot Ontology
  3. Click Import.
  4. Do one of the following:
    • If you are creating the Bot Ontology from scratch, click Proceed.
      -or-
    • If you have an existing ontology, make sure to take a backup of the existing ontology to a CSV or JSON file, and then Proceed.
      Note: Importing an ontology does not just update it but replaces the entire existing ontology.
  5. Drag and drop the file in the Import window or click Browse to navigate to the file.
  6. Click Next to begin the import.
  7. After the importing is completed, the success message appears in a dialog. Click Done.
  8. The ontology will be displayed in the Knowledge Collection and you can edit and train the same.

Exporting Ontology

To export an ontology:

  1. Open Knowledge Collection.
  2. You will find the Export option against the Bot Ontology
  3. Based on the preferred format: click Export JSON or Export CSV.
  4. The Ontology file will be downloaded to your machine.

Creating Bot Ontology

Instead of creating the Bot Ontology from the platform UI, you might want to work in your preferred editor like Spreadsheet or as a JSON file. The platform gives you the option to create a Bot Ontology in spreadsheet or JSON and use the same to Import it into the Bot.

This involves these steps:

  1. Download sample CSV or a JSON file. You can download these sample files from a blank Knowledge Collection 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 bot ontology using a sample spreadsheet that can be downloaded from the bot. If you anticipate frequent changes to the Knowledge Graph, we recommend you to create it in a spreadsheet as it would easier to make bulk updates compared to the application UI.

Follow the instructions below to build your bot ontology in a spreadsheet.

Downloading the Sample CSV file

  1. Open the Knowledge Graph.
  2. Click Import from the left section.
  3. You will be prompted to back up the Knowledge Collection before proceeding. Choose the CSV or JSON format for the backup.
  4. After backup, click Proceed.
  5. On the next dialog, click Sample CSV. The CSV file is downloaded to your local computer.

Building the Bot Ontology in a CSV

Open the downloaded Sample CSV file. If you have downloaded the sample from a blank Knowledge Collection, you will see some sample questions and responses.

The details that you need to enter in each row of the CSV file differ based on the type of information. For example, the details you need to enter for an FAQ (Question, Answer, Nodes, Alternate Questions) differ from the details you need to enter for Synonyms (Term, Synonyms).

The bot interprets the data present in each row of the CSV file, depending on the information type specified in Column # 1 of the row. Below are the valid entries for Column#1 of the CSV file, which represent the different information types:

  • faq: Represents a primary or Alternate question in the Knowlege Graph.
  • unmappedpath: Represents nodes with no questions associated with it.
  • synonyms: Represents global synonyms for terms.
  • classes: Represents the trait names and their associated utterances.

Important notes
You cannot import or export the following bot elements using a CSV or spreadsheet

  • Alternative Responses: While the spreadsheet support entering alternative questions for an FAQ, you cannot enter alternative responses in the spreadsheet and import them into the bot.
  • Split Responses: You cannot enter or import FAQ responses that are split into multiple consecutive messages.
  • Advanced Responses: The CSV import doesn’t support responses written in the advanced mode using JavaScript.

The following sections provide the remaining details that you must fill for each information type:

FAQ

Primary Question



Note
: Enter the names of all the parent nodes in separate columns until you reach the First-level node in the path.

Alternate Questions

Note: You need to enter each alternative question in a separate row below the primary question.

 

Terms/Tags

  • Mandatory tags and terms can be prefixed with **
  • Organizer tags and terms can be prefixed with !!

Unmappedpath

Unmappedpath refers to nodes for which no question is added.

Note: Enter the names of all parent nodes in the hierarchy up to the First-level node. Do not enter the name of the root node as it creates a duplicate node below the root node.

Global Synonyms

Note: Enter each synonym in a separate column.

 

Path Synonyms

Traits

To associate term or tag with a trait use the entry as: <tag/term-name>:<class-name>>
Note: Enter each utterance in a separate column.

From a JSON file

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

Follow the instructions below to build your Bot Ontology using JSON:

Downloading the JSON sample

  1. Open the Knowledge Graph.
  2. Click Import from the left section.
  3. You will be prompted to backup the Knowledge Collection before proceeding. Choose the CSV or JSON format for the backup.
  4. After backup, click Proceed.
  5. On the next dialog, 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.
Alternate Questions Array Consists of alternative question and terms. Include terms from leaf to the First-level node.
Synonyms Object Consists arrays of terms and their synonyms.
Unmappedpath Array Consists 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 array of the utterances as values.
Menu