OVERVIEW
Virtual Assistants
Kore.ai Platform
Key Concepts
Natural Language Processing (NLP)
Accessing Platform
VIRTUAL ASSISTANTS
Virtual Assistant Builder
Virtual Assistant Types
Getting Started
Create a Simple Bot
SKILLS
Storyboard
Dialog Tasks
Introduction
Dialog Builder (New)
Dialog Builder (Legacy)
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
Bot Action Node
Service Node
Custom Authentication
2-way SSL for Service nodes
Script Node
Agent Transfer Node
WebHook Node
Grouping Nodes
Connections & Transitions
Manage Dialogs
User Prompts
Knowledge Graph
Terminology
Building
Generation
Importing and Exporting
Analysis
Knowledge Extraction
Train
Build
Alert Tasks
Introduction
Ignore Words and Field Memory
How to Schedule a Smart Alert
Small Talk
Digital Views
Introduction
How to Configure Digital Views
Digital Forms
Overview
How to Configure Digital Forms
NATURAL LANGUAGE
Overview
Machine Learning
Introduction
Model Validation
Fundamental Meaning
Introduction
NLP Guidelines
Knowledge Graph
Traits
Introduction
How to Use Traits
Ranking and Resolver
Advanced NLP Configurations
INTELLIGENCE
Overview
Context Management
Overview
Session and Context Variables
Context Object
How to Manage Context Switching
Manage Interruptions
Dialog Management
Sub Intents & Follow-up Intents
Amend Entity
Multi-Intent Detection
Sentiment Management
Tone Analysis
Sentiment Management
Event Based Bot Actions
Default Conversations
Default Standard Responses
TEST & DEBUG
Talk to Bot
Utterance Testing
Batch Testing
Record Conversations
Conversation Testing
CHANNELS
PUBLISH
ANALYZE
Overview
Dashboard
Custom Dashboard
Overview
How to Create Custom Dashboard
Conversation Flows
NLP Metrics
ADVANCED TOPICS
Universal Bots
Overview
Defining
Creating
Training
Customizing
Enabling Languages
Store
Smart Bots
Defining
koreUtil Libraries
SETTINGS
Authorization
Language Management
PII Settings
Variables
Functions
IVR Integration
General Settings
Management
Import & Export
Delete
Bot Versioning
Collaborative Development
Plan Management
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
ADMINISTRATION
HOW TOs
Create a Simple Bot
Create a Banking Bot
Transfer Funds Task
Update Balance Task
Context Switching
Using Traits
Schedule a Smart Alert
Configure UI 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
Global Variables
Content Variables
Using Bot Functions
Configure Agent Transfer
RELEASE NOTES

インテントAPIを見つける

NLPエンジンおよびMLエンジンからインテントの認識結果やスコアリングを取得します。

このAPIを使用するために、アプリは [インテントおよびエンティティの検出] の [ボットビルダーのAPIスコープ] を必要とします。

ポスト https://{{host}}/api/v1.1/rest/bot/{{BotID}}/findIntent?fetchConfiguredTasks=false

クエリパラメータ

パラメータ 説明
ホスト 環境URL(例: https://bots.kore.ai)
ボットID ボットID。ボットの [一般設定] ページからアクセスすることができます。
fetchConfiguredTasks ボットの設定済みタスクからインテントを取得する場合は「True」、公開済みタスクのみを取得する場合は「False」となります

本文パラメータ

パラメータ 説明
parentIntent 複数インテントモデルをサポートします
input 一致するインテントを見つけるためのユーザーの発話 例:タスクを作成する
streamName 一致するインテントを見つけるためのユーザーの発話 例:タスクを作成する 注意:3,000文字を超える文字列は使用できません

認証

以下の構文を使用して、JWTをヘッダーに含むAPIを呼び出します。 auth: {{JWT}}

ボットの言語

オプションとして、ボットで多言語を有効にしている場合は、en、zh_cnなどの言語コードを含むボット言語ヘッダーを渡す必要があります。多言語ボットの場合、言語コードが渡されない場合は、ボットのデフォルト言語が考慮されます。 bot-header: {{lang-code}}

応答のコンテンツタイプ

application/json

サンプルリクエスト

curl -X POST \   'https://{{host}}/api/v1.1/rest/bot/{{BotID}}/findIntent?fetchConfiguredTasks=false' \   -H "Content-Type:application/json" \ -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}'\ -H "bot-language:{{lang-code}}" \ -d '{ "parentIntent": "{{parent intent}}", "input": "{{user utterance}}", "streamName": "{{bot name}}" }'

