- Created by Chitra Borker (Deactivated), last modified on May 02, 2023
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 14 Next »
The Knowledge base builder tool allows you to build a conversation easily via an intuitive user interface and then use the resulting JSON in the knowledge base Skill. Knowledge Base contains your library of Q&As: questions the user might ask around a given topic and how your Digital Person would answer. Easily build your Q&A base with this tool, then train the NLU and test how it would play out. When you're done, export the Knowledge Base as a JSON file and take it back to DDNA Studio.
Accessing Knowledge Base Builder
You can access the KnowledgeBase Conversation Builder from the left navigation menu of the Knowledge Base Skill or access it directly from https://knowledgebase-ui.prod.soulmachines.cloud/.
Use your Soul Machines credentials to log into Knowledge Base Builder. The landing page of the Knowledge Base Builder lists all the Knowledge bases created by users of your organisation. You can either create your conversation from scratch or edit/duplicate existing Knowledge Base.
Creating new knowledge Base
To create your Knowledge Base from scratch, press the + button and enter a name for the Knowledge base. Under each topic you can have multiple related questions and answers.
Field | Description |
---|---|
Topic Name | Used as a unique identifier for each JSON object. (i.e. WhatIsSoulMachines) |
User Question/s | List of strings that contain examples of different utterances from the end user (i.e. "what is soul machines", "tell me about soul machines", "who is soul machines", "who are soul machines", "what are soul machines", "what is soul machine", "who is soul machine", "who are soul machine" ) |
DP Answer | List of responses the Digital Person should use to answer that question. If more than one value is found for a given topic, the skill will randomly pick one of the responses to reply with. (i.e. Each answer can be associated with visual elements using content cards. |
Adding Content Cards
In order to enhance the responses with media or links you can add content cards to the DP Answers. Available content cards are Image(s), video, link, list, and markdown. To add content cards:
Create a DP answer
Click the answer to Edit
In the dropdown select a content card you would like to use.
Crawling your website
You can build your Q&As by crawling your website. This option scans your website and creates an index of all the pages with a list of user questions and DP answers along with a KB JSON file. As the user navigates the site, KnowledgeBase will match on the URL of the page to greet them with a page-specific response. You can then review your knowledge base and add any additional topics, customise DP answers or add content cards.
The output of the crawl has the following:
The "example" is the full URL (both with and without the www). This is used to match the page the user is visiting
The "response" contains (in descending order based on availability)
meta:description
H1 tag text
Page Title
The website crawl option does not produce production-ready output, but rather serves are a good starting point when building a tailored conversation.
Important:
The webcrawler honors the robots.txt for a given site, so if they disallow crawlers, we will not be able to generate an index for them
The crawler is most appropriate for small to medium websites (under 500 pages). Large sites (https://homedepot.com for example) will take hours to index and the resulting file will be so large it will be unusable. The https://soulmachines.com site contains about 450 pages and takes 00:02:15 to index
Editing existing knowledge Base JSON
If you already have an existing knowledge base, you can either upload it via a link Or paste the JSON directly:
The JSON file must be in its raw form or hosted on any static site.
It needs to be publicly accessible (no login or other steps)
It needs to directly serve the .json file as raw text (not formatted to look nice, not served up in a viewer)
Training and Testing your Conversation
Once you have either created a new topic, or modified an existing topic, it will enable the “Train Conversation” button allowing you to then test how the DP might respond to the questions. It is necessary to train the conversation before you can test it. Training the conversation takes between 15 seconds and a minute, depending on the size of your knowledge base. During this time you’ll see the “Training …” button. At any time, you can switch from conversation mode to view the generated JSON using the toggle at the top right-hand corner.
Once the conversation is trained, you can start testing it by sending in questions in the chat window that would simulate what a user might ask. Any cards that are configured in the response will be shown, and the @ShowCards(xxx) command will be stripped from the response to replicate what a user would actually see.
Note: If you make a change to the knowledge base, the text input will go away and you’ll be required to re-train the conversation before you can continue testing.
Using Knowledge Base in DDNA Studio
Every knowledge base is saved in the cloud location and is automatically updated after every change. This allows the knowledge base to be accessed and utilized within DDNA studio without the need to manually update Knowledge Base Skill configuration for every corpus change. To integrate your knowledge base with DDNA studio’s Knowledge Base Skill:
Click Collect Knowledge Base and copy the URL of the Knowledge Base.
Enter the URL in the Knowledge Base Skill configuration along with other settings.
Click Apply Changes.
Optionally, you can copy the Knowledge Base to the clipboard or download the JSON file locally. This will allow you to share the Knowledge Base externally, if needed.
Contents
- No labels