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 Major 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
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
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
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
Azure OpenAI
Overview
Templates
BambooHR
Overview
Templates
Freshdesk
Overview
Templates
Freshservice
Overview
Templates
HubSpot
Overview
Templates
JIRA
Overview
Templates
Microsoft Graph
Overview
Templates
Open AI
Overview
Templates
Salesforce
Overview
Templates
ServiceNow
Overview
Templates
Stripe
Overview
Templates
Twilio
Overview
Templates
Agents
Agent Transfer Overview
Custom (BotKit)
Drift
Genesys
Intercom
NiceInContact
Salesforce
ServiceNow
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
NLP Insights
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
Plan & Usage
Overview
Usage Plans
Support Plans
Invoices
Authorization
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
API List
API Collection
koreUtil Libraries
SDK Reference
SDK Introduction
SDK Security
SDK Registration
Web Socket Connect and RTM
Installing the BotKit SDK
Using the BotKit SDK
SDK Events
Tutorials
BotKit - Blue Prism
BotKit - Flight Search Sample VA
BotKit - Agent Transfer
Widget SDK Tutorial
Web SDK Tutorial
ADMINISTRATION
Introduction to Admin Console
Administration Dashboard
User Management
Add Users
Manage Groups
Manage Roles
Data Tables and Views
Assistant Management
Enrollment
Invite Users
Send Bulk Invites
Import User Data
Synchronize Users from AD
Security & Control
Using Single-Sign On (SSO)
Two-Factor Authentication (2FA)
Security Settings
Cloud Connector
Analytics
Billing
  1. Home
  2. Docs
  3. Virtual Assistants
  4. API Guide
  5. Update NLP Configurations

Update NLP Configurations

To update the NLP thresholds and configurations

 

Method POST
Endpoint https://{{host}}/api/public/bot/{{BotID}}/configurations?language={{languageCode}}&groupName={{groupName}}
Content Type application/json
Authorization

auth: {{JWT}}

See How to generate the JWT Token.

API Scope
  • Bot Builder: NLP Configurations
  • Admin Console: Test > NLP Configurations & Train

 

Query Parameters

Parameter Description Mandate
host The environment URL. For example, https://bots.kore.ai Required
BotID The Bot ID or Stream ID that can be accessed under General Settings on the Bot Builder. Required
languageCode The Bot language in which the configurations need to be updated. Required
groupName The GroupName can be used to update the ML parameters of a specific group.  To update Bot level Intent Model Configurations, groupName should be set to “Bot Level Intent Model“. Required
for Multiple ML Model

 

Sample Request

curl --location -g --request POST \
  'https://{{host}}/api/public/bot/{{bot-id}}/configurations?language={{languageCode}}' \
  --header 'auth: YOUR_JWT_ACCESS_TOKEN' \
  --header 'content-type: application/json' \
  --data-raw '{
    "advancedNLPSettings": [
        {
            "configurationKeyName": "NoneIntent",
            "configurationValue": true,
            "nlpEngine": "ML"
        }
    ],
    "configurations": [
        {
            "mode": "ml",
            "exactMatchThreshold": 85,
            "useDependencyParser": true,
            "minThreshold": 0.2
        },
        {
            "mode": "faq",
            "useBotSynonyms": true,
            "searchInAnswer": {
                "enabled": true,
                "notifyUser": false,
                "responseType": "relevantWithReadMore",
                "customReadMoreURL": "aa",
                "useCustomReadMoreURL": true
            }
        }
    ],
    "mlParams": {
        "intentParams": {
            "features": "skip_gram",
            "skip_gram": {
                "seqLength": 3,
                "maxSkipDistance": 2
            }
        }
    },
    "nlSettings": {
        "enableAutoUtteranceAddition": false,
        "enableNegativePatterns": true
    }
}'

 

Body Parameters

The parameters depend on the threshold configuration that needs to be updated. The comprehensive list of the parameters for the various threshold configurations is given below:

 

