Tag Archives: 2020

Building bot-ready knowledge bases #8: Lessons learned from our GROCERYbot project

Our experimental initiative to prototype a bot-ready information solution using Google’s Dialogflow

This post is part of a series. For more information and links to other posts in the series, see the “Building bot-ready knowledge bases” home page.

In this final blog of the GROCERYbot series, we explore the lessons we learned from the experience of creating a simple chatbot using Google’s Dialogflow. In summary:

  1. Our original hypothesis was naive!
  2. The chatbot agent environment and Dialogflow tool are still rather primitive and mysterious.
  3. A Dialogflow prototype is still a worthwhile effort.

1. Our original hypothesis was naive!

Way back in blog #1 of this set we confidently stated that “combining traditional structured writing strategies with the latest AI tools and techniques provides a more powerful, cost-effective, and user-friendly knowledge base solution than either strategy offers on its own.”

Wouldn’t it be nice if that were true–but there’s a lot more to it than we thought!

Unfortunately some of the typical and most powerful features of structured documentation, like minimalist writing in chunks, built-in metadata, and navigation between topics, can actually be impediments in the AI chatbot environment. When Dialogflow imports documents into knowledge connectors, only title and paragraph text is scanned; all else is ignored.

Of course we still believe in QUALITY writing like meaningful titles, easily identifiable entities and actions,  and careful proofreading, but we spent many hours rewriting, enhancing, and even TRASHING some of our best DITA-based writing efforts to make them usable to the Dialogflow engine.

2. The chatbot agent development environment and Dialogflow tool are still rather primitive and mysterious.

It’s hard to find chatbot training, templates, models, and examples. Google’s Dialogflow documentation lacks understandable roadmaps for particular projects.

Dick started with the Google-sponsored Coursera Dialogflow course “Building Conversational Experiences with Dialogflow.” The first part helped to understand basic terms like “entities” and “intents,” but the subsequent “deep dive” into Google Cloud Services lost him quickly.

More useful is the Mining Business Data website (also mentioned in our blog #4) with its many tutorials, videos, and articles describing how to use Dialogflow. Consultant Aravind Mohanoor is a good teacher.

It’s hard to define and implement the right process for a given project.

The use case you have in mind for creating a chatbot determines the best way to develop the bot.

We had to settle for a trial-and-error approach for our “question-answering” and “article-referring” use case:

  1. Create the entities.
  2. Create intents to handle likely questions that focus on the entities.
  3. Add knowledge connectors, one for each DITA topic, rendered as PDFs and an FAQ file.
  4. Add negative examples (information topics we didn’t want our bot to try to address) for the default fallback intent.

Although we were generally satisfied with the final result, we found useful advice sorely lacking as we stumbled along the way.

The chatbot agent training and debugging process is often mysterious and frustrating.

When testing the bot using the Dialogflow console, we often found it difficult to predict how the bot would answer a given query or understand why it behaved the way it did. There is not much in the Dialogflow documentation that tells you how it works. This is why it is good to start your bot development with a simple case, like our GROCERYbot. If you try to handle a large set of topics from the very beginning, your confusion will multiply quickly.

Some key Dialogflow features and functions are still in development.

In particular, Dialogflow’s Knowledge feature is still in beta. It handles a very small set of mime types (for example, PDF and CSV text files). When scanning documents, Knowledge ignores metadata and links. Short paragraphs are discouraged. Your Dialogflow Knowledge files cannot be included in your chatbot export file.

A Dialogflow prototype is still a worthwhile effort.

If you are thinking of “automating” your knowledge base using a chatbot, on your own, using a tool like Dialogflow, or hiring AI chatbot consultants to do the job for you, we recommend starting with a simple prototype and then working up to a set of about 25-50 KB articles.

And if you have a “slapdash” knowledge base that doesn’t meet minimal writing standards, spend the time NOW to improve it so that your bot-recommended KB articles provide your users with the most useful information package possible!

Possible follow-on projects

  1. Dick is in the process of creating a webhook to allow our GROCERYbot to look up information in an external website repository (real or virtual) and return it to the user as the response to a query.
  2. Dick is also working on integrating our personal WordPress site (newsfromnan.com) with the Telegram messaging app through Dialogflow.
  3. Anna is thinking about converting another DITA/XML project into a Dialogflow chatbot in the hope of discovering a smoother transition and additional synergy. In the process she hopes to discover other AI chatbot experiments similar to GROCERYbot.

We plan to blog about our experiences when the projects are finished.