< Back to articles

Everybody Wants to Own a Chatbot

Last months on the internet could  have been easily described by the meme above. Every company and site has its' own chatbot and maybe you want it too. But the question is; do you really need it?

The main purpose of BOTs of any kind is an automatization of everything. The word chat could refer to 2 things, it could imply that chat is a subject of the automatization or the communication interface.

But it can go way further than that, all bots have something in common. They all serve to make some action or pass some information to the end user. What differs is how they approach it.

We will cover the most common case which is using a chat interface to automate tasks or to retrieve information without people being involved on the other side of the discussion.

How does it work?

Firstly you need a chat interface. Probably the most popular one is Facebook Messenger or Viber. Or you can create your own interface which you can put on your website.

The Purpose of the interface is to provide a good user experience with typing or reading messages. Another purpose is to send metadata about the conversation like details about the user, attached images or any other information related  to the platform.

This helps a lot not only because you don't have to work on the interface yourself, but also it helps with acquiring new users. People know those platforms and use them  everyday, they are familiar with the interface and they don't need to browse the internet to find out how to use your bot.

So after all, is it without work?

No, not at all. The interface only gives you the possibility to receive and send messages to the user but not the whole logic around your bot. Commands, conversations or interactions are matters  you need to deal with on your own terms and you need to implement them yourself.

You need to have a server which accepts requests from the interface and can send messages back to the interface. You need also to take care of storing information which you need for your business intentions. You can use any programming language you utilize  on your servers today. Of course there are tons of tools already available for node.js which we highly recommend to use because it is perfect with its asynchronous model. Other option is to use an open source software which can do lot of things already and is made for creating bots like Botpress.

Chatbots meme picture

What are the intents of having chatbot?

The most important aspect of any bot is the Intent. In simple terms it means what your bot can do. If bot is programmed to operate lights, you will have hard times with persuading him to set the temperature in your living room.

Nowadays bots are created for two main reasons. Firstly it does something for you on your command like setting temperature, ordering a smoothie or reserving table at your favourite restaurant. Secondly  bots can easily retrieve some information for users without a necessity to involve other human beings. A great example of the latter is retrieving cinema schedule or getting current status of your parcel.

How does a chatbot know what I want?

This is the most crucial part in the whole “bot universe”. Leading tech companies are racing to create NLP (natural language processing) algorithms which can help programmers to detect user's intents and context of the messages. And they are making great progress. Some of them are even available for programmers (wit.ai). The problem with those tools is that they mostly work only in English and other language support is rather experimental. Other thing is that it is not really pleasant  to have a lot of branches (decisions) to deal with during conversations. because it is a bit harder to tweak and extend the capacity of AI.

Fortunately there are other, simpler solutions which are pretty much suitable for most cases. If you choose the easier path you must accept the fact that you won't leverage benefits of NLP (determining entities and intents out of text), instead you are left only with “exact match” or with format which is easily parsed by the computer (e.g. comma separated or predefined format for the user).

The first and the easiest approach is a single command bot. If you have ever encountered any command line interface when working with your computer, this is exactly like it, except instead of writing into “nerdy console” you are chatting on Messenger. You write command and bot executes it and returns the result back to you.

It gets more complicated if you want to get more complex stories, where bot retrieves information step by step from the user, which corresponds more to the chat/dialog interface. The only problem is that you need to keep track of the context and conversation so you know how to react and what to expect from the user. You can start simply with if/else but it will get messy and become a disaster. A better solution is to use some kind of a decision tree, where you can specify your storyboards within easily editable format which could also be visualized. A great usage could be an Alquist which uses finite state machine to define your bot flow.

How to begin with my bot?

Even though it is not that complicated to create your own bot, you should consider first if a bot is really what you need. If so, you need to choose wisely which platform and backend will be the backbone and the face of your bot. If you are still not sure, feel free to hire us for the job. :)

Dominik Veselý
Dominik Veselý
Co-Founder & CTODominik is the Ackee information router. He is an early adopter of technologies and gadgets of any kind. He runs, rides a bike, and drives a cabriolet.

Are you interested in working together? Let’s discuss it in person!

Get in touch >