Building a Chatbot

Imagine for a moment that you're sitting alone in a quiet, spacious room. To your right is a small table with a stack of white printer paper and a single black pen. In front of you is what seems to be a large, red cube with a tiny opening—slightly smaller than the size of a mail slot. An inscription just above the slot invites you to write down a question and pass it through the slot. As it happens, you speak Mandarin; so, you write down your question in Mandarin on one of the sheets and insert it into the opening. A few moments pass, and then slowly, an answer emerges. It's also written in Chinese and is the just the sort of answer you might have expected. So, what did you ask? Are you a person or a computer? And the response? Why yes, yes I am.

This thought experiment is based on philosopher John Searle's Chinese Room Argument. The premise of the experiment is that if there were a person in the room who spoke no Chinese, but had a set of rules that allowed them to perfectly map English characters to Chinese characters, they could appear to the questioner to understand Chinese without actually having any understanding of it. Searle's argument was that algorithmic procedures that produce an intelligible output can't be said to have an understanding of that output. They lack a mind. His thought experiment was an attempt to combat the ideas of strong AI, or the notion that the human brain is essentially just a wet machine. Searle didn't believe that AI could be said to have consciousness, no matter how sophisticated its behavior appeared to an outside observer.

Searle published this experiment in 1980. 31 years later, Siri would be released on the iPhone 4S. For anyone who has used Siri, it's clear that we have a long way to go before we might be confronted with uncertainty of whether the agent we are speaking to has a mind (though we might doubt it in people we know to be human). Despite the clunkiness these agents, or chatbots, have demonstrated in the past, the field is rapidly advancing.

In this chapter, we're going to learn how to construct a chatbot from scratch. Along the way, we'll learn more about the history of the field and its future prospects.

We'll cover the following topics in this chapter:

  • The Turing Test
  • The history of chatbots
  • The design of chatbots
  • Building a chatbot
..................Content has been hidden....................

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