サンプル応答

{ "request": { "input": "book a ticket", "streamName": "Public APIs" }, "response": { "usedtime": 313, "debugTitle": "Intent Match Successful: 'Book a ticket'", "result": "successintent", "messageStoreId": "xxx", "bot": "Public APIs", "botid": "st-6ecb5ba2-5e31-5a40-b918-8cbee40f3fdb", "task": "Book a ticket", "taskId": "dg-18219164-c11c-5605-9c29-d2e632ec3646", "intentStatus": "published", "subType": "dialog", "input": [ "book a ticket" ], "identifiedVia": "cs em", "language": "en", "userId": "u-5dad2ccd-b271-5c00-a338-2e6e25e1ec91", "time": "2019-06-27T11:48:28.250Z", "_id": "f-19f149a6-25e3-5c85-8793-679bfd26acf5", "traits": {}, "toneAnalysis": {}, "nlProcessing": { "originalInput": "book a ticket", "canonical": "book a ticket", "wordAnalysis": [ { "word": "book", "ignored": false, "pos": "Verb_infinitive ", "role": "MAINVERB ", "original": "book", "processedWord": "book" }, { "word": "a", "ignored": true, "pos": "Determiner ", "original": "a", "processedWord": "a" }, { "word": "ticket", "ignored": false, "pos": "Noun_singular ", "role": "MAINOBJECT ", "original": "ticket", "processedWord": "ticket" } ] }, "ml": { "namedEntityRecognition": [] }, "fm": { "definitive": [ { "count": 2, "score": 11643.33, "botid": "st-6ecb5ba2-5e31-5a40-b918-8cbee40f3fdb", "botname": "Public APIs", "activity": "Book a ticket", "activityType": 1, "exactcount": 2, "labelsize": 2, "ignorewords": 1, "mask": 66306, "words": { "book": [ "0-1" ], "ticket": [ "0-3" ] }, "priority": 2, "tense": 8192, "mainRoles": 10, "sentencelength": 3, "ignorewordlist": { "a": 1 }, "maskEntity": 66306, "firstwordmatch": "book", "details": { "0": { "1": { "labelword": "book", "inputwords": { "1": "book" }, "wordindex": [ 1 ], "foundexact": true, "bestwordindex": 1, "role": 2, "pos": 2200096997376, "tense": 8192, "ageLevel": 1, "commonness": 6 }, "2": { "labelword": "ticket", "inputwords": { "3": "ticket" }, "wordindex": [ 3 ], "foundexact": true, "bestwordindex": 3, "role": 8, "pos": 2147483680, "tense": 8192, "ageLevel": 1, "commonness": 5 } } }, "hasNoun": true, "hasVerb": true, "ageLevel": 1, "foundFmEngine": true, "scoreBreakdown": { "wordMatch": 500, "exactWords": 60, "coverage": 2000, "sentenceBonus": 4000, "positionBonus": 733.33, "orderBonus": 100, "spreadBonus": 800, "roleBonus": 2900, "faqQuestionBonus": 0, "mlMatchBonus": 0, "tasktypeBonus": 50, "matchBonus": 500, "phraseJoinPenalty": 0 }, "matchType": "definite", "task": "Book a ticket", "state": "published", "foundVia": "wordMatch" } ] }, "finalResolver": { "ranking": [ { "taskId": "dg-18219164-c11c-5605-9c29-d2e632ec3646", "intent": "Book a ticket", "activityType": "dialog", "state": "published", "totalScore": 11643.33, "scoring": { "count": 2, "score": 11643.33, "botid": "st-6ecb5ba2-5e31-5a40-b918-8cbee40f3fdb", "botname": "Public APIs", "activity": "Book a ticket", "activityType": 1, "exactcount": 2, "labelsize": 2, "ignorewords": 1, "mask": 66306, "words": { "book": [ "0-1" ], "ticket": [ "0-3" ] }, "priority": 10, "tense": 8192, "mainRoles": 10, "sentencelength": 3, "ignorewordlist": { "a": 1 }, "maskEntity": 66306, "firstwordmatch": "book", "details": { "0": { "1": { "labelword": "book", "inputwords": { "1": "book" }, "wordindex": [ 1 ], "foundexact": true, "bestwordindex": 1, "role": 2, "pos": 2200096997376, "tense": 8192, "ageLevel": 1, "commonness": 6 }, "2": { "labelword": "ticket", "inputwords": { "3": "ticket" }, "wordindex": [ 3 ], "foundexact": true, "bestwordindex": 3, "role": 8, "pos": 2147483680, "tense": 8192, "ageLevel": 1, "commonness": 5 } } }, "hasNoun": true, "hasVerb": true, "ageLevel": 1, "foundFmEngine": true, "scoreBreakdown": { "wordMatch": 500, "exactWords": 60, "coverage": 2000, "sentenceBonus": 4000, "positionBonus": 733.33, "orderBonus": 100, "spreadBonus": 800, "roleBonus": 2900, "faqQuestionBonus": 0, "mlMatchBonus": 0, "tasktypeBonus": 50, "matchBonus": 500, "phraseJoinPenalty": 0 }, "matchType": "definite", "csMatch": true }, "identifyingEngines": { "fm": true }, "csMatch": true, "intentMatchVia": "wordMatch" } ], "userInput": "book a ticket", "winningIntent": [ { "intent": "Book a ticket", "taskId": "dg-18219164-c11c-5605-9c29-d2e632ec3646", "activityType": "dialog", "state": "published", "score": 11643.33 } ], "entities": [] } }, "streamId": "st-6ecb5ba2-5e31-5a40-b918-8cbee40f3fdb", "streamName": "Public APIs", "seqLogId": "f-19f149a6-25e3-5c85-8793-679bfd26acf5", "_id": "f-19f149a6-25e3-5c85-8793-679bfd26acf5", "name": "Public APIs", "input": [ "book a ticket" ] }
OVERVIEW
Virtual Assistants
Kore.ai Platform
Key Concepts
Natural Language Processing (NLP)
Accessing Platform
VIRTUAL ASSISTANTS
Virtual Assistant Builder
Virtual Assistant Types
Getting Started
Create a Simple Bot
SKILLS
Storyboard
Dialog Tasks
Introduction
Dialog Builder (New)
Dialog Builder (Legacy)
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
Bot Action Node
Service Node
Custom Authentication
2-way SSL for Service nodes
Script Node
Agent Transfer Node
WebHook Node
Grouping Nodes
Connections & Transitions
Manage Dialogs
User Prompts
Knowledge Graph
Terminology
Building
Generation
Importing and Exporting
Analysis
Knowledge Extraction
Train
Build
Alert Tasks
Introduction
Ignore Words and Field Memory
How to Schedule a Smart Alert
Small Talk
Digital Views
Introduction
How to Configure Digital Views
Digital Forms
Overview
How to Configure Digital Forms
NATURAL LANGUAGE
Overview
Machine Learning
Introduction
Model Validation
Fundamental Meaning
Introduction
NLP Guidelines
Knowledge Graph
Traits
Introduction
How to Use Traits
Ranking and Resolver
Advanced NLP Configurations
INTELLIGENCE
Overview
Context Management
Overview
Session and Context Variables
Context Object
How to Manage Context Switching
Manage Interruptions
Dialog Management
Sub Intents & Follow-up Intents
Amend Entity
Multi-Intent Detection
Sentiment Management
Tone Analysis
Sentiment Management
Event Based Bot Actions
Default Conversations
Default Standard Responses
TEST & DEBUG
Talk to Bot
Utterance Testing
Batch Testing
Record Conversations
Conversation Testing
CHANNELS
PUBLISH
ANALYZE
Overview
Dashboard
Custom Dashboard
Overview
How to Create Custom Dashboard
Conversation Flows
NLP Metrics
ADVANCED TOPICS
Universal Bots
Overview
Defining
Creating
Training
Customizing
Enabling Languages
Store
Smart Bots
Defining
koreUtil Libraries
SETTINGS
Authorization
Language Management
PII Settings
Variables
Functions
IVR Integration
General Settings
Management
Import & Export
Delete
Bot Versioning
Collaborative Development
Plan Management
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
ADMINISTRATION
HOW TOs
Create a Simple Bot
Create a Banking Bot
Transfer Funds Task
Update Balance Task
Context Switching
Using Traits
Schedule a Smart Alert
Configure UI 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
Global Variables
Content Variables
Using Bot Functions
Configure Agent Transfer
RELEASE NOTES