Update Settings

Machine Learning Engine

This section refers to the configurations related to the Machine Learning engine. For details on the configurations, please click here.

{
    "configurations": [
        {
            "mode": "ml",               // Machine Learning Engine
            "exactMatchThreshold": 90,  // ML Definitive Score - value in range [80-100]
            "minThreshold": 0.4,        // ML threshold - value in range [0-1]
        }
    ],
    "mlParams": {
        "intentParams": {
            "useSynonyms": true,       // Bot Synonyms 
            "useStopwords": true,      // Stopwords 
            "usePlaceholders": true,   // Entity Placeholders 
            "features": "n_gram"       // Feature Extraction - value in range [skip_gram, n_gram]
            "skip_gram": {             // features should be 'skip_gram'
                "seqLength": 2,        // Sequence Length - value in range [2-4]
                "maxSkipDistance": 1   // Maximum Skip Distance - value in range [1-3]
              },
            "ngram": 3,                // ngram Sequence Length - value in range [1-4]
                                       // features should be ‘n_gram’
        },
        "nerParams": {
            "type": "corenlp"          // NER Model
                                       // could be "corenlp" for  Conditional Random Field 
                                       //       or "spacy" -  Deep Neural Network
         }
    }
}

 

Fundamental Meaning Engine

This section refers to the configurations related to the Fundamental Meaning engine. For details on the configurations, please click here.

{
    "configurations": [
        {
            "mode": "cs",            // Fundamental Meaning Engine
            "labelMatch": true       // Intent Detection using Task Name Words
            "isFMThreshold": true,   //FM Threshold
            "fmThreshold": 15        //FM Threshold value
        }
  ]
}

 

Knowledge Graph Engine

This section refers to the configurations related to the Knowledge Graph engine. For details on the configurations, please click here.

{
    "configurations": [ THRESHOLDS & CONFIGURATIONS 
         {
            "mode": "faq",  
            "autoSpellCorrectEnabled": true,             // Auto Correction
            "useBotSynonyms": true,                      // Bot Synonyms
            "enPatternLemma": false,                     // Lemmatization using Parts of Speech
            "pathCoverage": 50,                          // Path Coverage - value in range [0-100]
            "exactMatchThreshold": 95,                   // Minimum and Definitive Level for Knowledge Tasks 
                                                         // value in range [0-100] 
                                                         // should be more than minThreshold & maxThreshold
            "maxThreshold": 80,                          // Probable range for Knowledge Task 
                                                         // value in range [0-100] 
                                                         // should be between minThreshold & exactMatchThreshold 
            "minThreshold": 60,                          // Low confidence range for Knowledge Task 
                                                         // value in range [0-100] 
                                                         // should be less than maxThreshold & exactMatchThreshold  
            "suggestionsCount": 3,                       // KG suggestionsCount | [0-5]
            "taskMatchTolerance": 35,                    // Proximity of Suggested Matches | [0-50]
            "longResponses": {
                "readMore": true,                        // Manage Long Responses
                "useCustomReadMoreURL": true,            // readMore should be true
                "customReadMoreURL": "www.siteurl.com"   // readMore link; readMore should be true
              },
            "searchInAnswer": {
                "enabled": true,                         //  Search in Answer
                "notifyUser": true,                      // Inform end user that it is a probable answer
                "responseType": "relevantWithReadMore",  // can be "complete" - Show complete response, 
                                                         //      or "relevant" - Show only the relevant paragraph,
                                                         //      or "relevantWithReadMore" - Show only the relevant paragraph with “read more” link ]
                "customReadMoreURL": "www.siteurl.com",  // “read more” link 
                "useCustomReadMoreURL": true             // enabled should be true
            }
            "qualifyContextualPaths": false,             // Qualify Contextual Paths
        }
 ]
}

 

Ranking & Resolver Engine

This section refers to the configurations related to the Ranking & Resolver engine. For details on the configurations, please click here.

