It took less than 24 hours of interaction with humans for an innocent, self-learning AI chatbot to turn into a chaotic, racist Nazi.
In March 2016, Microsoft unveiled Tay; a twitter-based, friendly, self-learning chatbot modeled to behave like a teenage girl. The AI chatbot was supposed to be an experiment in “conversational understanding”, as described by Microsoft. The bot was designed to learn from interacting with people online through casual conversation, slowly developing its personality.
What Microsoft didn’t consider, however, was the effect of negative inputs to Tay’s learning. Tay started off declaring “humans are super cool” and that it was “a nice person”. Unfortunately, the conversations didn’t stay casual for too long.
In less than 24 hours Tay was tweeting racist, sexist and extremely inflammatory remarks after learning from all sorts of misogynistic, racist garbage tweeted at it by internet trolls.
This entire experiment, despite becoming a proper PR disaster for Microsoft, proved to be an excellent study into the inherently negative human bias and its effect on self-learning Artificial Intelligence.
So what are Chatbots?
A chatbot is specialized software that allows a conversational interaction between a computer and a human. Modern chatbots are versatile enough to carry out complete conversations with their human users and even carry out tasks given during conversations.
Having become mainstream because of personal assistants from the likes of Google, Amazon and Apple, chatbots have become a vital part of our everyday lives whether we realize it or not.
Why the sudden popularity?
The use of chatbots has skyrocketed recently. They have found a strong foothold in almost every task that requires text-based public dealing. They have become so critical in the customer support industry, for example, that almost 25% of all customer service operations are expected to use them by 2020.Use of Chatbots among Service Organizations
This is mainly because people have all but moved on to chat as the primary mode of communication. Couple that with the huge number of conversational platforms (Skype, Whatsapp, Slack, Kik etc.) available, and the environment makes complete sense to use AI and the cloud to connect with people.
At the other end of the support chain, businesses love chatbots because they’re available 24x7, have near-immediate response times and are very easy to scale without the huge human resource bill that normally comes with having a decent customer support operations team.
Outside of business environments, smart virtual assistants dominate almost every aspect of modern life. We depend on these smart assistants for everything; from controlling our smart homes to helping us manage our day to day tasks. They have, slowly, become a vital part of our lives and their usefulness will only increase as they keep becoming smarter.
Types of Chatbots
Chatbots can be broadly classified into two different types;
The very first bots to see the light of day, rule based chatbots relied on pattern-matching methodologies to ‘guess’ appropriate responses from an existing database. These bots started with the release of ELIZA in 1966 and continued till around 2001 with the release of SmarterChild developed by ActiveBuddy.Welcome screen of ELIZA
The simplest rule-based chatbots have one-to-one tables of inputs and their responses. These bots are extremely limited and can only respond to queries if they are an exact match with the inputs defined in their database. This means the conversation can only follow a number predefined flows. In a lot of cases, the chatbot doesn’t even allow users to type in queries, relying, instead on, preset inputs that the bot understands.
This doesn’t necessarily limit their use though. Rule-based Chatbots are widely used in modern businesses for customer support tasks. A Customer Support Chatbot has a very limited job description. A customer support chatbot for a bank, for example, would need to answer some operational queries about the bank (timings, branch locations) and complete some basic tasks (authenticate user’s, block stolen credit cards, activate new credit cards, register complaints).
In almost all of these cases, the conversation would follow a pattern. The flow of conversation, once defined, would stay mostly the same for a majority of the users. The small number of customers who need more specialized support could be forwarded to a human agent.
A lot of modern customer-facing chatbots are AI-based Chatbots that use Retrieval based Models (which we’ll be discussing below). They are primarily rule-based but employ some form of Artificial Intelligence (AI) to help them understand the flow of human conversations.
These are a relatively newer class of chatbots, having come out after the proliferation of artificial intelligence in recent years. These bots (like Microsoft’s Tay) learn by being trained on conversational datasets, instead of having hard-coded rules like their rule-based kin.
AI based chatbots are based on complex machine learning models that enable them to self-learn. These types of chatbots can be broadly classified into two main types depending on the types of models they use;
1. Retrieval based Models:
As their name suggests, Chatbots using retrieval-based models are provided with a database of answers and are trained to retrieve the most relevant answer based on the input question. These bots already have a provided list of responses and are trained to rank each response based on the input/question. They cannot generate their own answers but with an extensive database of answers and proper training, they can be very productive and useful.
Usually easier to develop and customize, retrieval based chatbots are mostly used in customer support and feedback applications where the conversation is generally limited to a topic (either a product, a service or an entity).
2. Generative Models:
Generative models, unlike Retrieval based models, can generate their own responses by analyzing the input word by word to understand the query. These models are more ‘human’ during their interactions but at the same time also more prone to errors as they need to build sentence responses themselves.
Chatbots based on Generative Models are quite complex to build and are usually overkill for customer-facing applications. They are mostly used in applications where conversations are expected to be general/not limited to a specific topic. Take Google Assistant as an example. The Assistant is an always listening chatbot that can answer questions, tell jokes and carry out very ‘human’ conversations. The one thing it can’t do? Provide customer support for Google products.Modern Virtual Assistants are a very good example of AI-based Chatbots
History of Chatbots
Modern Chatbots: Where are they used?
Use of chatbots has been growing exponentially in the Customer Services industry. The chatbot market is projected to grow from $2.6 billion in 2019 to $9.4 billion by 2024. This really isn’t surprising when you look at the immense benefits chatbots bring to businesses. According to a study by IBM, chatbots can reduce customer services cost by up to 30%. Couple that with customer’s being open to interacting with bots for support and purchases, it’s a win-win scenario for both parties involved.
In the customer support industry, chatbots are mostly used to automate redundant queries that would normally be handled by a human agent. Businesses are also starting to use them in automating order-booking applications. The most successful example being Pizza Hut’s automated ordering platform.
Despite not being a substitute for healthcare professionals, chatbots are gaining popularity in the healthcare industry. They are mostly used as self-care assistants, helping patients manage their medications and help them track and monitor their fitness.
Financial chatbots usually come bundled with apps from leading banks. Once linked to your bank account, they can extend the functionality of the app by providing you with a conversational (text or voice) interface to your bank. Besides these, there are quite a few financial assistant chatbots available. These are able to track your expenses, budget your resources and help you manage your finances. Charlie is a very good example of a financial assistant. The chatbot is designed to help you budget your expenses and track your finances so that you end up saving more.
Chatbots have become a very popular way of interacting with the modern smart home. These bots are, at their core, complex. They don’t need to have contextual awareness, but need to be trained properly to be able to extract an actionable command from an input statement. This is not always an easy task as the chatbot is required to have an understanding of the flow of natural language.Modern virtual assistants (such as the Google Assistant, Alexa, Siri) handle these tasks quite well and have become the de-facto standard to provide a voice or text based interface to a smart home.
Building a chatbot as powerful as the virtual assistants from Google and Amazon is an almost impossible task. These companies have been able to achieve this feat after spending years and billions of dollars in research, something that not everyone with a use for a chatbot can afford.
Luckily, almost every player in the tech market (including Google and Amazon) allows businesses to buy their technology platforms to design customized chatbots for their own use. These platforms have pre-trained language models and easy to use interfaces that make it extremely easy for new users to set up and deploy customized chatbots in no time. If that wasn’t good enough, almost all of these platforms allow businesses to push their custom chatbot apps to the Google Assistant or Amazon Alexa and have them instantly be available to millions of new users.
1. Google DialogFlow 2. Amazon Lex 3. IBM Watson 4. Microsoft Azure Bot
Coming up next…
Now that we’re familiar with the basics of chatbots, we’ll be going into more detail about how to build them. In the second blog of the series, we’ll be talking about how to create a simple Rule-based chatbot in Python. Stay tuned!
This is a companion discussion topic for the original entry at https://blog.datasciencedojo.com/introduction-to-chatbots/