1. Introduction to Chatbots
Welcome to the Build Better Chatbots book. Do you remember the last time you had to call a toll-free number for support or customer service? Do you remember the long wait time on the phone before you could even talk about your issue and then realizing somehow you chose the wrong button option leading you to the wrong department? We have had this experience, and thats why we created a chatbot for enterprises to use to help resolve customer questions more easily and in an interface that many people, especially millennials, are getting more accustomed to using: chat. In this book, we will take you through the history of chatbots, including when they were invented and how they became popular. We will also show how to build a chatbot for your next project. After completing this book, you will know how to deploy applications with a chat interface on platforms such as Facebook Messenger, Skype, and so on, which automatically respond to user queries without any human intervention.
The book is divided into five chapters, with topics ranging from the technical to the business perspective. If you are a rock-star developer who cant wait to build a Hello World example, then Chapters .
In this chapter, we will start by covering the chatbot ecosystem, the journey of chatbots through multiple decades, and the various open platforms today where you can deploy your chatbot.
Fact
The term c hatterbot was first used in 1994 and was originally coined by Michael Mauldin, the creator of Verbot (Verbal Robot) Julia.
What Are Chatbots ?
The classic definition of a chatbot is a computer program that processes natural-language input from a user and generates smart and relative responses that are then sent back to the user. Currently, chatbots are powered by rules-driven engines or artificial intelligent (AI) engines that interact with users via a text-based interface primarily. These are independent computer programs that can be plugged into any of the multiple messaging platforms that have opened to developers via APIs such as Facebook Messenger, Slack, Skype, Microsoft Teams, and so on.
With the advancement of voice technology in recent years, companies such as Google, Apple, and Amazon have debuted artificial intelligent agents for voice. Apple launched Siri, which comes on the iPhone, iPad, and macOS. Google launched Google Home, and Amazon launched Alexa, which are both physically devices for your home or office that can help you with tasks such as ordering a hired car, switching on/off your lights, playing your favorite tunes from Spotify, managing your calendars, and so on.
The technology behind chatbots is based on similar technology to voice-based assistants. All voice-based systems have the added complexity of converting the speech to text for any computer application to work with. The processing of the text from a chatbot or a voice-based system is done in the same way, and you will look at the underlying workflow and implement your own system in this book.
Journey of Chatbots
Lets start your journey of chatbots by looking at the history of chatbots. Chat as a medium has existed from the time computers have been in existence and has become one of the prominent mediums of communication in the last couple of decades. In this section of the chapter, we will cover the origin of chatbots and how the early computer scientists have always been excited about making a computer talk to a human in a natural way. We will also go into current developments in the industry that are facilitating the availability of chatbots on a large scale today. For a better understanding of the timeline of chatbots, see Figure .
Brief History of Chatbots
Even though chatbot seems to be a recent buzzword, theyve been in existence since people developed a way to interact with computers. The first-ever chatbot was introduced even before the first personal computer was developed. It was named Eliza and was developed at the MIT Artificial Intelligence Laboratory by Joseph Weizenbaum in 1966. Eliza impersonated a psychotherapist. Eliza examined the keywords in the user input and triggered the rules of transformation of the output. This particular methodology of generating responses is still widely being used when building chatbots. After Eliza, Parry was written by psychiatrist Kenneth Colby, then at Stanford University, in an attempt to simulate a person with paranoid schizophrenia.
A.L.I.C.E., or simply Alicebot, was originally developed by Richard Wallace in 1995 and was inspired by Eliza. Although it failed to pass the Turing test, A.L.I.C.E. remained one of the strongest of its kind and was awarded the Loebner Prize, an annual competition of AI, three times.
Note
A Turing test is a test for intelligence in a computer wherein a human (sender) should not be able to distinguish between a machine (receiver) or another human (receiver) when replies from both are presented to the sender. The Turing test was designed by Alan Turing in 1950 in his paper Computing Machinery and Intelligence while working at the University of Manchester.
In the first decade of 21st century, SmarterChild was built by ActiveBuddy. It was the first attempt to create a chatbot that was able not only to provide entertainment but also to provide the user with more useful information such as stock information, sports scores, movie quotes, and much more. It lived inside AOL and Windows Live Messenger, with more than 30 million people using it. It was later acquired by Microsoft in 2007 for $46 million. SmarterChild is the precursor of Siri by Apple and S Voice by Samsung.
Siri is an intelligent personal assistant that was developed as a side project by SRI International and later adopted by Apple into its iOS 5 for iPhone. Its been an integral part of the iOS ecosystem. Siri allows users to engage in random conversations while providing useful information regarding the weather, stocks, and movie tickets. Tech giants like Samsung and Google have also followed in the footsteps of Apple by developing their own AI assistants, S Voice and Google Allo, respectively.
There are also voice-powered home assistants like Amazon Alexa and Google Home, which are another representation of chatbots.
Recent Developments of Chatbots
When looking at history, companies have always built their own individual AI-powered chatbots to serve the purpose of their end users. In recent years, this trend has changed, with Telegram opening its bot platform in June 2015, allowing developers to make chatbots serving users with numerous services such as polls, news, games, integration, and entertainment. In addition, Slack, a cross-platform team collaboration software application, announced bot users in December 2015. Slack launching its bot users platform was a catalyst in pushing other companies to start investing in this new channel of user engagement.
As one of the biggest players in this market, Facebook released its Messenger platform in April 2016 during the F8 developer conference. Although Facebook was a bit late to the party, it had the most impact on the buzz of chatbots. The opportunity to reach 1 billion active users via Messenger played a major role in this.
To name a few more, Skype, Kik, and WeChat are the other major players in messaging that have released their platforms for developers to publish chatbots.
To summarize, if you picture the journey of chatbots from the 1960s to now, you can see that what was once a fantasy of being able to communicate with a nonliving virtual being is now part of our everyday lives.