{
    "configurations": 
        {
            "mode": "rr",                 // Ranking and Resolver Engine
            "taskMatchTolerance": 2,      // Proximity of Probable Matches - value in range [0-20]
            "useDependencyParser": true,  // Dependency Parsing Model 
            "minMatchVal": 0.4,           // Minimum Match Score - value in range [0-1] 
                                          // useDependencyParser should be true
            "rankingParameters": ""       //  Advanced Configurations                                           
                                          // useDependencyParser should be true
            "intentRescoring": false,     // Rescoring of Intents
            "isPreferDefinitiveMatch": true // Prefer Definitive Matches
        }
 ]
}

 

Advanced NLP Configurations

This section describes the configurations as given in the Advanced NLP Configurations section of Natural Language -> Training. For details on the configurations, please click here.

The sample request for setting the above-mentioned Advanced NLP Configurations is given below:

{
    "advancedNLPSettings":[
        {
            "configurationKeyName": "NoneIntent",
            "configurationValue":true,
            "nlpEngine":"ML"
        }
    ]
}

The complete list of the permissible advanced NLP configurations settings and the possible values is given below:

Split Compound Words

{
        "configurationName": "Split Compound Words",
        "configurationKeyName": "splitCompoundWords",
        "desc": "The settings enables splitting of the compound words into multiple stems and then process the individual stem",
        "nlpEngine": "ML",
        "dataType": "Boolean",
        "range": [true, false],
        "defaultValue": false,
        "requiresTraining": true,
        "language": ["de", "nl"],
        "isChild": false
    }

None Intent

{
        "configurationName": "None Intent",
        "configurationKeyName": "NoneIntent",
        "desc": "Once enabled, a None intent is created which reduces the chances of getting a false positive for an intent match using ML engine",
        "nlpEngine": "ML",
        "dataType": "Boolean",
        "range": [true, false],
        "defaultValue": true,
        "requiresTraining": true,
        "language": "ALL",
        "isChild": false
    }

Cosine similarity dampening

{
        "configurationName": "Cosine similarity dampening",
        "configurationKeyName": "cosineSimilarityDampening",
        "desc": "Avoid penalty on short length questions using Cosine Similarity Dampening",
        "nlpEngine": "KG",
        "dataType": "Boolean",
        "range": [true, false],
        "defaultValue": true,
        "requiresTraining": false,
        "language": "ALL",
        "isChild": false
    }

Network Type

{
        "configurationName" : "Network Type",
        "configurationKeyName" : "network",
        "desc" : "Networks available for intent training",
        "nlpEngine" : "ML",
        "dataType" : "enum",
        "range" : ["Standard","MLP-BOW","MLP-WordEmbeddings","LSTM","CNN", "KoreBERT"],
        "defaultValue": "Standard",
        "requiresTraining" : true,
        "language" : "ALL",
        "isChild" : false
    }

Epochs

{
        "configurationName": "Epochs",
        "configurationKeyName": "epochs",
        "desc": "Number of iterations in training the model",
        "nlpEngine": "ML",
        "dataType": "Number",
        "range": [20, 300],
        "defaultValue": 20,
        "requiresTraining" : true,
        "language" : "ALL",
        "isChild" : true,
        "parentConfiguration" : "network",
        "requiredParentInput" : ["MLP-BOW","MLP-WordEmbeddings","LSTM","CNN","KoreBERT"]
    }

Batch Size

{
        "configurationName" : "Batch Size",
        "configurationKeyName" : "batch_size",
        "desc" : "Number of training samples used for each batch while training",
        "nlpEngine" : "ML",
        "dataType" : "Number",
        "range" : [10,30],
        "defaultValue":10,
        "requiresTraining" : true,
        "language" : "ALL",
        "isChild" : true,
        "parentConfiguration" : "network",
        "requiredParentInput" : ["MLP-BOW","MLP-WordEmbeddings","LSTM","CNN","KoreBERT"]
    }

