Chapter 1. Conversational Interfaces

While technology aimed at simulating conversations with a computer has been present for decades, bots or chatbots are an increasingly fashionable software model. The rise of chatbots is due to the assembly of several technology trends. For example, users tend to spend a huge amount of time in just a few applications, and most of them are messaging apps.

In this book, we will focus on technical aspects of chatbots, because we believe that these Conversational Agents are a real shift for all of us. We have chosen a real use-case to begin with, along with several tutorials, tips, tricks and commented code samples to help you increase your understanding and skills in building bots.

The purpose of this first chapter is your initiation to chatbots. It will cover the meaning and significance of chatbots and their history.

Introduction

Conversational interfaces are one of the more natural User Interfaces (UI) around. Afterall, it’s the one we use every day to interact with others. A popular (technical) form of this UI comes in the form of chatbots.

Chatbots are third-party applications that are able to conduct conversations with humans via text or audio, to understand their message in natural language, and to converse with them in natural settings. In other words, users can interact with bots by sending them messages, orders, and in-line requests. Designed to automate tasks typically done by the user, such as making a reservation at a restaurant, adding an appointment to the calendar, or retrieving and displaying expensive information, chatbots must simulate a conversation similar to human discussions.

After the Facebook F8 conference, chatbots quickly became an obsession. Chatbots can be found today in messaging platforms like Facebook Messenger, Slack, Skype, etc. They can also be found in voice activated platforms like Amazon’s Alexa and Apple’s Siri. Functionality ranges from bots that help us shop online to those that provide a sort of therapy via artificial intelligence and text chat.

Moreover, for some analysts, chatbots are intended to replace applications. In fact, chatbots have many advantages over apps:

  • A chatbot, unlike an application, does not need to be downloaded. It is “available” directly in your instant messaging service. Neither download, nor installation, registration, username or password is required.
  • A chatbot can potentially be multi-functional and fulfill the role of several applications.

While mobile apps have seen an explosion with the advent of the iPhone and Android smartphones, there is a more recent movement to make use of the most popular apps on our phones to interact with all sorts of services. These mobile apps include the most popular messaging platforms (including SMS), Siri, and Google Now.

App fatigue has led people back to fewer and, often times, simpler apps to do the bulk of their work. A 2015 comScore study showed that U.S. smartphone owners typically use about three main apps with much frequency http://www.comscore.com/Insights/Presentations-and-Whitepapers/2015/The-2015-US-Mobile-App-Report.

Chatbots allow popular apps like Facebook Messenger, SMS, and others to do much more than simply chat with family and friends. Siri and Google Now are a voice command away to getting help with all sorts of common problems and tasks.

History

Welcome to the future - 50 years in the making. Chatbots are not a new fad. But it has only been a few years since the chatbots have become most important. For us, chatbots are the biggest technological trend of 2016. There are two main reasons for this:

  • The development of instant messaging services.
  • Advances in AI and machine learning.

Joseph Weizenbaum launched the first chatbot, ELIZA, in 1966. Using a combination of pattern matching and substitution methodology, Weizenbaum set out to prove the superficiality of human and computer communication while also passing the Turing Test. To Weizenbaum’s surprise, a number of people felt ELIZA exhibited a certain humanness.

From there we’ve had an evolution of chatbots over the years, including:

1950 - Alan Turing This program was used to propose the Turing Test to determine the intelligence of computer programs.

1972 - PARRY Dr. Kenneth Colby wrote the next rendition of ELIZA, this time modeling the behavior of a person with paranoid schizophrenia. Unlike ELIZA, PARRY implemented a conversational strategy, which helped PARRY convince 52 percent of the psychiatrists that the chatbot was a human patient. The two chatbots finally “met” one another over ARAPANET, an early version of what eventually became the Internet.

1988 - Jabberwacky Rollo Carpenter, a British programmer, created Jabberwacky in order to prove that AI is capable of passing the Turing test. In addition to passing the Turing test, Jabberwacky’s goal was to entertain people. Carpenter went on to iterate on Jabberwacky over the years, launching it on the Internet in 1997 and creating a new and improved version named Cleverbot in 2008.

1989 - IRC Bots Early Internet Relay Chat (IRC) bots like Bill Wisner’s Bartender and Greg Lindahl’s GM were developed to facilitate games over IRC. They are a set of scripts or an independent program that connects to IRC as a client. Bots evolved over time to programmatically manage channels, log channel activity, or lookup and provide information when commands are sent from users.

An IRC bot differs from a regular client, because it does not provide an interactive access to IRC for a human user, but it performs automated functions.

1990 - The Leobner Prize It’s an annual competition that judges chatbots based on their human likeness. The format of the competition is based on a standard Turing test. In each round, a human judge simultaneously holds textual conversations with a chatbot and a human being via computer. Based upon the responses, the judge must decide which is which.

