83
Chatbots Present, Past and Future Paul Houle Ontology 2

Chatbots in 2017 -- Ithaca Talk Dec 6

Embed Size (px)

Citation preview

Page 1: Chatbots in 2017 -- Ithaca Talk Dec 6

ChatbotsPresent, Past and Future

Paul Houle

Ontology2

Page 2: Chatbots in 2017 -- Ithaca Talk Dec 6

Chatbots Present

Page 3: Chatbots in 2017 -- Ithaca Talk Dec 6

Facebook Messenger Amazon Echo (Alexa)

Interact with chatbots using the same UI you use to interact with people

Conversational voice interface oriented around tasks;voice is the primary, if not the only interface

Page 4: Chatbots in 2017 -- Ithaca Talk Dec 6

Facebook Messenger Platform

Message content:

1. Text2. Video, Audio and Image Media Objects3. Hyperlinks, Buttons, “Call to Action”

Application Server

Back-End Business Systems

Real World

Human Supervision

Page 5: Chatbots in 2017 -- Ithaca Talk Dec 6

Facebook Messenger: Air Travel Application

Page 6: Chatbots in 2017 -- Ithaca Talk Dec 6

Air Travel Application

• Large Commercial Value (3 tickets, $4000)• Complex Interaction that takes place over many days• Takes place in moderately large, but finite world• Mixed-initiative, changes can occur on either end:

• Passenger: change flight, seats, upgrade, ...• Airline: cancellation, delay, standby, ...

Page 7: Chatbots in 2017 -- Ithaca Talk Dec 6

Your IT Systems

Alexa Skills: System architecture

Page 8: Chatbots in 2017 -- Ithaca Talk Dec 6

Alexa Skills: Examples

Page 9: Chatbots in 2017 -- Ithaca Talk Dec 6

The trouble with mobile applications

Complex Business

Complex Applications

Client

Communication Networks

App Stores

A complex business means a complex application: hard to distribute as a mobile app if all screens are sent on the client

a real business application can have 200-2000 screens!

Page 10: Chatbots in 2017 -- Ithaca Talk Dec 6

Asynchronous/Mixed Initiative User Interface

Page 11: Chatbots in 2017 -- Ithaca Talk Dec 6

Chatbots past

Page 12: Chatbots in 2017 -- Ithaca Talk Dec 6

From telegraph to teletype...

20 words/minute ≈ 2 character/sec TELEX15 character/sec ≈ 110 bits/sec (bps)

Page 13: Chatbots in 2017 -- Ithaca Talk Dec 6

1770: The Turk

Chess playing “robot” controlled by a very small chess player

Page 14: Chatbots in 2017 -- Ithaca Talk Dec 6

1942 Alan Turing: War Hero

Page 15: Chatbots in 2017 -- Ithaca Talk Dec 6

Alan Turing: Computer Scientist

1952 First Computer Chess ProgramFundamentals of Computation

Page 16: Chatbots in 2017 -- Ithaca Talk Dec 6

1950: Alan Turing’s “Imitation Game”

Interrogator tries to answer: “who is the male and who is the female?” Both players are pretending to be the other

Page 17: Chatbots in 2017 -- Ithaca Talk Dec 6

Can a computer understand gender?

Can a computer pretend to be gendered? Can it pretendto be the other gender?

What social skills are necessary?

Page 18: Chatbots in 2017 -- Ithaca Talk Dec 6

Can a computer pass as a human at all?

Page 19: Chatbots in 2017 -- Ithaca Talk Dec 6
Page 20: Chatbots in 2017 -- Ithaca Talk Dec 6

1956 1957

Page 21: Chatbots in 2017 -- Ithaca Talk Dec 6

1957 Client-Centered Therapy

PsychotherapistCarl Rogers

Client-centered therapy

mirrorednot mirrored

Page 22: Chatbots in 2017 -- Ithaca Talk Dec 6

1960 SABRE Airline Booking System

1958 SAGE Air Defense System

Page 23: Chatbots in 2017 -- Ithaca Talk Dec 6

Two response strategies are sufficient to elicit empathy: user fills in imagined motives for simulated computer therapist

(is that different from experiencing fiction?)

1966 The Eliza Effect

Active Listening

Changing the Subject

ELIZA: Maybe your plans have something to do with this.

ELIZA: Don't you think computers can help people?

ELIZA: I've told you that apologies are not required.

ELIZA: Can You Elaborate On That?

Page 24: Chatbots in 2017 -- Ithaca Talk Dec 6

Science Fiction Robots

Page 25: Chatbots in 2017 -- Ithaca Talk Dec 6

1970 SHRDLU> Pick up a big red block.OK.> Grasp the pyramidI DON'T UNDERSTAND WHICH PYRAMID YOU MEAN.> Find a block which is taller than the one you are holding and put it into the box.BY "IT", I ASSUME YOU MEAN THE BLOCK WHICH IS TALLER THAN THE ONE I AM HOLDING.OK.> What does the box contain?THE BLUE PYRAMID AND THE BLUE BLOCK.> What is the pyramid supported by?THE BOX.

SHRDLU makes conversation about an imaginary “blocks world” with the computer and can order the computer to make changes to the block world within some constraints.

Page 26: Chatbots in 2017 -- Ithaca Talk Dec 6

id type color picked_up above inside height width ...

1 block green 0 0 0 2.0 2.0 ...

2 block red 1 0 0 3.0 1.5 ...

3 pyramid red 0 1 0 3 0.5 ...

4 block blue 0 0 0 4.0 2.5 ...

“The Blocks World”

Page 27: Chatbots in 2017 -- Ithaca Talk Dec 6

SHRDLU capabilities

“Have a conversation about a database”

English-like syntax

Remembers context and...

... asks questions to uncover context

ability to reason and plan

Page 28: Chatbots in 2017 -- Ithaca Talk Dec 6

Teleprinter Video Display Terminal

Page 29: Chatbots in 2017 -- Ithaca Talk Dec 6

1975 Microsoft Basic

1) Using BASIC is like having a conversation, and...2) ... A conversation-like interface is easy to implement in BASIC

Page 30: Chatbots in 2017 -- Ithaca Talk Dec 6

1975 Microsoft Basic

... but the conversation context is encoded in the state of the program

Not FlexibleCan’t handle Mixed Initiative

Page 31: Chatbots in 2017 -- Ithaca Talk Dec 6

1975 MYCINMedical Diagnostic Expert System

Page 32: Chatbots in 2017 -- Ithaca Talk Dec 6

1975 MYCINMedical Diagnostic Expert System

Page 33: Chatbots in 2017 -- Ithaca Talk Dec 6

1975 MYCINMedical Diagnostic Expert System

Rulesencode knowledge & procedures

Factsdescribe the problem

Page 34: Chatbots in 2017 -- Ithaca Talk Dec 6

Production Rules / RETE Engine

Ideal for mixed initiative: • System accepts facts from both the user and the world (react to multiple inputs)• Firing rules can (i) cause actions and (ii) cause more rules to fire

Page 35: Chatbots in 2017 -- Ithaca Talk Dec 6

1976 Colossal Cave

database describing game world

has a lot in common with SHRDLU....

Page 36: Chatbots in 2017 -- Ithaca Talk Dec 6

1983 Infocom

Page 37: Chatbots in 2017 -- Ithaca Talk Dec 6

1984 Apple Macintosh

Page 38: Chatbots in 2017 -- Ithaca Talk Dec 6

“AI Winter”SHDRLU and MYCIN were not scalable!

Algorithms and tools did not scaleLabor Cost to Create Knowledge Base too High

Page 39: Chatbots in 2017 -- Ithaca Talk Dec 6

1991-present Adobe Premiere

Page 40: Chatbots in 2017 -- Ithaca Talk Dec 6

1994 Netscape Navigator

Page 41: Chatbots in 2017 -- Ithaca Talk Dec 6

2001 Metal Gear Solid 2

Page 42: Chatbots in 2017 -- Ithaca Talk Dec 6

2016 Consumer VR

Page 43: Chatbots in 2017 -- Ithaca Talk Dec 6

REPL (of many kinds) is alive and well

but not as smart as SHRDLU!

Page 44: Chatbots in 2017 -- Ithaca Talk Dec 6

1988 Mathematica Notebooks

Page 45: Chatbots in 2017 -- Ithaca Talk Dec 6

1985 GSM and SMS

A PUBL1C SERVICE ANN0UNCEMENT!

Page 46: Chatbots in 2017 -- Ithaca Talk Dec 6