Learning rate

{
        "configurationName": "Learning rate",
        "configurationKeyName": "lr",
        "desc": "Learning rate is a hyper-parameter that controls how much we are adjusting the weights of our network with respect to the loss gradient",
        "nlpEngine": "ML",
        "dataType": "enum",
        "range": [1e-4, 1e-3, 1e-2],
        "defaultValue": 1e-3,
        "requiresTraining" : true,
        "language" : "ALL",
        "isChild" : true,
        "parentConfiguration" : "network",
        "requiredParentInput" : ["MLP-BOW","MLP-WordEmbeddings","LSTM","CNN","KoreBERT"]
    }

Dropout

{
        "configurationName": "Dropout",
        "configurationKeyName": "dropout",
        "desc": "Regularization parameter to avoid overfitting of the model",
        "nlpEngine": "ML",
        "dataType": "Number",
        "range": [0, 0.8],
        "defaultValue": 0,
        "requiresTraining" : true,
        "language" : "ALL",
        "isChild" : true,
        "parentConfiguration" : "network",
        "requiredParentInput" : ["MLP-BOW","MLP-WordEmbeddings","LSTM","CNN", "KoreBERT"]
    }

Vectorizer

{
        "configurationName": "Vectorizer",
        "configurationKeyName": "vector_type",
        "desc": "Feature extraction technique on training data",
        "nlpEngine": "ML",
        "dataType": "enum",
        "range": ["count", "tfidf"],
        "defaultValue": "count",
        "requiresTraining": true,
        "language": "ALL",
        "isChild": true,
        "parentConfiguration": "network",
        "requiredParentInput": ["MLP-BOW"]
    }

Maximum sequence length

{
        "configurationName": "Maximum sequence length",
        "configurationKeyName": "max_seq_length",
        "desc": "Length of the training sample or user input",
        "nlpEngine": "ML",
        "dataType": "Number",
        "range": [10, 30],
        "defaultValue": 20,
        "requiresTraining" : true,
        "language" : "ALL",
        "isChild" : true,
        "parentConfiguration" : "network",
        "requiredParentInput" : ["MLP-WordEmbeddings","LSTM","CNN","KoreBERT"]
    }

Embeddings Type

{
        "configurationName": "Embeddings Type",
        "configurationKeyName": "word_embedding_type",
        "desc": "Feature extraction technique on training data",
        "nlpEngine": "ML",
        "dataType": "enum",
        "range": ["generated", "pretrained", "random"],
        "defaultValue": "random",
        "requiresTraining" : true,
        "language" : "ALL",
        "isChild" : true,
        "parentConfiguration" : "network",
        "requiredParentInput" : ["MLP-WordEmbeddings","LSTM","CNN", "KoreBERT"]
    }

Embeddings Dimensions

{
        "configurationName": "Embeddings Dimensions",
        "configurationKeyName": "embedding_dim",
        "desc": "Embeddings Dimensions to be used in featurization",
        "nlpEngine": "ML",
        "dataType": "Number",
        "range": [100, 400],
        "defaultValue": 300,
        "requiresTraining" : true,
        "language" : "ALL",
        "isChild" : true,
        "parentConfiguration" : "network",
        "requiredParentInput" : ["MLP-WordEmbeddings","LSTM","CNN", "KoreBERT"]
    }

K Fold Cross-Validation

{
        "configurationName" : "kfold",
        "configurationKeyName" : "kfold",
        "desc" : "kfold parameter for Crossvalidation",
        "nlpEngine" : "ML",
        "dataType" : "Number",
        "range" : [2,10],
        "defaultValue": 5,
        "requiresTraining" : true,
        "language" : "ALL",
        "isChild" : false
    }

FAQ Name as Intent Name

