Developing an amazing Chatbot ...
What is a Chatbot?
First to understand how it works, you need to know how it was originated and some algorithms like the Natural Language Processing (NLP). It is another AI area, but it is around the language (usually written), it is the component that bridges the gap between human conversation and understanding programmed by a computer. NLP allows the computer to interpret the vast and complicated human language, understand it, process it, and effectively "speak", just like humans.
Through the process, the machine has to understand all the jargon that is being using and developing or adapting with the ability to respond, as a human computer. NLP has to do with the creation of systems that process or "understand" the language to perform certain tasks, such as answering questions, analyzing the sentiment in a sentence, making translations between different languages, and another.
In the past, the NLP involved a lot of mastery of linguistics, the terms understandable such as phonemes and morphemes were quite standard, since there are entire linguistic classes dedicated to their study, to analyze a word this must be broken down into its prefixes, suffixes and analyze the root. However, with Deep Learning, this process is completely different, since it uses several techniques.
One of the techniques used is trying to represent words in vectors and store them in an efficient way. For instance, Word2Vec, the basic idea behind this technique, it tries to store as much information as it can in this words vector, keeping the dimension at a manageable scale (25 to 1000 dimensions), this technique operates on the idea that wants to predict the words around it. Another technique used to do translations is Sequence-to-Sequence (Seq2Seq).
So, a Chatbot is a computer program designed to simulate conversation with human users using artificial intelligence technology like NLP and NLU. They are also known as virtual agents or cognitive agents (in deep, they are different).
What are some uses, benefits and disgusts about using Chatbots?
The Chatbots are used to getting a quick answer in an emergency, resolving a complaint, getting detailed explanations, making a reservation, paying a bill, buying basic items, and more.
They have some benefits like: 24 hours services, getting an instant response, answer to simple questions, easy communication, a good customer experience, friendliness, approachability and another.
However, there are disgusts, for example: in some cases the people prefer to talk with a real assistant or use the website, they making mistakes and it was not able to chat in a friendly manner.
Channels and frameworks to create Chatbots
In the actuality, there are several way how to integrate your Chatbot with the most popular messenger applications, like Facebook, Skype, Slack, Line, Telegram, Twitter and more. It is important to know that, because it is better connect our Chatbot with some popular application that create our own platform.
Additionally, exists some frameworks that you can use to create your own Chatbots. For example, you could use Dialogflow (previously was called API.AI), Watson Assistant (formerly was called Watson Conversation), Wit.ai, Microsoft Bot Framework, and more. Some of them have SDKs that you can integrate it using several programming languages such as Python, Java, Node.js, Ruby, PHP, Android, Javascript, C# and another.
Basic concepts
There are several concepts that you should know if you want to create a Chatbot. For example:
#intentions
An intent represents the purpose of a user's input. You can think of intents as the actions your users might want to perform with your application.
@entities
Objects that you want to interact with. Entities represent a class of object or a data type that is relevant to a user's purpose.
$context
How to design a Chatbot?
The first thing that you should do is try to define the scope, prioritize objectives and answer questions like: what is the Chatbot purpose?, what he should know and what he should not know? how I am going to manager the errors and the feedback? What channels and frameworks I will go to use?. To help you with this task, you can use some kind of canvas:
Then, it is important to give a personality to the bot, for instance, it is needed to give a name and a sex to him. Additional, it is great setting a visual appearance (how it will look), so you need to create a design. On the other hand, you should give a tone and voice to the Chatbot.
Once time that you have more clear how will be the Chatbot, it is moment to start creating flows and diagrams with whole information that bot should know and creating a table with the intents (possible questions that the customer can type), entities, contexts and the answers to the questions. These steps helping the developing process, having the information ready to use with almost all the needed by the bot.
The way how the information is shown is important, the appearance should be interesting and attractive. Try to avoid long texts, instead, use more images, videos or animations like gifs, buttons and carousels ... use your creativity and be innovative.
In this process, you can also use techniques like Design Thinking, to verify and validate that information that the Chatbot understand and the information that it uses to give a response. For example, you can simulate the Chatbot with a lot of flashcards (with some intents and answers) and the final customer, so the customer says a question and the human-bot tries to looking for a flashcard that has the better match with the question. If you do not have a perfect flashcard, that means, that you are not taking something into account, and need to improve some answer or flows.
In this video, you can see some steps that you should know when you are creating a virtual agent (Chatbot) with Dialogflow:
In this another video, you can see an easy demo using SDKs from Google or IBM to create Chatbots with UI:
Here you can see the demo code.
Additionally, you can test the Chatbot here: