Everything you need to know about chatbots
The chatbot industry is expanding fast, yet the technologies are still young. Conversational bots used to be rather vacant like the old text-based games, but now they have evolved into a top quality business tool.
Chatbots offer a new type of simple and friendly interface imperative for browsing information and receiving services. Industry giants including Google, Microsoft, and Facebook agree that this technology will play a huge role in the future.
Diverse chatbots facilitate a myriad of business tasks from advertising to team building operations, often sharing core common features. A common set of use cases include,
- Personal Assistant Bots: Business matters require professional organizational assistance, but not all of us can afford a secretary to handle the basic tasks. Luckily, chatbots are now here to help. They might be programmed to keep track of our work schedule and remind us about any upcoming events. This type of bo is useful since it is very simple in its foundation and uses the fast communication platforms — messaging systems as its interface.
- Customer Support Bots: The chatbot may take on a more formidable task — being representative of a company in conducting interaction with actual clients. The customer support workflows are mostly predictable and scripted even for human staff, therefore easy to implement into a chatbot. The typical bot behavior algorithm is to accept the user’s query, parse it for information, find the similar cases in the database, and respond with a prebuilt answer.
- Collaboration Bots: Using bots to support a team of developers is now extremely popular due to several reasons. It dwells in the development environment and thus is constantly under the scrutinous gaze of software engineers whose requirements for quality are much higher. However, the bot resolves a very strict set of tasks and accordingly does not require the complexity of commercial bots. They usually represent some simple scorekeepers, sentient chatbots that guard the development servers and report the commit information, simple schedulers and so on.
- Publisher Bots: Publisher type of bot is gathering more and more interest daily. Many grand news sources (eg NY Times), as well as technological outlets (eg TechCrunch) share content in a convenient form of brief text messages via major platforms like Facebook Messenger. The principle behind this bot is pretty simple: it gathers subscription information from the user, schedules the delivery of relevant news, and handles other user requests (e.g. unsubscribe, change the topic of subscription, explore).
- Entertainment Bots: Entertainment bots are still rare and serve a peculiar purpose: to manage reservations of events/cinema/theater tickets in a dialogue-style workflow. Some bots can also provide a full-fledged immersive experience of entertainment website via messenger. For example, Fandango Facebook Bot allows users to watch new movie trailers, read reviews, and find cinema theaters in their proximity.
- Travel Bots: Yet another popular and fast-growing use case for the bots is the assistance with travel. In this case, the customer-oriented chatbot strives to help people with sometimes strenuous work of selecting the optimal transportation mode and transforms the workflow of tedious form completion into a casual chat in the messenger app. The travel chatbot is not only able to retrieve and confirm the booking information, but also notify about the times like check-in beginning and boarding, update on the status of the flight, and gather valuable feedback from the customers.
Ultimately, a chatbot is a program, designed to handle communication with the human user via conventional conversation by textual means (chat platforms). It waits for the user to say something and answers it as programmed. This constitutes the bare bones of chatbot with the simple algorithm on its surface: accept and interpret the input, provide a relevant response to the output.
However, chatbots are a bit more complicated than that since they now possess the power of context, either local (persistent in one conversation), or global (persistent across many dialogues, extending beyond the linguistic context, e.g. a pizza ordering bot that processes your current orders, location, timezone, etc.). While the former is usually saved in temporary memory like cookies or sessions, the latter is stored in databases or accessed inside party services via APIs. The chatbots share many traits with web applications, which serve pages online (they similarly accept requests and respond to them, they use many standard tools like databases). So in a sense, chatbots are web applications.
How do Chatbots Work?
The bot must first understand what the user says. There are several options here: pattern matching of user input and classification of the intents with Natural Language Processing (NLP). The former is fairly simple and straightforward in use, but rather hard to maintain at a bigger scale with flexible inputs. The latter relies on machine learning in interpreting the inputs and is harder to implement (at least without the help of platforms that already applied the technique). A set of examples is required to classify possible intents and identify the purpose of the particular input from a range of possibilities.
To understand this better, let’s understand some NLP categories and their essence:
- Entities are specific mappings of natural language word combinations in the human discourse (verbal or written) to standard phrases conveying their unobscured meaning. These are much like extracted variables.
- Intents, are general traits that map the user’s message to the corresponding bot action (prediction workflow). For example, the phrase “What is the weather today?” will map to ‘weather_inquery’ intent by its entire wording, and not some particular part.
- Actions are the steps that bot is capable of committing as a response to the corresponding intent. These are usually the conventional functions, which may take optional parameters from the caller with detailed information (context).
Contexts vary depending on the platform and do not have some strict form or topology. They are most commonly represented as key/value mappings. They keep track of current implications of entities and differentiate the meanings/intents of phrases.
Types of Chatbots
We can differentiate types of conversational AI basing on the sphere of the operation (whether it is strictly specialized in one domain, e.g. weather bot or pizza bot, or just a general conversationalist) and on the way it computes the response to the user from the input (will it retrieve the predefined response or will generate the response corresponding to the input).
Regarding the way of retrieval based response, it is important to make a distinction between static and dynamic responses. The former is the simplest, much like a template filling, where to every input there is the corresponding answer. The latter is a kind of knowledge base, which returns the list of possible responses with the scoring of relevance.
With the closed domain chatbot, you will strive to solve a finite problem of communication — make a reservation for hotel/restaurant/flight, order pizza, buy shoes, etc. Thus, it is apparent that the inputs are the limit and we do not expect the user to talk about politics, psychology, or philosophy with a pizza ordering bot.
Whereas open domain bots are mainly focused on the conversation with the user itself, it does not seek to understand every aspect of what user says, it does not retrieve the entities and intents, nor it needs to keep track of the context. It only aims at imitating real-life conversation. Its main purpose is entertaining or answering general FAQ-style questions.
Next up: what should you do if you want to build a chatbot?