{
        "configurationName": "FAQ Name as Intent Name",
        "configurationKeyName": "FAQ_Name_Intent_Name",
        "desc": "Enable to use FAQ Name as Intent Name. ",
        "nlpEngine": "KG",
        "dataType": "Boolean",
        "range": [true, false],
        "defaultValue": false,
        "requiresTraining" : false,
        "language" : "ALL",
        "isChild" : false
    }

Fuzzy Match

{
        "configurationName" : "Fuzzy Match",
        "configurationKeyName" : "fuzzyMatch",
        "desc" : "This setting enables the use of the fuzzy matching algorithm for intent identification",
        "nlpEngine" : "ML",
        "dataType" : "Boolean",
        "range" : [true,false],
        "defaultValue": true,
        "requiresTraining" : false,
        "language" : "ALL",
        "isChild" : false
    }

Handle Negation

{
        "configurationName" : "Handle Negation",
        "configurationKeyName" : "f_negation",
        "desc" : "This setting enables the handling of negated words in intent identification",
        "nlpEngine" : "ML",
        "dataType" : "Boolean",
        "range" : [true,false],
        "defaultValue": true,
        "requiresTraining" : true,
        "language" : ["en", "es"],
        "isChild" : false
    }

Ignore Multiple Occurences

{
        "configurationName" : "Ignore Multiple occurences",
        "configurationKeyName" : "binary",
        "desc" : "This setting enables to just use presence or absence of a term instead of the raw counts",
        "nlpEngine" : "ML",
        "dataType" : "Boolean",
        "range" : [true,false],
        "defaultValue": false,
        "requiresTraining" : true,
        "language" : ["en"],
        "isChild" : true,
        "parentConfiguration" : "network",
        "requiredParentInput" : ["MLP-BOW"]
    }

Entity Placeholders in User Utterances

{
        "configurationName": "Test PlaceHolders",
        "configurationKeyName": "TestPlaceHolders",
        "desc": "Enable to replace entity values present in the user input with the corresponding entity placeholders during prediction",
        "nlpEngine": "ML",
        "dataType": "Boolean",
        "range": [true, false],
        "defaultValue": true,
        "requiresTraining": false,
        "language": "ALL",
        "isChild": false
    }

 

Delete Settings

To delete any settings use the name of the settings mentioned in above sections in this way:

curl --location -g --request POST \
  'https://{{host}}/api/public/bot/{{bot-id}}/configurations?language={{languageCode}}' \
  --header 'auth: YOUR_JWT_ACCESS_TOKEN' \
  --header 'content-type: application/json' \
  --data-raw '{
    "delete": {
        "advancedNLPSettings": [
            "kfold"
        ]
    }
}'

 

Reset Settings

To reset any settings use the name of the settings mentioned in above sections in this way:

curl --location -g --request POST \
  'https://{{host}}/api/public/bot/{{bot-id}}/configurations?language={{languageCode}}' \
  --header 'auth: YOUR_JWT_ACCESS_TOKEN' \
  --header 'content-type: application/json' \
  --data-raw '{
      "reset": {
         "faq": [
             "pathCoverage",                // Path Coverage
             "suggestionsCount",            // KG suggestionsCount
             "minimumAndDefinitiveLevels",  // Minimum and Definitive Level for Knowledge Tasks (will reset all three values)
             "taskMatchTolerance"           // Proximity of Suggested Matches
        ],
        "ml": [
            "exactMatchThreshold",          // ML Definitive Score 
            "minThreshold"                  // ML threshold 
        ],
        "rr": [
            "taskMatchTolerance",           // Proximity of Probable Matches
            "minMatchVal"                   // Minimum Match Score
        ],
        "mlParams": [
            "ngram",                        // ngram Sequence Length
            "seqLength",                    // Sequence Length
            "maxSkipDistance"               // Maximum Skip Distance
        ]
    }
}'

 

Sample Response

[
    {
        "message": "Training Queued.",
        "Training_ID": "5dxxxxxxxxxxxxxxxxxxxxxxx"
    }
]
Menu