IRC, ICQ, AIM, Skype...

Page 47: Chatbots in 2017 -- Ithaca Talk Dec 6

2007 iPhone

Page 48: Chatbots in 2017 -- Ithaca Talk Dec 6

2009-2014 WhatsApp

Page 49: Chatbots in 2017 -- Ithaca Talk Dec 6

• 1-layer neural network can learn a separating line between two categories• The input space could have thousands or millions of dimensions (ex. an image)

1957 Perceptrons

This 1969 book by Minsky and Papert demolished Perceptrons by demonstrating manythings Perceptrons could not do

Page 50: Chatbots in 2017 -- Ithaca Talk Dec 6

1971 full-text search

tfidf: term frequency/inverse document frequency

Karen-Spärck Jones and Gerard Salton @ Cornell

• is computing a dot product in high-dimensional space just like the Perceptron• is solving a “subjective” problem, isn’t expected to get 100% right answers• still the dominant algorithm for full-text search in 2016

Page 51: Chatbots in 2017 -- Ithaca Talk Dec 6

1992 US Post Office: Handwritten Digits

Backpropagation makes it practical to train shallow neural networks.

NIST developed training data for this project that eventually became the famous MNIST digits

Page 52: Chatbots in 2017 -- Ithaca Talk Dec 6

predictive analytics

Problem: given four measurements for an Iris flower, determine speciesdata from 1936 Ronald Fisher and Edgar Anderson

methods based on Vector Spaces:

methods based on rules:

linear discriminant, support vector machine, neural networks,k-nearest neighbors, etc.

C4.5, random forests, inductive logic programming

Page 53: Chatbots in 2017 -- Ithaca Talk Dec 6

data driven competitions1992-present: yearly competitions and conference to improve accuracy of searchengines and similar systems. Supported by US National Institute of Standards.

2010-present data: set of images annotated with noun concepts from Wordnet,yearly competitions for classification tasks have led to large breakthroughs inconvolutional neural networks & image recognition

2010-present data: venture backed company solves data science problems for customers by holding public competitions

Page 54: Chatbots in 2017 -- Ithaca Talk Dec 6

2006 deep learning

Two kinds of training data:1. A large number of unlabeled examples2. A small number of classified examples

Two phases:1. Deep Belief Network (DBN) learns statistical regularities in

unlabeled data2. Backpropagation fine tunes the network for a specific task

based on labeled and/or unlabeled data

information bottleneck forces network to generalize rather than memorize

Page 55: Chatbots in 2017 -- Ithaca Talk Dec 6

present:Explosion of Neural Network Architectures

Page 56: Chatbots in 2017 -- Ithaca Talk Dec 6

2011 IBM Watson wins at JeopardyWatson considers several possible answers to a question and computes a probability score for each one.

Watson weighs the risk of getting a wrong answer against the risk of an opponent answering first and takes action at the optimal time. It calculates bets to ensure a win, if possible.

Page 57: Chatbots in 2017 -- Ithaca Talk Dec 6
Page 58: Chatbots in 2017 -- Ithaca Talk Dec 6

Watson Precision/Recall Curve

Throwaway prototype based on commercial off-the-shelf (COTS) full-text search engine

Point cloud is estimated performance of human jeopardy players, the goal is to get into this region

Progressive improvement of:• knowledge base• question answering strategies• result merging

Page 59: Chatbots in 2017 -- Ithaca Talk Dec 6

Watson achieves hyperprecision because it can choose whether ornot to answer a question.

Watson reasons about uncertainty in order to maximize a utilityfunction; act in it’s own “self interest”

Page 60: Chatbots in 2017 -- Ithaca Talk Dec 6

Chatbots future

Page 61: Chatbots in 2017 -- Ithaca Talk Dec 6

Overwhelmed?

Intelligent systems use complexity to cope with the complexity of the world they inhabit.

Outsource subtasks to agents...

Page 62: Chatbots in 2017 -- Ithaca Talk Dec 6

present:

Page 63: Chatbots in 2017 -- Ithaca Talk Dec 6

also on

Page 64: Chatbots in 2017 -- Ithaca Talk Dec 6

a

company

wit.ai: rapidly generalizes examples of specific patterns of text and links these to “intents”

Page 65: Chatbots in 2017 -- Ithaca Talk Dec 6

