commerce chatbot - dialog manager

31

Upload: hochul-shin

Post on 22-Jan-2018

107 views

Category:

Software


2 download

TRANSCRIPT

Page 1: Commerce chatbot - dialog manager
Page 2: Commerce chatbot - dialog manager

• Dialog Management System

• Dialog Manager

• Dialog Management Technologies

• Main features in Ravenclaw

• 2-tier architecture

• Dialog Task Specification

• Dialog Agents

• Agent Behavior

• Concept

• DTS in Ravenclaw

• Hierarchical Plan-based representation

• Core Algorithm

• Execute Phase

• Stack & Tree

• Input phase

• Expectation agenda

• Mixed initiative

• Control the amount of initiative

• Context-based semantic disambigution

• Error handling

Page 3: Commerce chatbot - dialog manager

Dialog Management System

Page 4: Commerce chatbot - dialog manager

• determines the next system action with– Current semantic input

– Current dialog state

– Information about the task

• more-complex model– Timing, turn-taking

– Barge-ins, backchannels, multi-participant conversation

– Error handling

– Various appropriate requests

Dialog Manager

Page 5: Commerce chatbot - dialog manager

• Finite-state dialog manager

• Form-filling (frame-based) dialog manager

• Plan-based dialog manager (RavenClaw)

– Model the goals of the conversation

– Guide the dialog along the path towards these goals

Dialog Management Technologies

Page 6: Commerce chatbot - dialog manager

• Task-independence– Clear separation between – the domain-specific aspects of the dialog control l

ogic– And domain-independent– Reusable dialog control mechanism

• Flexibility• Scalability• Transparency• Modularity• …

Main features in RavenClaw

Page 7: Commerce chatbot - dialog manager

2-tier architecture

Page 8: Commerce chatbot - dialog manager

• DTS(Dialog Task Specification)– Covers domain specific aspects

– Describes hierarchical plan

– Consist of a tree of dialog agents

Dialog Task Specification

Page 9: Commerce chatbot - dialog manager

• Types• Inform

–Generate output(e.g. greeting)

• Request–Request information

–Collect the user’s response

• Expect–Expect information from user

• Execute–Database access

–Api calls

–Etc

• Dialog Agencies• Planning the execution of their sub-agents

Dialog Agents

Page 10: Commerce chatbot - dialog manager

• Execute routine– Basic operations of each agent(4 types)

• Additional configuration for agent/agency– Precondition

– Trigger

– Success/fail criteria

Agent Behavior

Page 11: Commerce chatbot - dialog manager

Concept

Page 12: Commerce chatbot - dialog manager

• Type

– Boolean, string, integer, float, structure, array

• Value/Confidence

– Ex. City_name = {Boston/0.35, Austin/0.27}

– Due to speech recognition error

– Not used in our Chatbot

• Information(value) maintained in scenario

– History of previous values

– Grounding state

– …

Concept

Page 13: Commerce chatbot - dialog manager

DTS in RavenClaw

Page 14: Commerce chatbot - dialog manager

Described in DialogTask.cpp with MACRO

DTS in RavenClaw

Page 15: Commerce chatbot - dialog manager

• No fixed order– Depends on user input,

encoded domain constraint, task logic and various execution policies

• Hierarchical plan-based representation– Most goal-oriented dialog tasks have a naturally

hierarchical structure

– Sub-components are independentEase in design, maintenance, scalability and reusability

– Can be extended at run timeAllow for the dynamic construction

Hierarchical Plan-based representation

Page 16: Commerce chatbot - dialog manager

• 2 data structures– Dialog stack

– Expectation agenda

• 2 phase– Execution phase

– Input phase

Core Algorithm

Page 17: Commerce chatbot - dialog manager

Execute Phase

Page 18: Commerce chatbot - dialog manager

• Execute agent on top of the stack– Inform agent : output system prompt

– Request agent – output system prompt input phase

– Expect agent – do nothing( just expect)

– Execute agent – call APIs

– Agency – push one of subagents on the dialog stack

• Eliminate completed agents from stack– If the completion condition is meet.

• Push focus claiming agents on stack– Inspects the focus claims(trigger) conditions.

Execute Phase

Page 19: Commerce chatbot - dialog manager

• Dialog Stack– Temporal and hierarchical structure of the discourse

• Tree(DTS)– Hierarchical goal structure of the task

• Isomorphism between stack and tree– Sometimes broken when focus shifts

If trigger condition meets, push the agent on the stack Isomorphism will be maintained after focus claimed agents finish

Stack & Tree

Page 20: Commerce chatbot - dialog manager

• Only in Request agent– Assemble the expectation agenda

• Waits for an user input– Thread blocked until user input

• Update concept (concept binding)– Top-down traversal of the expectation agenda

Input phase

Page 21: Commerce chatbot - dialog manager

Input phase

Page 22: Commerce chatbot - dialog manager

• Data-structure that describes what the system expects to hear from the user in the current turn– Advantages

Allow over-answer

Mixed-initiative interaction

Automatically performs context-based semantic disambiguation

Dynamic state-specific language modeling

Expectation agenda

Page 23: Commerce chatbot - dialog manager

Mixed initiative

Page 24: Commerce chatbot - dialog manager

• Focus claim if agenda is open.

• By default, open only when under the same topic– If main topic is set, child agent(agency) can be

focus-shifted.

앞의 예제에서 Hotels가 main topic으로 설정되어있었다면, focus shift가 되지 않음.

• Expectation scope operators– ! – open if expectation == focus

– * - always open

– @ - open if agents which are listed after @ == focus

Control the amount of initiative

Page 25: Commerce chatbot - dialog manager

Context-based semantic disambiguation

Page 26: Commerce chatbot - dialog manager

• State/context-specific language model

• Level-based organization of expectation agenda provides additional information

• But NOT yet implemented in RavenClaw engine

Dynamic state-specific language modeling

Page 27: Commerce chatbot - dialog manager

• Speech recognition and language understanding– Still far from perfect

– Non-understanding & misunderstanding

• Domain-independent error handling– Various advantages

Error handling

Page 28: Commerce chatbot - dialog manager

• No speech recognition in chatbot– No confidence level

• No explicit error decision process

In Chatbot

Page 29: Commerce chatbot - dialog manager

• Data flow

• Message NLU DM NLG Message

NLU DM NLG

Page 30: Commerce chatbot - dialog manager

DTS – json format

Page 31: Commerce chatbot - dialog manager

• Original RavenClaw is c-based.

– DTS JSONize

– RavenClaw engine : c python

• New classes

• New properties

Customize