How Sigma Software Worked on a Chatbot for Internal Use

Hi, I am Nazar Grycshuk. Recently I took an interest in everything that has to do with Data Science. Actually, it was this interest that made me involve in the project of a chatbot development, which I am going to talk about here. My article will touch upon such things as methods for collecting data to be used in the bot database, choosing a framework, working with agents, the language issue, and usage of slang words.

But first, a few words about …

This year, the Chatbot Summit in Berlin gathered over 50 companies engaged in development of platforms and additional services necessary for chabots’ work. They can be divided into those, which can deploy on the client’s private servers, and those, which work exclusively in the cloud as SaaS solutions. Most companies have their own NLP engines to recognize intents and named entities, others can integrate with third-party services. As an additional functionality, some have an editor to build a dialog tree. They are also different as to the number of languages they support.

The event demonstrated a lot of examples of using chatbots for supporting users of large corporations. They have similar working practices: there is an existing support line, and the chatbot is trained to help in specific situations, for example, when there are issues with authorization to the corporate system. The bot listens to all incoming messages, and if it can answer, it answers. Over time, the number of questions the bot can answer keeps growing.

Enterprise Chatbot App Development

A lot was also said about Conversational Experience, but it is built upon a large number of rules. Generally, the tendency to use chatbots is more than positive. So, we have tapped into this tendency here in Sigma Software and created a bot named Sima.

Beginnings of our Chatbot Development

Once I was invited to a meeting dedicated to improving the work of our HR Department and to possibilities of automating certain processes in order to reduce operting costs. One of the main activities that is very time-consuming and requires optimization is answering the same questions, which come from colleagues in a constant flow.

“Let’s create a chatbot and add it to our internal social network! How much time will it take?” I was asked.

“Several months, if we start with a small number of questions”, I replied.

It became clear very soon that development of a chatbot would not be really cost-effective, so I never expected this conversation to continue. However, only a couple of months later the work on developing the chatbot started. A few factors contributed to this.

First, we were at the same time developing virtual assistants for our customers and needed to test some ideas, which we could not test on external projects.

Second, it became clear that a chatbot does not only provide answers, but also a lot of convenience as it allows to collect statistics, which can later be used to:

  • Track various questions and get a clear understanding of what really worries people in the company;
  • Provide employees with a possibility to ask questions, which you don’t usually ask in a private talk;
  • Automate the support of groups in the internal social network;
  • Motivate and provide assistance in executing recurrent tasks, such as reporting efforts, etc.;
  • As a result of all this – to build a friendlier team.

So, we began the work in May 2018. And the first thing we tackled was making a detailed…

Chatbot Creation Plan

According to customer’s expectations, our Chabot had to:

  • respond to the most frequent questions;
  • be easy to support;
  • be integrated with our internal Facebook Workplace social network;
  • support one language, to start with.

If the readers have at least a little experience in creating chatbots, they’d say they would do this in two or three weeks.

Custom Chatbot

Ok, so what questions should it answer? The most frequent ones are not a valid answer to base on when you are starting a project. You might have thought that:

  • You can ask the HRs what those questions are. Of course, you can. However, you are likely to get not an exhaustive list of questions, but only those the HRs could remember or ask from colleagues;
  • Each company must have SharePoint or some other internal resource where you can look up the search history and those pages that have the largest number of views. It is an option, but it doesn’t give you the exhaustive information either.
  • You can parse lists and enter questions, cluster them. I don’t know how appropriate this is from the moral point of view (you never know what people wrote) and who might provide you with access to such information. We didn’t go this way.

Looking ahead, I must say, we did not find any genius solution for doing this. So we thought, “Let’s add up everything we have, get it launched and see what happens”.

However, we did implement one thing. We have a special portal for internal use where the company posts useful content like:

  • What do you do if you’ve got sick?
  • What trainings and certifications does the company carry out?
  • How do you get to a conference as a participant or a speaker?
  • etc.

So, we wrote a small script to fish out all these questions from the portal’s text. There were about 300 of them and quite good ones. That was enough for a short testing set.

Choosing a Chatbot Framework

Nowadays, the market offers a lot of various services, for instance:

  • Watson Assistant
  • Dialogflow (api.ai)
  • Wit.ai
  • Luis + Microsoftbot framework
  • Rasanlp
  • Chatfuel
  • Botkit
  • 100500 others

