How to Start Developing Your Intelligent Chatbot | Derry, NI, Ireland

How to Start Developing Your Intelligent Chatbot | Derry, NI, Ireland

How to Start Developing Your Intelligent Chatbot

Now, we already talked about bots and the benefits of using them. But, have you ever wondered if you can directly contribute to the creation of one? Yes, we’re talking about an artificial mind! And, no, we’re not just selling this article: we’re really saying that you can start developing one today.

In fact, the chances are that you may already know something about the technology. Especially, if you’re reading us. (If not, you may be interested in finding a bit more about how to approach Machine Learning, about its basics, some of its more advanced forms and future prospects, but also about some relevant limitations).

We’re nice people and we tend not to hold any grudges if it’s your first time here. We’ll be gentle and walk you through the process step by step.

So, let’s go and find out if you need a smart virtual assistant and where is the best place to start looking for one.

Be aware of the structure

The first and foremost thing you have to do when starting your way in chatbot development is to set your directions correctly. In other words, building complex systems every time you need a virtual assistant isn’t a right thing to do. This is why understanding the difference between the chatbots that already exist is crucial.

If you’re a complete newcomer, you need to know that all chatbots originate from web applications. They function thanks to the numerous HTTP (Hypertext Transfer Protocol is the set of rules for communication between the client and the server) requests and responses of the “POST” (for submitting information) and “GET” (for requesting information) nature.

Also, always consider messaging platform (like Facebook Messenger, Telegram, KIK, Slack, or any other messenger), where you want to run your future chatbot. Every messenger has its own Application Programming Interface (API), which contains set of techniques and methods that allow you to connect with the platform and deploy your own application on it.

Let’s look at how it works. With the help of programming environment and certain libraries, programmer builds a web application, which exchanges information with the messaging platform. This information flow depends on the events that take place on the user’s end. The latter means that application is programmed to act automatically in response to certain changes in user’s behaviour.

In the end of the day, the whole structure of a basic chatbot combines two parts:

  1. The connection between chatbot application and APIs of messaging platforms by means of HTTP requests and responses.
  2. Communication with the users, which is based on the “if-then-else” programming logic (conditional statements enable to check whether user’s input matches the case handled in the code, whether it’s true of false).

The oldest chatbots that are known as ELIZA (1966) and PARRY (1972) were made of hard-coded logic only. When somebody says that the logic is programmed in a hard-coded way it means that the main cases of user’s reaction are handled in the code (of course, a lot of stuff inevitably remains unhandled). Therefore, responses of the chatbot depend on the prediction of users’ inputs.

Pre-programmed logic isn’t efficient for the cases when the human-like conversation is pursued. Instead, you may want to go for the language understanding (LU) services, which are widely available now.

However, back in 1964, there was no possibility to create a program that could be trained to understand human language. Although “behaviour” of ELIZA and PARRY was totally hard-coded, both chatbots attempted to pass Turing test and fascinated first users with their intelligence (you can peek into the modern JavaScript version of ELIZA here). Until recent times, such chatbots had been the only options due to the lack of computer power.

However, if you think that all the chatbots you come across are more intelligent than their first ancestors, you’re wrong. For many cases, chatbot application that is based on the plain logic and connected with the database and API of messaging platform is just enough.

What are the main problems of the conventional chatbots?

  • We are humans and we are different so we often use different words to express pretty same things. Therefore, it can happen that a chatbot relies on the set of certain inputs but the one that it really gets differs. Such situations lead to incorrect work.
  • The previous problem results in the other one: to prevent misunderstanding, developer needs to insert certain options, among which a user should choose. It makes the dialogue look unnatural.

All too often, customer service doesn’t need a lot of functionality. Therefore, the chatbot that looks apparently artificial, contains a lot of buttons (to avoid ambiguous inputs) but can perform a search through the huge amounts of data and redirect a user to the human assistant is already a lot.

Therefore, before getting in your hands on building something more complicated, carefully think about the purposes. Modern chatbots are more efficient than their ancestors even if they are completely hard-coded. The reason why this difference occurs lies in the increased computer power, which nowadays allows of efficient dealing with the huge data sets.

What if I really need a smart chatbot?

Today is the best time to get your hands on something smarter than just an “if-else” bot. It’s much better than even two years ago. No, it’s not that our computers have become more powerful but the technologies that have come to be more adapted to the world where every developer can try him/herself in AI development.

So here is the plan of building chatbot with an AI:

  • Choose the messaging platform where your users are.

This is a starting point. Messengers vary depending on the purposes of using them. Some of the messengers are for chilling and talking to friends (Facebook) while others are for work purposes only (Slack). At the same time, some of them are more popular among teenagers (KIK). Make sure that you know your audience before choosing the right messenger.

  • Pick the platform for development.

The platforms like Microsoft Bot Framework can offer you a wide range of useful tools for simplification of the development process and reduction of code lines. In such case, using Microsoft Bot Framework can be very efficient. You can create a special bot application in Microsoft development environment, use tools of Bot Framework, add Microsoft Cognitive Services, and publish it on Microsoft Azure.

  • Add smart services.

Here’s a short list of the services that can help you to create a chatbot that understands human language:

  1. Microsoft Cognitive Services
  2. IBM Watson
  5. Chatfuel
  6. Botsify

Some of these services don’t even require you to code anything (Botsify, Chatfuel), which may become very useful for beginner programmers. On the other hand, the services like Microsoft Cognitive Services and IBM Watson possess a wide functionality so they may become a great choice for a proficient developer (learning them is also simplified for newcomers).

The rest of the tools are something in the middle between the large platforms and services that allow you to get around without coding – although, they need you to code, they have a highly intuitive interface and convenient tools to get started.

It has been a long time…

Almost sixty years passed since the first conversation between chatbots – ELIZA and PARRY – had happened. You can find the conversation here and compare with the recently recorded talk of AI-based Google Home chatbots Estragon and Vladimir. The logic behind ELIZA and PARRY is made of the “if-then-else” conditional statements, which are sufficient only for the narrow range of issues. In contrary, the recent example of chatbots (like Google Home speakers) with the LU abilities rely on the machine learning (ML) algorithms.

Here is how the computer scientist, the chairman and co-founder of Udacity, and the founder of Google X Sebastian Thrun describes the difference between the old-fashioned hard-coded logic and LU based on ML algorithms:

“Imagine an old-fashioned program to identify a dog. A software engineer would write a thousand if-then-else statements: if it has ears, and a snout, and has hair, and is not a rat . . . and so forth, ad infinitum. But that’s not how a child learns to identify a dog, of course. At first, she learns by seeing dogs and being told that they are dogs. She makes mistakes, and corrects herself. She thinks that a wolf is a dog—but is told that it belongs to an altogether different category. And so she shifts her understanding bit by bit: this is ‘dog,’ that is ‘wolf.’ The machine-learning algorithm, like the child, pulls information from a training set that has been classified. Here’s a dog, and here’s not a dog. It then extracts features from one set versus another. And, by testing itself against hundreds and thousands of classified images, it begins to create its own way to recognize a dog—again, the way a child does.”


In the modern chatbot development, both types of bots – hard-coded and AI-based ones – find their place. As the new platforms and services for building AI bots emerge, the amount of time you spend to develop smart one decreases. Though in a short while the development of smart chatbots is going to become easier than building old-fashioned, today we still need to consider the relation between the real purpose and the means at our disposal.

Dee-Technology Specialist

Need a Software Solution or Support ?

Any bespoke software and applications development CRM - ERP - CMS

Click here to start your project now