지식 그래프는 CSV 또는 JSON 파일로 작성해 봇에 업로드할 수 있습니다. 마찬가지로 기존 지식 그래프를 CSV 또는 JSON으로 내보낼 수 있습니다. 지식 그래프를 내보내면 스프레드시트에서 편집하거나 다른 봇으로 가져올 수 있습니다. 최대 20k의 노드에 분산된 최대 50k개에 달하는 FAQ의 플랫폼 제한이 있습니다. 이 수를 초과하는 파일 가져오기는 거부됩니다.
지식 그래프 가져오기
- KG를 가져오기 원하는봇을 열고 빌드 탭을 선택합니다.
- 왼쪽 창에서 대화형 스킬> 지식 그래프를 클릭합니다.
- 가져오기 옵션은 각 지식 그래프에서 찾을 수 있습니다.
- 가져오기를 클릭합니다.
- 가져오기 대화 상자에서 다음 중 하나를 실행합니다.
- 지식 그래프를 처음부터 만들기 시작하는 경우 진행을 클릭합니다. (또는)
- 기존 지식 그래프가 있다면 해당 지식 그래프를 CSV 또는 JSON 파일로 백업한 다음 진행합니다.
참고 사항: 지식 그래프를 가져오면 업데이트되지 않고 기존의 전체 지식 그래프를 대체합니다.
- 가져오기 창에서 파일을 끌어서 놓거나 찾아보기를 클릭하여 파일을 찾습니다.
- 다음을 클릭하여 가져오기를 시작합니다.
- 가져오기를 완료하면 대화 상자에 성공 메시지가 표시됩니다. 완료를 클릭합니다.
- 계층이 지식 그래프에 표시되며 동일하게 편집하고 학습시킬 수 있습니다.
지식 그래프 내보내기
지식 그래프를 내보내려면 다음 단계를 따르십시오.
지식 그래프 생성
플랫폼 UI에서 지식 그래프를 생성하는 대신, 스프레드시트나 JSON 파일과 같이 선호하는 편집기에서 작업할 수 있습니다. 플랫폼은 스프레드시트나 JSON에 지식 그래프를 생성하고 이를 사용하여 봇으로 가져올 수 있는 옵션을 제공합니다. 가져오려면 다음 단계를 따르세요.
- 샘플 CSV 또는 JSON 파일을 다운로드합니다. 비어 있는 지식 그래프에서도 이러한 샘플 파일을 다운로드할 수 있습니다.
- 질문, 응답, 동의어 등에 해당하는 행을 추가하여 파일을 편집합니다
- 파일을 봇으로 가져옵니다.
CSV 파일에서
귀하는 봇에서 다운로드할 수 있는 예제 스프레드시트를 사용하여 지식 그래프를 생성할 수 있습니다. 지식 그래프가 자주 변경될 것으로 예상되는 경우 애플리케이션 UI에 비해 대량 업데이트를 더 쉽게 수행할 수 있으므로 스프레드시트에서 생성하는 것이 좋습니다. 아래 지침에 따라 스프레드시트에서 지식 그래프를 작성합니다.
샘플 CSV 파일 다운로드
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.
JSON 파일
Kore.ai를 사용하면 지식 그래프를 JSON으로 생성하고 업로드할 수 있습니다. 봇에서 샘플 JSON을 다운로드하여 구조를 이해할 수 있습니다. 아래 지침에 따라 JSON을 사용하여 지식 그래프를 작성합니다.
JSON 샘플 다운로드
- 왼쪽 창에서 대화형 스킬 –> 지식 그래프를 클릭합니다.
- 가져오기 옵션은 각 지식 그래프에서 찾을 수 있습니다.
- 계속 진행하려면 지식 그래프를 백업하라는 메시지가 표시됩니다. 백업하려는 파일의 CSV 또는 JSON 형식을 선택합니다.
- 백업 후 진행을 클릭합니다.
- 해당 대화 상자에서 샘플 JSON를 클릭합니다. JSON 파일이 로컬 컴퓨터에 다운로드됩니다.
JSON 참조
속성 이름 | 유형 | 설명 |
FAQ | 배열 | 다음과 같이 구성됩니다.
|
질문 | 문자열 | 기본 질문은 FAQ 배열에 포함되어 있음. |
답변 | 문자열 | 봇 응답은 FAQ 배열에 포함되어 있음. |
용어 | 배열 | 질문이 추가된 리프 노드와 첫 번째 수준 노드까지의 부모 노드가 포함됩니다. |
refId | 문자열 | 이 FAQ의 원본으로 사용되는 외부 콘텐츠의 선택적 참조 |
대체 질문 | 배열 | 대체 질문과 용어로 구성됩니다. 리프에서 첫 번째 수준 노드까지의 용어를 포함합니다. |
동의어 | 개체 | 용어 및 해당 동의어의 배열로 구성됩니다. |
Unmappedpath | 배열 | 질문이 없는 노드 배열과 첫 번째 수준 노드까지의 모든 상위 부모 노드로 구성됩니다. |
특성 | 개체 | 특성 이름을 키로 구성하고 발화 배열을 값으로 구성합니다. |
분류법 기반 KG의 경우 KG의 다른 FAQ에 연결된 FAQ가 하나 이상 있는 경우 다음 필드를 포함할 수 있습니다. :
- faqLinkedTo – 원본 FAQ를 식별합니다.
- faqLinkedBy – 연결된 FAQ를 식별합니다.
- isSoftDeleted – FAQ를 식별하기 위해 삭제되었지만 일부 연결된 FAQ가 있습니다.
CSVまたはJSONファイルでナレッジグラフを構築し、ボットにアップロードすることができます。同様に、既存のナレッジグラフをCSVまたはJSONにエクスポートすることができます。ナレッジグラフをエクスポートすると、スプレッドシートで編集したり、他のボットにインポートしたりするのに役立ちます。最大50kのFAQを最大20kノードに分散させるというプラットフォームの制限があります。この数を超えるファイルのインポートは拒否されます。
ナレッジグラフのインポート
- KGをインポートしたいボットを開き、構築タブを選択します。
- 左側ペインで、会話スキル -> ナレッジグラフをクリックします。
- インポートオプションは、それぞれのナレッジグラフにあります。
- インポートをクリックします。
- インポートダイアログボックスで、以下のいずれかを実行します。
- ナレッジグラフをゼロから作成する場合は、続行をクリックします。(または)
- 既存のナレッジグラフがある場合は、必ず、CSVまたはJSONファイルにバックアップを取ってから、続行します。
メモ:ナレッジグラフをインポートしてもそれは更新されず、既存のナレッジグラフ全体が置き換わります。
- 「インポート」ウィンドウにファイルをドラッグアンドドロップするか、あるいはブラウズをクリックして、ファイルを探します。
- 次へをクリックして、インポートを開始します。
- インポートが完了すると、ダイアログボックスに成功のメッセージが表示されます。完了をクリックします。
- 階層はナレッジグラフに表示され、同じものを編集およびトレーニングすることができます。
ナレッジグラフのエクスポート
ナレッジグラフをエクスポートするには、以下の手順に従います。
ナレッジグラフの作成
プラットフォームのUIからナレッジグラフを作成するのではなく、スプレッドシートのような希望するエディターで、あるいはJSONファイルとして作業することができます。このプラットフォームでは、スプレッドシートまたはJSONでナレッジグラフを作成し、それを使用してボットにインポートするオプションが提供されています。インポートするには、以下の手順に従います。
- サンプルのCSVまたはJSONファイルをダウンロードします。これらのサンプルファイルは、空のナレッジグラフからもダウンロードすることができます。
- 質問、応答、同義語などに対応する行を追加して、ファイルを編集します。
- ファイルをボットにインポートします。
CSVファイルから
ナレッジグラフは、ボットからダウンロードできるサンプルのスプレッドシートを使用して作成することができます。ナレッジグラフを頻繁に変更することが予想される場合、アプリケーションのUIと比較して一括更新が容易にできるので、スプレッドシートで作成することをお勧めします。以下の手順に従って、スプレッドシートでナレッジグラフを構築します。
サンプルCSVファイルのダウンロード
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.
JSONファイルから
Kore.aiでは、ナレッジグラフをJSONで作成し、アップロードすることができます。その構造を理解するために、ボットからサンプルのJSONをダウンロードすることができます。以下の指示に従い、JSONを使用してナレッジグラフを構築します。
JSONサンプルのダウンロード
- 左側ペインで、会話スキル -> ナレッジグラフをクリックします。
- インポートオプションは、それぞれのナレッジグラフにあります。
- 続行する前に、ナレッジグラフを バックアップするように指示されています。バックアップのCSVまたはJSON形式を選択します。
- バックアップ後、続行をクリックします。
- 対応するダイアログボックスで、サンプルJSONをクリックします。JSONファイルがローカルコンピュータにダウンロードされます。
JSONリファレンス
プロパティ名 | タイプ | 説明 |
FAQ | 配列 |
以下のもので構成されています。
|
質問 | 文字列 | プライマリ質問:FAQの配列に含まれる。 |
回答 | 文字列 | ボット対応:FAQの配列に含まれる。 |
用語 | 配列 | 質問が追加されたリーフノードと、第1レベルノードまでの親を含む。 |
refId | 文字列 | このFAQのソースとして使用される外部コンテンツへの任意の参照 |
代替質問 | 配列 | 代替質問と用語で構成されています。リーフから第1レベルノードまでのアイテムを含む。 |
同義語 | オブジェクト | 用語とその同義語の配列で構成される。 |
Unmappedpath | 配列 | 質問を持たないノードと、第1レベルノードまでのそのすべての親ノードの配列から構成される。 |
特性 | オブジェクト | キーとして特性の名前、値としての発話の配列から構成される。 |
タクソノミベースのKGでは、KG内の他のFAQにリンクしているFAQが1つ以上ある場合、以下のフィールドを含めることができます。:
- faqLinkedTo – ソースのFAQを識別するため。
- faqLinkedBy – リンクされたFAQを識別するため。
- isSoftDeleted – FAQは削除されたが、まだいくつかのリンクされたFAQがあることを識別するため。
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.
Importing Knowledge Graph
- Open the bot where you want to import the KG and select the Build tab.
- On the left pane, click Conversational Skills > Knowledge Graph.
- You can find the Import option on the respective Knowledge Graph.
- Click Import.
- 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.
- If you are creating the Knowledge Graph from scratch, click Proceed.
- Drag and drop the file in the Import window or click Browse to locate the file.
- Click Next to begin the import.
- After the import is complete, the success message appears in a dialog box. Click Done.
- 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:
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:
- Download sample CSV or a JSON file. You can download these sample files from a blank Knowledge Graph too.
- Edit the file by adding rows corresponding to the questions, responses, synonyms, etc.
- 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
- On the left pane, click Bot Tasks > Knowledge Graph.
- You can find the Import option on the respective Knowledge Graph.
- You are prompted to back up the Knowledge Graph before proceeding. Choose the CSV or JSON format for the backup.
- After backup, click Proceed.
- 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
- On the left pane, click Conversational Skills –> Knowledge Graph.
- You can find the Import option on the respective Knowledge Graph.
- You are prompted to back up the Knowledge Graph before proceeding. Choose the CSV or JSON format for the backup.
- After backup, click Proceed.
- 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 | 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.