24
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. Lyudmil Pelov @lpelov Oracle A-Team March, 2017 IMPLEMENTING CHATBOT PLATFORMS

Implementing Your Own Chatbot Platform!

Embed Size (px)

Citation preview

Page 1: Implementing Your Own Chatbot Platform!

Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

Lyudmil Pelov@lpelovOracle A-TeamMarch, 2017

IMPLEMENTING CHATBOT PLATFORMS

Page 2: Implementing Your Own Chatbot Platform!

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

• We Message!– there are more people on messaging apps

than social networks

– millennials are texting more than calling

– teens would rather message than have a phone conversation

– 65% of consumers want to message a business to*

– > 50% of all consumers would make a purchase via a message

– messaging is just easier, faster, and more productive for targeted tasks than mobile or web

*Based on survey conducted by Smooch.ai

Page 3: Implementing Your Own Chatbot Platform!

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 3

• most common types of bots

• highly specialized and structured interactions

• typically user initiated

• integrated with enterprise systems

• useful in the support or service category

Task Oriented Data Driven & Predictive

• personalized based on profile, past behavior and contextual information

• monitors data and initiates conversation when data crosses threshold

• predictive Intelligence based on data - key for bots to be a useful in the long run across use-case categories

First Generation Chatbots

Page 4: Implementing Your Own Chatbot Platform!

Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

Next Generation Chatbots

“non supervised general availability bots”

“sophisticated prediction models requiring reduced supervising”

“auto labeling”

“anomaly detection”

“concept extraction”

“augmentation argument (capable to argument based on facts)”

“semi-supervised named entity recognition”

Page 5: Implementing Your Own Chatbot Platform!

Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

Future Generation Chatbots

“be able to take successful the Turing test?!”

“Turing Test: If the evaluator cannot reliably tell the machine from the human (Turing originally suggested that the machine would convince a human 30% of the time after five minutes of conversation) , the

machine is said to have passed the test.”

“The test does not check the ability to give correct answers to questions, only how closely answers resemble those a human would give.”

Probably not likely to happen soon but not impossible as the ML models get more advance!

https://en.wikipedia.org/wiki/Turing_test

Page 6: Implementing Your Own Chatbot Platform!

Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

FIRST GENERATION CHATBOT CAPABILITIES AND CHALLENGES

Page 7: Implementing Your Own Chatbot Platform!

Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

Intent Recognition (classification)

“the ability to understand the intent from human ambiguous language”

#wordvector, #deeplearning4j, #opennlp, #stanfordnlp

Page 8: Implementing Your Own Chatbot Platform!

Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

Advance Intent Recognition Challenge

“The city councilmen refused the demonstrators a permit because they feared violence”

“What does the word “they” refer to here —  the councilmen or the demonstrators? What if instead of “feared” we wrote “advocated”?”(1)

“Oren Etzioni: When AI can’t determine what “it” refers to in a sentence, it’s hard to believe that it will take over the world”(1)

https://techcrunch.com/2017/02/25/conversational-ai-and-the-road-ahead/ (1)

Page 9: Implementing Your Own Chatbot Platform!

Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

Intent Recognition Training Model Guideline

“intents should be different enough to help the ML disambiguate better”

“Good Pizza vs Bad Pizza are not two different intents, the intent here would be Pizza Quality, Good and Bad would be entity Rating”

“single keywords are not useful”

“unique sentences are super helpful, semantically and synonym rich”

“do {word} sentence construction in different intent models will falsely give high prediction score for all intents”

Page 10: Implementing Your Own Chatbot Platform!

Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

Entity Recognition (NER)

“the ability to automatically recognize entity meanings from ambiguous language”

“despite all improvements in ML, the problem of accurate entity recognition is far from been solved”

“main effort currently is directed to find approaches to reduce the annotation labor – semi-supervised NER”

#opennlp, #stanfordnlp

Page 11: Implementing Your Own Chatbot Platform!

Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

Entity Recognition (NER) – example with OpenNLP

Model

“The other day at work I saw <START:person> Larry Elison <END> at <START:building> HQ600 <END>”

Test

“The other day at work I saw Lyudmil Pelov at HQ300”

“The other day at work I saw lyudmil Pelov at 300”

Page 12: Implementing Your Own Chatbot Platform!

Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

Sentiment Analysis (emotional intelligence)

“evaluate subjective patterns and expressions of sentiment within textual content”

“usually identifies if expression was positive, negative, mixed, or neutral”

“requires a high degree of supervised ML on big data corpus, usually Twitter”

#deeplearning4j, #opennlp, #stanfordnlp

Page 13: Implementing Your Own Chatbot Platform!

Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

Probabilistic Parser

“probabilistic parsing is using dynamic programming algorithms to compute the most likely parse(s) of a given sentence, given a statistical model of the syntactic structure of a language”

“parse any address, name, number, date or any unstructured text in useful components”

#stanford, #duckling, #parserator

http://nlp.stanford.edu/projects/stat-parsing.shtml

Page 14: Implementing Your Own Chatbot Platform!

Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

Probabilistic Parser – Duckling Example

#stanford, #duckling, #parserator

https://duckling.wit.ai/

Page 15: Implementing Your Own Chatbot Platform!

Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

CHATBOT CONCEPTS

Page 16: Implementing Your Own Chatbot Platform!

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. https://www.behance.net/gallery/47419375/Chatbot-Powerful-UX-Concepts

Page 17: Implementing Your Own Chatbot Platform!

Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

ORACLE INTELLIGENT BOT - KEY COMPONENTS

Page 18: Implementing Your Own Chatbot Platform!

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

• active machine learning

• NER• sentiment recognition

• SDK to consume back-end API’s

• declarative bot flow• state machine context driven

workflows

• cross channel chat interface

Channel Configurator

Dialog Flow Execution

NLP EngineCustom

Components in Dialog

Flow

Page 19: Implementing Your Own Chatbot Platform!

Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

ORACLE INTELLIGENT BOT – HOW IT WORKS

Page 20: Implementing Your Own Chatbot Platform!

Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

Design-time

“specify intents and entities”

“test intents and flows”

“create a flow (depicts bot execution logic)”

“wire up the flow to clients and custom components (channels & back-end API integration)”

Page 21: Implementing Your Own Chatbot Platform!

Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

Run-time

“incoming message from channel activates bot flow”

“intent classification: determines what the user request is most likely trying to accomplish based on machine learning”

“entity resolution: the entity recognizer identifies the important words and phrases contained in each user request”

“dialog engine execution: once the entity’s are resolved, the dialog engine or manager formulates the response to return to the user based on a state machine”

Page 22: Implementing Your Own Chatbot Platform!

Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

ORACLE IBCS: PaaS Multi-Tenant Architecture

Page 23: Implementing Your Own Chatbot Platform!

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

23

Custom Component

s

Customer MCS/Customer ACCS/Customer JCS

LBaaS/Cloudgate

ACCS Container C

Dialog engine

OEHPCS Service

Intent Server

ACCS Container D

ACCS Container AChannel

Drivers/Auth

UI EndpointsAPI

ACCS Container B

DBaaS (1 per tenant)

Page 24: Implementing Your Own Chatbot Platform!