It’s not an easy task to make a choice. Before that, we had worked with such frameworks as Watson, Luis, Wit, Rasanlp. They are all rather good and have a number of both strong points and downsides. Your choice must consider all nuances of your project and your customers’ expectations. For example, many of our customers do not want to use any solutions that store data anywhere outside of their servers, so this is one of the questions to take into account when choosing a service.

After all, we decided to use Dialogflow for our chatbot. We did it for a number of reasons:

  • Question classification according to intents is free here;
  • The framework has an online environment for adding intents and simple scenarios;
  • It collects some statistics;
  • As well as supports integration with many messengers;
  • And supports a lot of languages;
  • It makes adequate classification of questions into intents;
  • And has good documentation.

Having chosen Dialogflow, we wrote a few rules on how to make questions/answers, how to add them, and what it all has to look like. Later on, we asked the people who are responsible for different areas (HR, support, Finance, etc.), to come in themselves and add the questions that were, in their opinion, relevant and necessary to add.

To be honest, the whole idea was doubtful, because people first had to spend time reading the document, then figuring out how it worked, then drawing a list of questions and adding them to the system.

But as a result, it all worked out perfectly, because the immediate process owners:

  • Know how to correctly formulate questions better than anyone else;
  • Can simplify a question without losing any meaningful content;
  • Can combine questions and cover a few possible scenarios with one answer;
  • Can formulate a question so that it is clear and exhaustive.

Involving colleagues from different structures played an important role in supporting the bot right after the release, as they could easily enter the admin version and add all the questions that did not yet have an answer. Thanks to this, we had a powerful backup!

Documentation and Finding Answers in Files, Work with Document Templates and Slang

We provided the bot with the functionality to use various documents for finding answers to questions.

The company has about two thousand documents, which describe approaches to solving different tasks, to project management, career growth, project start, etc. There is a number of templates that people need to fill in, but are hard to find in the documents hierarchy, especially when you don’t know their exact names. We took this inconvenience into account and enabled the bot to return these templates when a user asks for them.

Software Engineering
Looking for a technological partner to develop an AI solution?

We have a dedicated R&D hub equipped to create proved and brand new AI solutions.

Some of these documents are written in English, others in Russian or Ukrainian. Requests for them may be in different languages too. There may be mistakes in requests. Besides, colleagues often use slang or jargon, English borrowings and abbreviations like ‘PM’, ‘skill matrix’, ‘roadmap,’ etc.

To guarantee the bot’s efficient work, we used multi-language representations of words in a vector space. It enabled the system to understand that the words ‘Manager,’ ‘Meneger,’ and their Cyrillic versions will mean more or less the same. It was followed with a bunch of modeling and improvements – but they are a story for another article.

How it All Works Together

Our chatbot is integrated with the corporate SharePoint and the internal social network. There users can ask questions, which go to the Rest service. This service, in turn, addresses Dialogflow to recognize details. If Dialogflow has an answer, the system sends it to the user. If it doesn’t have one, the bot looks for it in the files or sends a document template.

Each answer we are not sure about is followed by an automatic collection of user feedback, whether they were satisfied with the answers. If not, the answers are channeled to the responsible agent who, firstly, answers the question correctly, and secondly, adds the answer to the system or improves it. This way, the bot will be able to answer the same question correctly next time it is asked.

Conclusion: Creating a Chatbot is Just the Top of Iceberg

Everything that looks rather easy at first glance can lead to a number of pitfalls in the process of implementation.

Here are some tips and warnings for those who dream of creating their own chatbot:

  • First things first, you have to define your target audience clearly, as well as the tasks and problems the bot must solve. It is necessary for the right focus and to cover these areas well.
  • In general, people who talk to a bot expect it to answer all their questions (including, ‘Is there life on Mars?’ and ‘What is the meaning of life, universe, and everything?’). In order to avoid unjustified expectations, it is necessary to prepare the future users, explain and share the info about the main aims and capabilities of the bot, and plan promotional activities.
  • Creating a bot is just the top of the iceberg. To make the project successful, you must build an effective system of the bot support and a way to keep it improving and learning.
  • Although dialogs may be very similar to a person-to-person communication, it’s not worth making the bot pose as a human. Sooner or later, the user will understand this and feel disappointed.
  • Sure, the bot must be fun to communicate with, so a little sense of humor will come handy.

Care for your users – make their life easier and help them in solving their problems!

Share article: