Solve chat bot interaction problem using tensorflow js

Chat bots are becoming quite popular. More and more companies are introducing chat bots systems into their business. The advantages of such a strategy are obvious. Companies improve their revenues through cost savings in maintaining consultants, and achieve better conversions. But there are some problems that need to be solved.

In this article, let’s talk about how to improve the user experience of interacting with a chat bot using machine learning algorithms. Intuitively, I understand that most of the effectiveness of interacting with chat bots is rubbed due to the fact that the user does not interact correctly with the chat bot. The fact is that most developers are thinking about how to improve accuracy and how to make the chat bot look like us. But, what if the problem is that AI will never be like us? In this case we need to learn how to properly interact with AI to achieve maximum efficiency in solving our issues.

I believe to the developers, should present new technologies to users as conveniently and clearly as possible for end users.

I consider this problem from the point of view of my personal experience in using chat bots. Often I encounter such a problem that it is not entirely clear how to communicate with the bot. It is not clear what the chat bot is capable of and how you can interact with it.

When analyzing the interaction of the chat-bot with clients, it can be concluded that clients are asking questions that are not relevant to the working topics of the chat-bot. In general users do not understand what the chat bot is capable of.

I thought it would be nice to see some kind of road-map so that the user can understand what the chat bot is capable of, instead of impulsively typing tons of messages into the chat bot input window and be surprised that the chat bot does not understand you.

It is interesting to note that just as algorithms see patterns, people also think and act in certain psychological patterns. Therefore, it is logical to assume that clients will introduce certain semantic patterns in order to get an answer. Therefore, here we can connect AI algorithms to find these patterns and predict what information the client wants to receive.

And so, for example, I took a data set of the visa center. This data set was created independently by people, since the same questions are constantly asked at the visa center.

But we need to somehow structure it all in order to maximize the interaction with the chat bot.

Try demo how it works

CM of predicted words:

  1. Visual presentation.

Studies conducted several years ago showed that people are able to remember more than two and a half thousand images, and the percentage of accuracy of their subsequent reproduction is 90, despite the fact that the participants in the experiment had the opportunity to see the image for only 10 seconds.

To solve this problem, I would like to introduce to the user, as well as the company itself, the opportunity to look inside the bot’s brain and see the interactions between words.

2. Prediction of user question.

When a user asks a question to a bot, he wants to see the exact question. In order to solve the question of how the bot understands you correctly. I decided to add functionality to predict the user’s question. This is obvious, if the right question, then the correct answer. Therefore, if the user sees that he has asked the wrong question, then he can rephrase it.

3. Next word prediction

I thought that it was necessary to implement a client-side model that would reactively analyze the input text and suggest where to navigate in order to write the right questions for the bot. This model is to learn from the programmed correct questions, or from the questions of clients who ask the bot.

4. Predicting the correct answer.

I left this item as the very last. Because if the user enters the correct questions, then the actual accuracy of predicting the correct answer will be quite high.

Now a few words about the problems in development.

During the development of the chat bot, I came to the decision that it is rather advantageous to transfer some of the calculations to the client side. At the moment, my project is a symbiosis of algorithms on the backend and frontend side. So far, only such a symbiosis of solutions allows you to implement ideas that I can provide to the user.

I continue to work on introducing new functionality into smart chat bot widgets that I develop in my startup Adviserway

Try demo topredict next word using tensorflow js

If you are interested, follow me in Linkidin