How to add questions and responses, build intent?
1. Starting with the structure, building Labels with questions and responses
Developing content starts with defining structure, then labels, then designing conversational flow.
Defining Labels in Chatbots can be compared to building a sitemap for a website. They create the initial structure for the Chatbot’s content. They are essential, because if they are structured well from the start, it’s easier to build up content, and scale up the Chatbot. Creating a knowledge tree should be started by defining the areas of knowledge – from general to specific topics.
Example of a intent:
Company / Contact / Address
Each label covers a specific part of knowledge. A given label can have few matching groups, however if one would like to fully control the Chatbot’s knowledge one should create and use detailed intents.
For example:
Such an approach will lead to a situation in which every matching group has its own, unique intent. It allows a Knowledge Base to be flexible and transparent.
2. Building with the use of Templates (segment-specific predefined knowledge bases)
Some companies, due to the nature of the services they provide, have a similar scope of knowledge base construction. In order to meet such situations, we get the opportunity to use the ready-made "knowledge bases" of the base, characteristic of individual enterprises. Thanks to this, client (eg banking or financial) can take advantage of the ready template, substituting his answers to the formula and will be able to see how the correct structure of the knowledge base looks like.
3. Training: Creating groups of “question-response” matching
When a knowledge tree is ready, one can start to create groups of “question-response” matching and assign them to particular intents. These steps are actually an essence of building a knowledge base content. It’s a process of learning a Chatbot – when and what should he say.
To create a group of matching, one should consider the purpose of it – what response do one want a user to receive. Then one should create an intent for a newly created, empty group. Next steps are: adding a response and adding questions in the highest amount possible. It should be done in that order, because questions should result from the response’s content.
One can create a few synonymous responses as an exception, but only if one want the Chatbot to repeat itself. If a given association group has few responses and user asks a question that will eventually lead to that group, system will randomly choose any of those responses.
It is recommended to add different ways of asking – even incorrect ones. Such an approach minimizes a risk of a situation in which Chatbot does not know what to say. One should remember that questions should not repeat themselves in a range of one knowledge base, because system won’t be sure which of the responses should be given, so he chooses one randomly after a moment. One should take into consideration which prefix and synonym groups were created in the past so that the base uses in them in an optimal way.
Each question can be marked with the following flags:
SUGGESTED flag –question will be displayed as a suggestion after the group is connected to the linear dialog,
AUTOCOMPLETE –question that will display as a suggested one in the auto-complete window,
SUGGESTED NON-NLP flag – question will be displayed as a suggestion after the group is connected to the linear dialog, however it WILL NOT be recognized by the algorithm outside a given linear dialog (recognition will be only available in the given place of linear dialog).
FAQ flag –the marked question will be displayed on the list of the most popular topics
A good example of creating a group of matching will be ‘Company’ intents. Let’s assume that among many existing matching groups connected with this intent someone noticed a lack of information concerning actual contact details.
Do as follows:
4. Train AI - supervised Learning (semi-automated)
For enhanced training, InteliWISE offers NLP tools that enables automated classification of intents and entities (based on Machine Learning).
This technology offers:
a natural language processing tool for intent classification and entity extraction in chatbots
advantages are:
You don’t have to hand over all your training data to Google, Microsoft, Amazon, or Facebook
You can tweak and customize models for your training data
You don’t have to make an extra network request for every message that comes in.
5. Defining brand’s own keywords and phrases
Keywords are single words in the knowledge base with boosted weight over 100%. We can control the operation of the knowledge base by giving different weights to the keywords – from 100 to 10000%.
In the example above the keyword “ROI” was defined with maximum weight 10000%. It means that every user’s question containing this word will lead to a response from this group.
We can define many different keywords in one “question-response” group leading to the same response.
Note! Keywords cannot repeat itself in the range of a given base.
The weight boost applies to every word in the question we entered – that’s why we can only use one word keywords.
In the case where we need to define the keyword phrase containing two or more words, we have to use encapsulation and create the unique abbreviation in the Main synonym base (check 2.5. Defining Main synonyms).
For example: Financial report = finrep
After creating such abbreviation, we can add it as a normal question with boosted weight:
Below, one can find the result – the question containing encapsulated “financial report” phrase leads to the correct response:
6. Conditional Keywords (Adverse Events)
How conditional keywords work ? We'll explain later
7. Defining brand’s own synonyms’ library
Each brand or institution has its proprietary / specific names, terms or trademarks, thus it needs a specific verbiage. This is the reason why for every newly created knowledge base it is recommended to create a new, dedicated dictionary of synonyms which will be only used by a given brand or organization. An example of a group of synonyms for the example provided above is:
account = panel account = panel profile = profile
Last updated