Kore.ai Knowledge Graph (KG) helps you turn your static FAQ text into an intelligent, personalized conversational experience. It goes beyond the usual practice of capturing FAQs in the form of flat question-answer pairs. Instead, Knowledge Graph enables you to create a hierarchical structure of key domain terms and associate them with context-specific questions and their alternatives, synonyms, and Machine learning-enabled classes. This structure, when trained by the platform, generates a Knowledge Graph that enables an intelligent FAQ experience.
To generate a Knowledge Graph, you need to add FAQs to an existing or new bot. If you have not created a bot, refer to Creating a new bot.
Creating a Knowledge Graph involves the following steps:
Add Knowledge Graph to Bot
To open the Knowledge Graph builder, follow the below steps:
- Log in to Kore.ai Bot Builder and open the bot to which you want to add the Knowledge Graph.
- On the left pane, click the Bot Task and select the Knowledge Graph tab.
- Click Knowledge Graph – <Bot Name>.
Create the Graph
By default, the name of the bot becomes the root node of the hierarchy and you can edit this. Create the rest of the nodes below the root node.
To create nodes, follow the below steps:
- Open the Knowledge Graph.
- On the top left of the Knowledge Graph window, hover over the root node.
- Click the + icon. A text box appears below to Add Node. For better performance, there is a restriction on the allowed maximum number of nodes of 20k.
- Type the name of the node in the text box and press Enter.
Note: This node becomes a child for the root node and can be referred to as a First-level node. - Repeat steps 1 to 3 to create other First-level nodes.
- After you create First-level nodes, create child nodes as follows:
- Hover over any First-level node, and click the plus icon to create its child node.
- You can create a child node for any level nodes by hovering over it and clicking the + icon.
Build Knowledge Graph
The next step is to add Knowledge Graph Intents which can be either:
- FAQ – to answer user queries
- Task – execute a dialog task.
Add FAQs
Using this option, you can add relevant question-answer sets to the nodes in the hierarchy. Restrict the number of FAQs to 50k over 20k nodes to avoid performance issues. As you enter these questions, pay attention to terms that you can further add to your FAQ hierarchy.
To enter the question and answer for a selected node, follow the below steps:
- On the left pane of the Knowledge Graph window, click the node to which you want to add questions.
- Click Add Intent on the top-right.
- On the Intent window, under the Intent section, select FAQ.
- In the Add Question field, enter the question that describes the user’s query.
- Optionally, if there are alternatives to the same question, add the same in the Add Alternate FAQ field. Repeat the step for all the alternative questions you want to add.
- Post-release v7.2, you can use patterns to define the FAQs. This can be done by preceding the pattern with || (two vertical bars) in the alternate question field. The platform marks these as patterns and evaluates them accordingly (see here for more on patterns).
- For each question, you can add terms that will serve as tags in better identifying the question by the Knowledge Graph Engine.
Bot Responses
For the Response, you can compose a simple or complex channel-specific reply.
You can use the editor like any other prompt editor in the platform like messages for dialog nodes, etc, refer here to know how.
You can add channel-specific responses to questions in your Knowledge Graph. By varying the responses, you can make the language and formatting to leverage the strengths of the selected channels. To add a channel-specific response, select the channel from the channels list before typing the response.
Note: We recommend you to add one response for All Channels so that it can be used in the absence of a channel-specific response for a channel.
Sometimes the responses to the FAQ are quite lengthy or may include nice-to-have information along with the primary response. To improve the readability of such responses, you can split information into multiple responses that go as separate messages one after another by clicking Add Extended Response on the top-right of the Bot Response window.
Optionally, if there is an alternative response, click the Add Alternate Response to add the same. Repeat the step for all the alternative responses you want to add. At runtime, the platform will pick one response at random.
Run a Task
You can link a dialog task to a Knowledge Graph Intent. It helps you to leverage the capabilities of the Knowledge Graph and dialog tasks to handle FAQs that involve complex conversations.
- On the Intent window, under the Intent section, select Task.
- Select a task from the drop-down list. You can Add Utterance that triggers this task.
- If multiple utterances mean the same, Add Alternate Utterance.
- Click Save.
Build FAQs from an Existing Source
Chances are the Knowledge Graph you are trying to build is huge and complex. If you have all the FAQs in one place you can use the Import or Extract process.
- You can use Kore.ai Knowledge Graph Generator to generate Knowledge Graph from a FAQ list and import the same to your bot. See here for the steps.
- You can use the Import option to import a Knowledge Graph exported from another bot. See here for more.
- You can use an existing list of Q&As from Knowledge Extraction to populate the Questions and Responses. See here for more.
Traits, Synonyms, and Stop Words
You can improve the performance of your Knowledge Graph by adding tags, synonyms, traits, and more. Refer here to know more.
Manage Variable Namespaces
Manage Variable Namespaces section (introduced in v8.0) allows you to associate the Variable Namespaces to use with this Knowledge Graph. This option is visible only when the Variable Namespace is enabled for the bot. For more information, refer to Managing Namespace.
Update
Once created, there will be times when you want to make changes to the Knowledge Graph for better organization and presentation.
Note: After you make any changes to the Knowledge Graph, make sure to click Train on the top-right to send the updates to the Knowledge Graph engine. If you do not train the bot, the changes are not reflected in the bot responses.
By default, questions added to a child node are visible for all its parent nodes in the path, up to the root node. If you do not want the questions from child nodes to be seen beyond a certain parent node, click the following icon on the Questions pane of the selected parent.
The questions from all its child nodes are visible to the selected parent node and not to all its parent nodes.
Move Question and Answers Between Nodes
You can move one or more question-answer sets between nodes in your Knowledge Graph.
To move question and answers to the relevant nodes, follow the below steps:
- On the Knowledge Graph, click the name of the node from which you want to move the question-answer sets. The FAQs appear on the right pane.
- Identify the set of questions that you want to move to, and select the checkboxes next to them.
- Drag the questions and drop them on the relevant node. The node is highlighted and the questions appear on the right pane of the node.
Edit and Delete Terms
- On the nodes hierarchy from the left pane, hover over the term/node you want to edit.
- Click the edit icon. The settings window opens.
- You can change the name of the term, set the term types, add traits, add or remove synonyms, and manage context from here (see here for more).
- To delete a term:
- On the nodes hierarchy, hover over the term you want to delete.
- Click the bin icon.
- On the confirmation dialog box, you can find the following options:
- Delete the FAQs along with the term – Choosing this option deletes the term and FAQs under it.
- Delete the term and move FAQs to root term –
Choosing this option deletes the term and move the FAQs under it to the root term.
Note: If the term has child nodes, all those nodes will be deleted.
- If your bot is already published, you must train the bot for the deletions to be effective.
- If you have deleted the first level term you can selectively train to remove the deleted terms from the published copy.
- If you have deleted, say, the nth level child term, then you need to select the entire parent term for training.
Edit Questions and Responses
- From the nodes hierarchy, select the relevant term.
- Questions associated with the term appear on the right pane.
- Hover over the question to edit and click the edit icon.
- Make changes to the question or response and click Save.
- You can delete the question using the bin icon.
- Selecting multiple questions enables you to delete them in bulk.