A chatbot is a program (software) in which we consult information or request a service through a conversational interface that imitates our capabilities of written communication and understanding the meaning of a text. In addition, if you add the ability to recognize and synthesize voice, then it would be called talkbot or voicebot.
In short, it is a technology with which we can talk to carry out those queries or operations that we would do from the browser of your computer, mobile applications and tablet, or through a human assistant.
If you still don’t visualize the concept, I recommend you to take a look at the trailer of the futuristic movie “Her”, in which a man, in a solitary stage of his life, ends up falling in love with the personality of a chatbot integrated in an operating system.
How do chatbots affect our lives?
Think of the continuous jumps and endless waits in telephone calls with teleoperators, or all those face-to-face procedures with long queues in which you have to be first thing in the morning. Or also, in those applications or web pages “labyrinth” not very intuitive and with a thousand ambiguous options between them.
All this could be replaced with an “army” of bots, at a very low cost for companies, which would have a high performance uninterruptedly. In addition, they could attend you at any time of day and from any place where there is a smartphone, a computer or a virtual assistant.
What technology does a chatbot use?
Programming and automatic learning combine to build a logical layer of rules and supervised-type algorithms (learn with previously classified data).
They reproduce our natural language understanding capabilities (NLU), that is, the correct understanding of the meaning of what they tell us. Subsequently, they rely on other services such as databases or requests to other services not only to inform the interlocutor but also to be able to execute operations.
Therefore, the main objective of a chatbot is to constantly ask what the user wants. From a technical point of view, it consists of a sequence of predictions that take as input a message from the user and classify it in an intention, generally by means of deep learning algorithms.
How does a chatbot work?
Firstly, the user sends a message through a conversation channel: application of a device (mobile, tablet, speaker, etc.), through a social messaging network (such as WhatsApp, Telegram, Facebook Messenger, Slack, etc.), through a mobile phone service (such as Twilio) or through a website.
The message is then filtered using natural language processing techniques (NLP). The most common is to correct spelling mistakes, treat capital letters, standardize emoticons to text, etc..
Third, this information will be given to the NLU (either machine learning or rule-based). This will essentially detect keywords (entities) and predict the user’s intentions as we saw earlier.
Finally, the CORE relieves the NLU and from its results must decide what is the next step to follow, generally determines what response to return to the user and optionally what action to take (make a reservation, a transaction, etc.). For both, you must rely on various computing resources, for example: APIs of other services, databases or other scripts in the backend.
How to create a chatbot?
Many companies delegate the construction of chatbot to other software design services (Software as a Service) such as Google’s DialogFlow, IBM’s Watson Assistant, Amazon’s Alexa or Microsoft’s Azure Bot Service.
In these platforms you can customize a chatbot without programming anything through a web page that abstracts all the complexity of the process. To later integrate them into a service through the channels mentioned above.
However, you may be looking for a more customizable open source alternative that integrates chatbot into your service software, you can choose Rasa, this Python-based library abstracts complexity and takes care of the maintenance, R&D and optimization of the automatic learning algorithms, facilitates file distribution and provides a basic logical structure common to all conversational interfaces.
Before getting started in any of these frameworks, there are a series of basic concepts that all of them share and you should know, such as utterances, intents, entities, histories, etc.