Vous êtes sur la page 1sur 41

The

Rise of Chat Bots in Enterprise


Mobile Applica7on Development

Frank Nimphius
Senior Principal Product Manager
Oracle Mobile PlaDorm
Mar 21, 2017

Oracle Code, NYC


"THE FOLLOWING IS INTENDED TO OUTLINE OUR GENERAL PRODUCT
DIRECTION. IT IS INTENDED FOR INFORMATION PURPOSES ONLY, AND
MAY NOT BE INCORPORATED INTO ANY CONTRACT.

IT IS NOT A COMMITMENT TO DELIVER ANY MATERIAL, CODE, OR
FUNCTIONALITY, AND SHOULD NOT BE RELIED UPON IN MAKING
PURCHASING DECISIONS.

THE DEVELOPMENT, RELEASE, AND TIMING OF ANY FEATURES OR
FUNCTIONALITY DESCRIBED FOR ORACLE'S PRODUCTS REMAINS AT
THE SOLE DISCRETION OF ORACLE."

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 2


Origin of Chat "Hands free"
Communica7on

Search
TEXT AUDIO Easiest

Read / Write
Sound and
Voice
INFORMATION
How we share informa7on
Visual Samples
(e.g. Product)
Sharing of Events
and Experiences
Worth a 1000
Words PICTURES VIDEO
Keep for Later
Visualiza7on of
Mood & Sen7ments Show & Tell

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 3


TEXT AUDIO

INFORMATION
How we consume informa7on

PICTURE VIDEO

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 4


THERE'S
AN APP
FOR THAT
Apple Trademark, since 2010

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 5


The best interface
is no interface
Golden Krishna, March 2015

Simple is acceptable.

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 6


Conversa7on
is the most natural form
of communica7on

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 7


Conversa7on
is the most natural form
most natural
of communica7on
Give two people a cup of coee or tea
and they start chahng

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 8


Chatbots

Virtual users that are programmed to
assist real users on the conversa7onal
interface


Extend mobile opportuni7es to Simple Interface Do real work
the conversa7onal Interface

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 9


Banking
There is an app for that!
Oken however there is no need for
an app. Even for a business that you
would think requires an app.
DEMONSTRATION

Copyright 2017, Oracle and/or its aliates. All rights reserved. | Conden7al Oracle Internal/Restricted/Highly Restricted 10
Chatbot Benets for Developers

Highly available, fast and intui7ve to use
mobile plaDorm for business-to-consumer
interac7on at a low cost


Easy entry for a Cloud Based Easier to build Cross PlaDorm by
mobile strategy Opera7on than apps Design and Default
Copyright 2017, Oracle and/or its aliates. All rights reserved. | 11
Chatbot Terminology

Natural Language Processing


Intents
Machine Learning
Uperances
En77es
Dialog ow

Copyright 2017, Oracle and/or its aliates. All rights reserved. | Conden7al Oracle Internal/Restricted/Highly Restricted 12
The meaning
of Words
The art of dis7lling user intents and data from
natural language input for chatbots to invoke
ac7ons and return reasonable responses

Natural Language Processing (NLP)


& Machine Learning (ML)

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 13


Natural Language Processing (NLP) Challenge

Src: hpp://www.funnyjunk.com/funny_pictures/3426677

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 14


But if it works as designed

Src: hpp://www.independent.co.uk/news/world/australasia/siri-saves-babys-calls-ambulance-stopped-breathing-iphone-apple-a7070641.html

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 15


The Intent determines the context
of a conversa7on.

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 16


"Transfer 100 USD from my default account to Lydia for babysitting"

Intent Intent System


MoneyTransfer What does the user want?
How can this be mapped to an ac7on?

Training (Uperance) Intent Model


/ Machine Learning
Send money to account Model created from the training data,
Referenced at run7me to detect the
Transfer 20 USD to account user intent
Pay money to account
Give money to Roger

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 17


The En7ty is a variable that holds essen7al
informa7on from the unstructured input to
parameterize backend API calls

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 18


"Transfer 100 USD from my default account to Lydia for babysitting"

Intent En7ty En7ty System


MoneyTransfer
Transfer Process Informa7on
Account from
Account to Find what is relevant for
String descrip7on the intent
Number amount

En7ty Model
Model the en7ty system creates from
En7ty training data to extract the data for a
Account given sentence

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 19


Dialog ow

Manages conversa7on ow

Visits states and holds data context

Invokes custom business logic

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 20


Example How to build intelligent chatbots
in the Cloud.

DEMONSTRATION
Oracle Intelligent Bots

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 21


Oracle Intelligent Bots Architecture Component Overview
Unied cross-channel chat Declara7ve bot builder UI
interface between bots & for bot ow
humans State machine executes

Channel Dialog context driven workows
Congurator Flow Execu7on with scoped variables
Custom

SDK to consume backend Ac7ve machine learning


APIs that sa7sfy human Custom algorithms that iden7fy
AI
requests via the bot Components rela7onships and extract
Engine
in Dialog Flow insights from unstructured
data

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 22


Node.js programming
How Oracle Intelligent Bots Works
Channel IntegraCon Intent ClassicaCon EnCty ExtracCon Dialog ExecuCon

Channel Agnos7c Intent Modeling En7ty Parsing YAML Dialog Flow


Webhook Natural Language En7ty Resolu7on Dialog State
Security Linguis7c Modeling En7ty Type Built-in Components
Message Processing Bot Model Training En7ty Value Custom Components

Required En77es: Integra7on


NL Understanding Component
Account Type