Find Intent API

Fetches the intent recognition result and the scoring from NLP and ML engines.

To use this API, the app needs the Bot Builder API scope of Intent and Entity Detection.

POST https://{{host}}/api/v1.1/rest/bot/{{BotID}}/findIntent?fetchConfiguredTasks=false

Query Parameters

Parameter Description
host Environment URL, for example, https://bots.kore.ai
BotID Bot ID. You can access it from the General Settings page of the bot.
fetchConfiguredTasks true if you want to fetch the intents from configured tasks in the bot and false if you want to fetch only for the published tasks

Body Parameters

Parameter Description
parentIntent To support Multiple Intent Models
input The user utterance to find the matching intents
Example: Create a task
streamName The user utterance to find the matching intents
Example: Create a task
Note: Utterances greater than 3,000 characters in length are not allowed

Authorization

Invoke the API with JWT in the header with the following syntax:

auth: {{JWT}}

Bot Language

Optionally, if multi-language is enabled for the Bot, you need to pass the bot-language header with the language code, eg en, zh_cn etc.. If the language code is not passed for a multi-lingual Bot, then the default language of the Bot will be considered.

bot-header: {{lang-code}}

Response content type

application/json

Sample Request

curl -X POST \
  'https://{{host}}/api/v1.1/rest/bot/{{BotID}}/findIntent?fetchConfiguredTasks=false' \
  -H "Content-Type:application/json" \
  -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}'\ 
  -H "bot-language:{{lang-code}}" \
  -d '{
     "parentIntent": "{{parent intent}}",
     "input": "{{user utterance}}",
     "streamName": "{{bot name}}"
   }'

