This tutorial is designed to familiarize you with Knowledge Base.
Step 1: Add a knowledge base
- In the Dashboard, click Add Knowledge Base in the upper-right corner.
- Choose a name for the knowledge base, and select whether you'd like to import a pre-configured knowledge base from a CSV file or a Google spreadsheet. Importing a knowledge base from a file isn't mandatory. Simply click "Add" without selecting a file if you'd like to start with a blank one.
The search view appears. In this default view, you can search the title, intent qualifiers and content of articles.
Step 2: Add an article
- Click Add New in the upper-right corner.
- In the Title field, enter a title that is a complete sentence, e.g., "I can't remember my password."
- Under Intent Qualifiers, try to add at least 5 intent qualifiers that our NLU engine will use to match the article to user input.
- In the Summary field, enter a brief message to be sent to the user. You can include web links in the summary, although depending on the channel they might not display correctly. For SMS/Messaging, you might need to show the URL by itself, not wrapped in HTML, since the HTML will be sent as plain text over these channels.
- Under Tags, add some tags that highlight the key nouns in your intent qualifiers and title. These tags assist the NLU engine in matching intents, your content, and the user input by highlighting the key sections of the user's message in regards to the intents that you created.
- Click Save.
Back in the search view, you should now see your new article, which should look something like this:
Note that the article has a “Pending” notation on it. We add this for new articles and for articles created by agents using the Agent Advisor widget, so that a manager or supervisor can approve them before they are included in the results.
Click Approve to continue.
Step 3: Train and tune
Before we add more articles, let’s test our knowledge base and see how our NLU will return results.
In the search view, type something close to your article’s title or intent qualifiers. In the example we gave above, we'll type something like “my username isn’t working”.
Even though this utterance was not exactly the same as what was added, it still matched the article with a VERY GOOD confidence.
Try a different user input, like, “my password is not letting me into my account”.
This is different enough that the NLU engine will return as FAIR PLUS. Generally, we set the threshold to GOOD, so, in this new example, the article won't be shown to a user. However, we can easily “train” the article to respond to this input regardless by clicking the thumbs-up icon right beneath the result.
Go ahead and click thumbs up now.
This adds the utterance to a set of “positive learnings” that are used in the matching.
Resubmit the search.
The article should now come back as VERY GOOD.
What about thumbs down? This should be used sparingly to differentiate two articles that might have intents that are close in meaning. NLU is not a specific pattern match, but more fuzzy, so having articles with similar intents but different content should be discouraged. That said, using thumbs down can help when that does occur, to indicate which of the two articles you'd like the NLU engine to match. Simply use the thumbs-down button on the article you'd like to de-prioritize, and the NLU engine will "prefer" the other one over it.
For more best practices, see Training and Tuning your Intents and FAQs.
Step 4: Use entities
Entities are keywords that refer to a number of synonyms. For example, the entity
sports might have a number of synonyms, like walking, running, football, jogging, baseball, etc. When creating intent qualifiers and tags for your articles, you can leverage the power of entities as well.
Leveraging entities within a knowledge base provides the same benefits that doing so affords you elsewhere: They are a great way to make intents even broader, allowing the NLU to associate a group of words (like similar products, different misspellings of common words, and so on) with an entity instead of pattern matching to every single item in the group.
Connect the domain to the knowledge base
To use entities within a knowledge base, you'll need to connect the domain. Let's assume you've completed this step (created a domain and connected it to the knowledge base), but for reference you can do it as follows:
- Click in the lower-right corner.
- Click KB Settings.
- Scroll down, and click More Options.
- In the Associated Domain for Entity field, select the domain.
- Click Update.
Let's further assume that the domain includes an entity called
credentials. It contains the following values:
Use the entities in the knowledge base
In your article, go ahead and replace any word where you want the credentials entity to be substituted in, including the tags. Things should look like this:
Now, when someone says an utterance that includes any of the entity synonyms, they should match.