Intent Classica7on: En7ty Values
Balances

Intent Ranking
Checking, Savings,
Condence 98% Data
Credit

Alexa whats For which The balance in your


Savings savings account is
my balance account?
$2334.56

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 23


Custom Component Architecture

Intelligent Bots Node Container Remote Services

1 2 Custom Component Service


Connectors

http://rest/api Node
3
Interface Implementa7on

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 24


Custom Component Implementa7on Architecture
Component Service
REST endpoint ac7ng as a package for one Node Container
or many components
GET
Shell SDK Component_1 Impl
U7lity object shipped with chatbot to nd

Component Service
and invoke custom components POST

Registry Component_2 Impl


Shell
JS object that lists custom components
managed by a component service
SDK
Helper object that simplies access to Registry
dialog state and variables
Component Implementa7on

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 25


Example How to build and deploy custom
code in custom components.

DEMONSTRATION
Oracle Intelligent Bots

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 26


All chatbots do the same thing.

Copyright 2017, Oracle and/or its aliates. All rights reserved. |


All chatbots do the same thing.

Every Chatbot framework include some por7on of these capabili7es


Serverless Dialog Engine Applica7on & Channel APIs, Bot Mgmt
Compute APIs NLU Services Database & Connectors (Training Data,
Security APIs Intents, En77es,
Models)

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 28


Open, scalable run7me Enterprise grade security from Enterprise Integra7on
plaDorm that handle millions consumer grade messaging designed for mobile / Chatbot
of conversa7ons channels channels

How Oracle Dieren7ates.

Simple to use Bot designer Machine learning with cross


Technology partnerships with
across mul7ple messaging channel predic7ve analy7cs &
Facebook & others
channels knowledge packs

Copyright 2017, Oracle and/or its aliates. All rights reserved. | Conden7al Oracle Internal/Restricted/Highly Restricted 29
Q&A
Copyright 2017, Oracle and/or its aliates. All rights reserved.
Copyright 2017, Oracle and/or its aliates. All rights reserved. | 30
Addi7onal Slides for Reference
Code Sample Slides

Copyright 2017, Oracle and/or its aliates. All rights reserved. |


registry.js

JSON object that holds key/value pairs


'use strict'; of component names and the
module.exports = {'BalanceRetrieval':
component JS le reference
require('./banking/balance_retrieval'), Imported to the shell.js le
'TrackSpending': require("./registry")
require('./banking/track_spending'),
Restric7ons
'Payments': Must be names registry.js
require('./banking/payments')} Must be located in same directory as
shell.js

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 33


Component Service GET Func7on
Created as custom API in
var _shell = require('./shell');

Oracle Mobile Cloud Service


<api_name>
service.get('/mobile/custom/api_name/ Imports the shell library
components', function(req,res){
U7lity to assist with Intelligent Bots context
informa7on
res.set(
'Content-Type', Return array of component metadata
'application/json') as JSON
.status(200)
.json(
_shell.getAllComponentMetadata()
);
}

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 34


Component Service POST Func7on (I / III)
Oracle Mobile Cloud Service custom
service.post('/mobile/custom/
api_name/components/:componentName',
API
function(req,res) { <api_name>
Looks up component by its name
shell.invokeComponentByName(
req.oracleMobile, Input parameters include
req.params.componentName, MCS mobile SDK
req.body, function(err, data) { Component name

} POST request body
}); Func7on callback to handle success and
error case

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 35


Component Service POST Func7on (II / III)
Uses shell object to nd and invoke
shell.invokeComponentByName(
req.params.componentName,
custom component
req.body, Shell invokes callback func7on in case
function(err, data) { of invoca7on success and failure
if (!err) { Your code returns response to Oracle
res.status(200).json(data); Intelligent Bots or handles error
}
else {
switch (err.name) { }
}
});

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 36


Component Service POST Func7on (III / III)
switch (err.name) {
In case of error, use a switch
statement to determine the cause
case 'unknownComponent': Based on error, return suitable HTTP
res.status(404).send(err.message); status code
break;
Op7onal, but recommended: log
case 'badRequest': error
res.status(400).json(err.details);
break;

default:
res.status(500).json(err.details);
break;
}

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 37


Component Metadata
Each custom component describes
{ itself to Oracle Intelligent Bots
"componentName": "name,
"channels": { "facebook": "1.0" }, Component metadata is read by shell
"componentProperties": { object
"property_1": { "type": "string", Intelligent Bots requests components
"required": true }, and their metadata at design 7me
"property_2": { "type": "float",
"required": true },
},

"supportedActions": [ success,
failure" ]
}

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 38


Component Metadata in Component Code (Example)
module.exports = {
metadata: function metadata() {
return {
"componentName": "BalanceRetrieval",
"channels": {
"facebook": "1.0"
},
"componentProperties": {
"accountType": { "type": "string", "required": true }
},
"supportedActions": []
};
},

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 39


Invoke func7on in Component Code

module.exports = {

metadata: function metadata(){ ... },

invoke: function invoke(mobileSdk, sdk, done) {


var accountType = sdk.properties().accountType;

}
}

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 40


SDK Example
Display a Text Response to the client

sdk.reply({ text: 'The balance in your


' + accountType + ' account
(' + account.id + ') is $' +
String(account.balance()) });

if (accountType === 'credit card') {


sdk.reply({ text: 'Your remaining
credit is $' +
String(account.remainingLimit()) });
}

sdk.exit(true);
sdk.done(true);

Copyright 2017, Oracle and/or its aliates. All rights reserved. | 41

Vous aimerez peut-être aussi