1992 - Dr. Sbaitso Creative Labs distributed Dr. Sbaitso, an AI speech synthesis program, with some of its sound cards. Dr. Sbaitso would act as the user’s counselor, audibly asking the user to tell the doctor about the user’s problems. The program’s AI was considered rudimentary, with its real goal being to showcase digitized voices. Some users had fun with Dr. Sbaitso by overloading him with all sorts of input, causing the program to crash with a parity error before resetting itself.

1995 - A.L.I.C.E. The natural language processing chatbot known as Alice was created by Richard Wallace. While it has won awards for its abilities, Alice has not been able to pass the Turing test. A fun fact for movie buffs: Alice was the inspiration for Spike Jonze’s 2013 movie Her, which featured the love story between an intelligent operating system and one of its users.

2001 - SmarterChild Developed by ActiveBuddy, Inc., SmarterChild was a chatbot on the AOL Instant Messenger and Windows Messenger Live/MSN Messenger networks that provided users with access to news, weather, movie times, and much more. The bot became a precursor to Apple’s Siri, with one of the Siri investors, Shar Carolan of Menlo Ventures saying, “...When I first encountered Siri, SmarterChild already had 10 million users and was getting a billion messages a day...The market was speaking.” More on Siri

2010 - Siri Starting its life as an iOS app, Siri was built by Siri, Inc. and purchased by Apple and integrated into all of Apple’s major operating systems shortly after. Siri uses an natural language (NL) voice user interface to interact with users looking for information that Siri provides based on querying various web services and using machine learning.

2011 - WeChat One of the largest stand alone messaging platforms in the world, WeChat, has over a billion accounts and allows developers to create chatbots and even apps that integrate into the main WeChat platform through “Official Accounts.” The official accounts allow companies to build typical chatbots that respond to user queries and provide information as well as apps that can do much more, including processing payments.

2013 - Mitsuku It’s The Winner of Leobner Prize (2013 and 2016) and one of the most human-like chatbots publicly available. Mitsuku is a chatbot created from AIML technology by Steve Worswick. Mitsuku is available as a flash game on Mousebreaker Games as well as on Skype and on Kik Messenger under the username “Pandorabots.”

2014 - Alexa Amazon created Alexa as the software powering its Echo device. Like Siri, Alexa uses a voice user interface to interact with users. Users use Alexa to control Echo devices to play music, get weather updates, shop for items, etc.

2016 - The ball of Microsoft: Tay Tay is an AI that looks like a teenager launched by Microsoft in March 2016 on the Twitter platform. But it is above all the name of a beautiful fiasco. Barely 24 hours after its launch and after nearly 100,000 tweets exchanged, Microsoft decided to temporarily suspend the Twitter account of its chatbot. And for good reason: the Twittos tried to trap her and had fun making her say anything and everything.

2016 - Facebook Messenger and Skype APIs Facebook and Microsoft both opened up their main messenging apps, Facebook Messenger and Skype, to third party developers with APIs that allow chatbots to be more easily built and discovered in the apps themselves. Between the two messenging apps, there are well over a billion active users.

Chatbots use-cases

Services offered by chatbots can range from functional to fun. Here are some examples of bots living in one or more messaging applications:

  • Weather bot: Get the weather at any time.
  • Grocery bot: choose and order the grocery of the week.
  • News Bot: see the news.
  • Life advice bot: Think about the right solutions to the user’s problems.
  • Personal finance bot: Manage your budget well.
  • A bot that’s your friend: millions of people.
  • Forbes Bot, TechCrunch Bot: Receive customized notifications and news.

Other services are emerging every day with the evolution of the technology and the needs of the users who use more and more the applications of messaging.

Types of Chatbots: Voice and Text

As the history shows, there are two main ways of interacting with chatbots: text and voice. Both have evolved rapidly in the past few years in particular and will continue to allow more sophisticated bots to be created with advances in natural language processing, AI, and machine learning. New services are being announced consistently that provide robust APIs and capabilities for developers to take advantage of in their chatbots, whether text or audio based.

Models of building bots

One proposed taxonomy of models yields two main categories of chatbots. The first is Retrieval-based models, which is easier because of the fixed set of responses picked up depending on the input and the context. The second is Generative Models. This category is harder because responses are generated from scratch by tokenizing the user’s sentence and analyzing the links between tokens. Both models rely on technologies of voice/text processing. In this book, we will proceed with Retrieval-based model: analyzing the message and responding with an answer fixed in advance.

What you should expect to learn

The chapters that follow will walk you through how to build chatbots on some of the most popular chatbot platforms. The bots will grow in sophistication, starting out simple, then expanding as a shopping assistant, using natural language processing (NLP), integrating with a voice assistant, and finally looking at machine learning and how it can be combined with chatbots. By the end, you’ll have complete working chatbots that can be deployed for further use and enhancement.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset