At Hubi.ai, we’ve created dozens of knowledge bases packaged in off-the-shelf modules. These knowledge bases give your bot access to hundreds or even thousands of knowledge. But how does Hubi understand and answer all your questions? That’s what we’ll find out in this article.

What do knowledge bases contain ?

In the article “Knowledge management: the key to a successful chatbot project”, we explained that knowledge bases are collections of question/answer pairs. These question/answer pairs are subdivided into two parts:

  • A set of questions
  • An answer.

In other words, a set of questions point to the same answer. In the Hubi editorial team, these questions are called “Alternative Questions”. As the name implies, alternative questions are nothing more than alternative formulations of a single question, called the “Original Question”. The main question is usually the most explicit question about the expected answer: it reflects the content of the answer as closely as possible.

Alternative questions

In everyday life, there are dozens of different ways to formulate a question to obtain the same answer.

Let’s take an example: you want to delete a file but you don’t know how. The first question that might come to mind is “How do I delete a file?”. However, there are other formulations of this question that you might not have thought of. Here are a dozen alternative formulations of the question “How do I delete a file?” :

  • How to delete a file?
  • How do you delete a file?
  • How do we delete a file?
  • What is the method for deleting a file?
  • What is the best way to delete a file?
  • I want to delete a file
  • I would like to delete a file
  • Delete a file
  • What are the steps to delete a file?
  • Tell me how to delete a file
  • Explain me how to delete a file
  • I don’t know how to delete a file

Most of these statements have different syntactic structures but always use the same key words: the verb “delete” and the common noun “file”. In addition to being conjugated, pluralized or agreed (in French), these keywords can be replaced by synonyms or terms from the same lexical field. For instance, the verb “delete” can be replaced by the verb “erase” or the common noun “deletion”, and the common noun “file” can be replaced by the common noun “document”.

Rewriting the above list of questions by hand with these few lexical changes would considerably lengthen the list of alternative questions, but is a tedious and time-consuming task…

Synonyms

The development of a synonym functionality will largely automate the creation of alternative questions in the question-answer pairs of the knowledge bases. The setting of synonyms in each knowledge base will allow the automatic generation of new formulations.

Thus, formulations that content creators would not have thought of will be covered by the bot, whose accuracy of answers will be improved. This synonym functionality will allow all users to freely formulate their question and get the right answer.

The relevance of the questions generated by this functionality will still have to be controlled and ensure that the alternative questions of the various inter and intra knowledge base question-answer pairs are not identical or too close. The appearance of duplicate alternative questions would lead to confusion and hesitation, which would strongly affect the bot’s results.

Conlusion

The management and automation of alternative questions in knowledge bases is an important task. Indeed, Hubi trains itself on these lists of alternative questions to come up with the answer that best matches the user’s input. The more alternative formulations there are, the better the bot will be able to identify the expected answer with a high confidence index.