Training your help bot and knowledge base


If you are using your chatbot to answer questions, you first need to set up your knowledge base, which serves as the memory of your chatbot.  Click here to learn more about your knowledge base.  Click here to learn about how to add the ability for your bot to answer questions by adding the Search Q&A element into your bot script. If you have already set up your knowledge base and have a bot including the Search Q&A element, you will want to make sure that your knowledge base is set up in a way that assures that your chatbot responds to queries in a way that is optimized for your site.  This article focuses on this iterative process.

When a visitor engaging with your chatbot types a query in the Search Q&A field at the bottom of your chat window, Gobot leverages natural language processing to extract adjectives, nouns, pronouns and verbs from the query.  These words are then searched against the content of the articles in your knowledge base, including the article body, the article title and the article bot trainer keywords you've assigned.

Each article is then scored using a special algorithm as to relevancy against the words extracted from your visitors' queries.  Among other things, the algorithm takes into account how common the query terms are in the entire knowledge base. In fact, the algorithm takes a number of factors into consideration but the only ones Gobot users have some control over include the content of the article, the article title and the bot trainer key words.  Bot trainer keywords are given more weight than the article title, and words in the article title are given more weight than the article body.  

In light of the above, if your chatbot is not suggesting articles you would expect in response to particular queries, we suggest that you engage in an iterative process to tweak the keywords and article title until your chatbot accuracy has improved sufficiently.

Some optimization tips:

-Be careful about including too much content in a single article.  Each article should ideally answer a single question.  Rather than include content that is only tangentially related to the article title, we suggest that you link to these other sources and/or list them as "Related Articles" in the right hand panel of the knowledge base builder when drafting your articles.  If you include content that is not directly related to the question you are addressing this will likely skew your chatbot's ability to suggest the right content in response to visitor queries.

-Don't rely on prepositions in your bot trainer keywords (e.g., "on the house" or "under the desk", etc.) as they are not considered by our algorithm. 

-Be careful about using bot trainer keywords unnecessarily as this may skew your bot's responses.  For example, if you have many shipping related articles (most stores do!), you don't want to use the word "ship" as a bot trainer keyword in only one of the shipping related articles because that would result in that article likely being presented over others that may be equally relevant to the query.

-Avoid using phrases for your bot trainer keywords.

-Be careful about using overlapping articles with different titles covering very similar content.

-Consider including your articles in different categories to better organize your articles.  Also, consider adding related articles to each article.


You can leverage these categories to narrow the body of articles your bot searches.  For example, your bot can present a quick reply allowing a visitor to select from categories such as Shipping, Sizing, Products, etc.  After a visitor selects a category your bot will know to limit it's search to articles in the selected category provided you selected this option when setting up your bot.  After dragging the Search Q&A element into your bot script you can limit the search to a particular knowledge base category in the right hand editor panel.


Copyright 2020, Gobot LLC, All rights reserved.


Was this article helpful?


You might also find interest in these related articles:

  1. Q&A Functionality and Self-Help Chatbot
  2. Gobot Knowledge Base