Sample Response

{
    "request": {
        "input": "book a ticket",
        "streamName": "Public APIs"
    },
    "response": {
        "usedtime": 313,
        "debugTitle": "Intent Match Successful: 'Book a ticket'",
        "result": "successintent",
        "messageStoreId": "xxx",
        "bot": "Public APIs",
        "botid": "st-6ecb5ba2-5e31-5a40-b918-8cbee40f3fdb",
        "task": "Book a ticket",
        "taskId": "dg-18219164-c11c-5605-9c29-d2e632ec3646",
        "intentStatus": "published",
        "subType": "dialog",
        "input": [
            "book a ticket"
        ],
        "identifiedVia": "cs em",
        "language": "en",
        "userId": "u-5dad2ccd-b271-5c00-a338-2e6e25e1ec91",
        "time": "2019-06-27T11:48:28.250Z",
        "_id": "f-19f149a6-25e3-5c85-8793-679bfd26acf5",
        "traits": {},
        "toneAnalysis": {},
        "nlProcessing": {
            "originalInput": "book a ticket",
            "canonical": "book a ticket",
            "wordAnalysis": [
                {
                    "word": "book",
                    "ignored": false,
                    "pos": "Verb_infinitive ",
                    "role": "MAINVERB ",
                    "original": "book",
                    "processedWord": "book"
                },
                {
                    "word": "a",
                    "ignored": true,
                    "pos": "Determiner ",
                    "original": "a",
                    "processedWord": "a"
                },
                {
                    "word": "ticket",
                    "ignored": false,
                    "pos": "Noun_singular ",
                    "role": "MAINOBJECT ",
                    "original": "ticket",
                    "processedWord": "ticket"
                }
            ]
        },
        "ml": {
            "namedEntityRecognition": []
        },
        "fm": {
            "definitive": [
                {
                    "count": 2,
                    "score": 11643.33,
                    "botid": "st-6ecb5ba2-5e31-5a40-b918-8cbee40f3fdb",
                    "botname": "Public APIs",
                    "activity": "Book a ticket",
                    "activityType": 1,
                    "exactcount": 2,
                    "labelsize": 2,
                    "ignorewords": 1,
                    "mask": 66306,
                    "words": {
                        "book": [
                            "0-1"
                        ],
                        "ticket": [
                            "0-3"
                        ]
                    },
                    "priority": 2,
                    "tense": 8192,
                    "mainRoles": 10,
                    "sentencelength": 3,
                    "ignorewordlist": {
                        "a": 1
                    },
                    "maskEntity": 66306,
                    "firstwordmatch": "book",
                    "details": {
                        "0": {
                            "1": {
                                "labelword": "book",
                                "inputwords": {
                                    "1": "book"
                                },
                                "wordindex": [
                                    1
                                ],
                                "foundexact": true,
                                "bestwordindex": 1,
                                "role": 2,
                                "pos": 2200096997376,
                                "tense": 8192,
                                "ageLevel": 1,
                                "commonness": 6
                            },
                            "2": {
                                "labelword": "ticket",
                                "inputwords": {
                                    "3": "ticket"
                                },
                                "wordindex": [
                                    3
                                ],
                                "foundexact": true,
                                "bestwordindex": 3,
                                "role": 8,
                                "pos": 2147483680,
                                "tense": 8192,
                                "ageLevel": 1,
                                "commonness": 5
                            }
                        }
                    },
                    "hasNoun": true,
                    "hasVerb": true,
                    "ageLevel": 1,
                    "foundFmEngine": true,
                    "scoreBreakdown": {
                        "wordMatch": 500,
                        "exactWords": 60,
                        "coverage": 2000,
                        "sentenceBonus": 4000,
                        "positionBonus": 733.33,
                        "orderBonus": 100,
                        "spreadBonus": 800,
                        "roleBonus": 2900,
                        "faqQuestionBonus": 0,
                        "mlMatchBonus": 0,
                        "tasktypeBonus": 50,
                        "matchBonus": 500,
                        "phraseJoinPenalty": 0
                    },
                    "matchType": "definite",
                    "task": "Book a ticket",
                    "state": "published",
                    "foundVia": "wordMatch"
                }
            ]
        },
        "finalResolver": {
            "ranking": [
                {
                    "taskId": "dg-18219164-c11c-5605-9c29-d2e632ec3646",
                    "intent": "Book a ticket",
                    "activityType": "dialog",
                    "state": "published",
                    "totalScore": 11643.33,
                    "scoring": {
                        "count": 2,
                        "score": 11643.33,
                        "botid": "st-6ecb5ba2-5e31-5a40-b918-8cbee40f3fdb",
                        "botname": "Public APIs",
                        "activity": "Book a ticket",
                        "activityType": 1,
                        "exactcount": 2,
                        "labelsize": 2,
                        "ignorewords": 1,
                        "mask": 66306,
                        "words": {
                            "book": [
                                "0-1"
                            ],
                            "ticket": [
                                "0-3"
                            ]
                        },
                        "priority": 10,
                        "tense": 8192,
                        "mainRoles": 10,
                        "sentencelength": 3,
                        "ignorewordlist": {
                            "a": 1
                        },
                        "maskEntity": 66306,
                        "firstwordmatch": "book",
                        "details": {
                            "0": {
                                "1": {
                                    "labelword": "book",
                                    "inputwords": {
                                        "1": "book"
                                    },
                                    "wordindex": [
                                        1
                                    ],
                                    "foundexact": true,
                                    "bestwordindex": 1,
                                    "role": 2,
                                    "pos": 2200096997376,
                                    "tense": 8192,
                                    "ageLevel": 1,
                                    "commonness": 6
                                },
                                "2": {
                                    "labelword": "ticket",
                                    "inputwords": {
                                        "3": "ticket"
                                    },
                                    "wordindex": [
                                        3
                                    ],
                                    "foundexact": true,
                                    "bestwordindex": 3,
                                    "role": 8,
                                    "pos": 2147483680,
                                    "tense": 8192,
                                    "ageLevel": 1,
                                    "commonness": 5
                                }
                            }
                        },
                        "hasNoun": true,
                        "hasVerb": true,
                        "ageLevel": 1,
                        "foundFmEngine": true,
                        "scoreBreakdown": {
                            "wordMatch": 500,
                            "exactWords": 60,
                            "coverage": 2000,
                            "sentenceBonus": 4000,
                            "positionBonus": 733.33,
                            "orderBonus": 100,
                            "spreadBonus": 800,
                            "roleBonus": 2900,
                            "faqQuestionBonus": 0,
                            "mlMatchBonus": 0,
                            "tasktypeBonus": 50,
                            "matchBonus": 500,
                            "phraseJoinPenalty": 0
                        },
                        "matchType": "definite",
                        "csMatch": true
                    },
                    "identifyingEngines": {
                        "fm": true
                    },
                    "csMatch": true,
                    "intentMatchVia": "wordMatch"
                }
            ],
            "userInput": "book a ticket",
            "winningIntent": [
                {
                    "intent": "Book a ticket",
                    "taskId": "dg-18219164-c11c-5605-9c29-d2e632ec3646",
                    "activityType": "dialog",
                    "state": "published",
                    "score": 11643.33
                }
            ],
            "entities": []
        }
    },
    "streamId": "st-6ecb5ba2-5e31-5a40-b918-8cbee40f3fdb",
    "streamName": "Public APIs",
    "seqLogId": "f-19f149a6-25e3-5c85-8793-679bfd26acf5",
    "_id": "f-19f149a6-25e3-5c85-8793-679bfd26acf5",
    "name": "Public APIs",
    "input": [
        "book a ticket"
    ]
}