business rules: revenge of the expert system!

Page 66: Chatbots in 2017 -- Ithaca Talk Dec 6

Business Processing Modelling Language

• Production rules engine scale 1000x larger• ... are ideal for managing processes which happen over an extended time• ... that are driven by events that happen in “the real world”

Page 67: Chatbots in 2017 -- Ithaca Talk Dec 6

Complex Event Processing

Greatly improved RETE algorithms do this efficiently!

Rules can put together a story about a set of related events, by creating new events when the existingevents meet some condition

Page 68: Chatbots in 2017 -- Ithaca Talk Dec 6

constraint solving & optimization

Route Optimization

SAT/SMT SolverTravel PlanningBox Packing

There are tools such as Drools OptaPlanner and IBM CPLEX Optimizer that marry constraint solving and optimization with rules-based systems.

However, many people who work in this space code everything in C++ because they want to try the largest rate of possibilities per second

Page 69: Chatbots in 2017 -- Ithaca Talk Dec 6

2XL

“toy of the year”-- Disney's Family Fun Magazine

Speak and Spell

1978

Page 70: Chatbots in 2017 -- Ithaca Talk Dec 6

1980s Interactive Voice Response:

Page 71: Chatbots in 2017 -- Ithaca Talk Dec 6

2001 <VoiceXML>

VoiceXML (from TellMe) supports text to speech in voice prompts and lets the script author write a grammar for things that the telephone caller is supposed to say.

Performance is dependent on the system modelling what the user might say: it can resolve addresses in the US because it has a list of all the street names!

Can call out to “Web Services” in order to implement business tasks

Page 72: Chatbots in 2017 -- Ithaca Talk Dec 6

2000 Voice Improvement Program

Today: A chance of rain after 4pm. Increasing clouds, with a high near 41. Southeast wind 6 to 8 mph. Chance of TODAY: A CHANCE OF RAIN AFTER 4PM.

INCREASING CLOUDS, WITH A HIGH NEAR 41. SOUTHEAST WIND 6 TO 8 MPH. CHANCE OF PRECIPITATION IS 50%. NEW PRECIPITATION AMOUNTS OF LESS THAN ...

• Six voices: male/female and English/Spanish• Voices vary speed and pitch to create feeling of urgency• Requires full attention to listen to

ITHACA WXN59 162.5 MHZ

Page 73: Chatbots in 2017 -- Ithaca Talk Dec 6

Video games engage players with dialogthat supports the story.

Dialog depends heavily onwriting & voice acting andis not very interactive.

Text-to-speech can’t keepusers engaged

Page 74: Chatbots in 2017 -- Ithaca Talk Dec 6
Page 75: Chatbots in 2017 -- Ithaca Talk Dec 6

SSML

Page 76: Chatbots in 2017 -- Ithaca Talk Dec 6

All-in

Amazon Alexa is a new platform where youcan’t fall back to the keyboard, mouse or touch-screen.

Voice function has to be good

Others

Bolted onto full-powered phones, computers, and game consoles, vendors don’t have to face the hard casesfor voice control because fallback to traditional controllers is imminent.

Page 77: Chatbots in 2017 -- Ithaca Talk Dec 6

seeing the world that humans live in

specialized cameras and sensors let robots see the world directly in 3-d

Page 78: Chatbots in 2017 -- Ithaca Talk Dec 6

varieties of depth camera

multiocular structured light

laser scanner

Page 79: Chatbots in 2017 -- Ithaca Talk Dec 6

Kinect/A Sensor for a Sessile Robot

Page 80: Chatbots in 2017 -- Ithaca Talk Dec 6
Page 81: Chatbots in 2017 -- Ithaca Talk Dec 6
Page 82: Chatbots in 2017 -- Ithaca Talk Dec 6

Inform 7 tricks and ideas

Controlled English facts and rules Pre-existing Ontologies and Theories

Rules Override Other Rules

Parsing number words as numbers Rule Precedence Managed with “Rulebooks”

Page 83: Chatbots in 2017 -- Ithaca Talk Dec 6

Conclusion: Chatbots• Popular today because of mobile

application limitations

• Possible “third platform” for applications

• Use a wide range of tactics to accomplish goals

• Chatbots in 2017 will depend on data-rich services

• Deeply interdisciplinary, involving art as much as science