Upload
duongkhuong
View
233
Download
0
Embed Size (px)
Citation preview
www.monash.edu.au
Dialogue Structure andPlan/Agent-basedDialogue Models
Slides adapted from Arne JönssonLinköping University, Linköping, Sweden
Topics in Human Computer Interaction
www.monash.edu.au
Dialogue and DiscourseStructure
Topics in Human Computer Interaction
LN3 Topics in HCI, Summer Semester 2015 3
Discourse Structure (Grosz & Sidner, 1986)Three components • Linguistic structure• Intentional structure• Attentional state
LN3 Topics in HCI, Summer Semester 2015 4
Linguistic Structure• Discourse segments and relationships that can
hold between them• Discourse segment – a sequence of utterances• Indicators of segment boundaries:
– Cue phrases– Intonation– Changes in tense and aspect
LN3 Topics in HCI, Summer Semester 2015 5
Cue Phrases – Examples• By the way• For example,• Bye• Oops, I forgot• First of all, finally• OK• But• Thus
• digression• start elaboration• end dialogue• flashback• enumeration• end topic• introduce subtopic• conclusion
LN3 Topics in HCI, Summer Semester 2015 6
Intentional Structure• A discourse has an overall discourse purpose
(DP)• The discourse purpose gives:
– The reason a linguistic act was performed – The reason the particular content was conveyed
• Every discourse segment has its own discourse segment purpose (DSP)
LN3 Topics in HCI, Summer Semester 2015 7
Intentions• The intentions must be recognized from
DSP or DP• Intend that some agent:
– intend to perform some physical task– believe some fact– believe that one fact supports another– intend to identify an object– know some property of an object
LN3 Topics in HCI, Summer Semester 2015 8
Structural Relations• Dominance (DOM)
– DSP1 DOM DSP2 ifDSP2 contributes to DSP1
• Satisfaction-precedence (SP)– DSP1 SP DSP2 if
DSP1 must be satisfied before DSP2
LN3 Topics in HCI, Summer Semester 2015 9
Attentional State• Abstraction of the participants’ focus of attention
– A property of the discourse, not the participants• Dynamic – records objects, properties and
relations that are salient at each point in the discourse
• Modeled by a set of focus spaces in a stack• Focusing structure – the collection of focus
spaces available at any time• Focusing process – the process of manipulating
focus spaces
LN3 Topics in HCI, Summer Semester 2015 10
Focus Stack – ExampleU: Where can I find a good restaurant?
Type of foodDSP2 FS2
RestaurantDSP1 FS1
SuburbDSP3 FS3
S: What type of food do you want?
U: Thai.S: Ok. Any specific suburb?
DSP1 DOM DSP2DSP1 DOM DSP3
www.monash.edu.au
Complex Dialogue Models
Topics in Human Computer Interaction
LN3 Topics in HCI, Summer Semester 2015 12
Dialogue Management ApproachesDialogue Grammars
Plan-based and Belief Desire Intention (BDI) models
Statistical Models
Formalism Grammars Plans Conditional probabilities
Processing method
Parser Plan recognition StatisticalInference
Performance + Efficient + Powerful + Efficient
Restrictive Not so efficient Can go wrong
LN3 Topics in HCI, Summer Semester 2015 13
Complex Dialogue Modeling Paradigms• Plan (Task) Based Model: The dialogue
involves interactively constructing a plan• Agent-Based Model: Involves planning and
also executing and monitoring operations in a dynamically changing world
• Statistical Model: Learns the system’s behaviour
www.monash.edu.au
Planning
Topics in Human Computer Interaction
LN3 Topics in HCI, Summer Semester 2015 15
Planning• Given a goal state
– find a sequence of actions to reach the goal state– specify the bindings of the parameters for the actions
• Plan generation assumes– a world model– an action model– a problem-solving strategy
LN3 Topics in HCI, Summer Semester 2015 16
Key Ideas behind Planning• Use a formal language to describe states,
actions and goals– States and goals are represented by clauses, and
actions by logical descriptions of preconditions and effects
• The planner can add actions to a plan wherever they are needed
• Most parts of the world are independent of other parts
– Divide and conquer approach– But need to detect interactions between sub-parts
LN3 Topics in HCI, Summer Semester 2015 17
ActionsAn action (plan operator) A is defined by• preconditions
– what has to be true in order for someone to do A• body
– how A can be divided into sub-actions• effects
– what is true after A is done> intended effects – the goal of A > side-effects
• constraints on entities involved in A
LN3 Topics in HCI, Summer Semester 2015 18
Planning an Action – Regression PlannerGiven a goal G• Find all operators such that G is on their effect list• Choose an operator O• For each precondition P of O
– If P does not hold, post P as a subgoal to be achieved before doing O
Distinction between preconditions and constraints• Need to check constraints and eliminate operators
whose constraints are not satisfied
LN3 Topics in HCI, Summer Semester 2015 19
Planning Example – Making Coffee (I)
• Initial state – have water, have grinder, be at kitchen, store exists, kitchen exists
• Goal state – have a cup of coffee
• Operators
Operator Precondition Effect
PourCoffee Have brewed coffee
Have cup of coffee
MakeCoffee Have beansHave grinderHave boiling waterBe at kitchen
Have brewed coffee
Buy y Be at storeHave money
Have y
GoPlace x Place x exists Be at xGetMoney Be at bank Have moneyBoilWater Be at kitchen
Have waterHave boiling water
LN3 Topics in HCI, Summer Semester 2015 20
Buy brewed coffee Make coffee
Have beans Have grinder
Pour coffee
Have brewed coffee
Planning Example – Making Coffee (II)
Have cup of coffee
Buy beans
Have money At store
www.monash.edu.au
Plan-based Dialogue Models
Topics in Human Computer Interaction
LN3 Topics in HCI, Summer Semester 2015 22
Plan-based Dialogue ManagementKey idea: “language as action”• Need to recognize intent of an utterance• The task to be performed has subgoals or
preconditions – Actions performed to satisfy them include dialogue acts
• Effects of dialogue acts include changing the belief state of the hearer
LN3 Topics in HCI, Summer Semester 2015 23
Planning and Recognizing Dialogue ActsUtterance generation as planning• Given a communicative goal G and a set of
dialogue act plan operators, generate a plan to achieve G
Dialogue act recognition as plan recognition• Given an utterance U by speaker S, find a
communicative goal G and a plan P to achieve G such that U is a part of P, and S might plausibly have the goal G
LN3 Topics in HCI, Summer Semester 2015 24
Plan-based Theory of Speech Acts (Cohen & Perrault, 1979)
• Based on beliefs, wants, and the interaction between them
• Beliefs – should represent that AGT1 believes that AGT2 believes whether proposition P is true, without AGT1 having to know whether P or ~P is true
– Basic operator: BELIEVE(A,P)– Nesting: BELIEVE(AGT1,BELIEVE(AGT2,P))
• Goals –– WANT(AGT1,BELIEVE(AGT2,P))– BELIEVE(AGT1,WANT(AGT2,P))
LN3 Topics in HCI, Summer Semester 2015 25
Models of Plans• Operators – transform the planner’s model of
the world• Form of operators:
– Effects – propositions to be added to the model of the world
– Preconditions –> can.pr – must be true in the world model for the
operator to be applicable> want.pr – the agent must want to do the action
LN3 Topics in HCI, Summer Semester 2015 26
• INFORM(S,H,P)want.precond: BELIEVE(S,WANT(S,INFORM(S,H,P)))can.precond: BELIEVE(S,P)effect: BELIEVE(H,BELIEVE(S,P))
• CONVINCE(S,H,P)can.precond: BELIEVE(H,BELIEVE(S,P))effect: BELIEVE(H,P)
SPEAKER
Sample Speech Acts as Plan OperatorsHEARER
LN3 Topics in HCI, Summer Semester 2015 27
Example: A Plan to InformS BELIEVE S WANT:
BELIEVE(H,P)
CONVINCE(S,H,P)effect
INFORM(S,H,P)effect
BELIEVE(S,P)can.precond
BELIEVE(H,BELIEVE(S,P))can.precond
LN3 Topics in HCI, Summer Semester 2015 28
Allen and Perrault (1980)• Incorporated knowledge about beliefs• Applied to
– discourse interpretation (recognizing intentions from utterances)
– response generation (related to discourse planning)
LN3 Topics in HCI, Summer Semester 2015 29
Knowledge about Belief• Three types of knowledge about belief
– S believes that A knows that P is trueBELIEVE(S,(P & BELIEVE(A,P))), i.e.,BELIEVE(S, A KNOW P), where
A KNOW P = P & BELIEVE(A,P)– A knows whether P is true
A KNOWIF P = (P & BELIEVE(A,P)) ν (~P & BELIEVE(A,~P))
– A knows the value of a description ix:D(x)A KNOWREF D =
)),(:i BELIEVE(A, &)),(:i( yxDxyxDxy
LN3 Topics in HCI, Summer Semester 2015 30
Additional Speech Acts (I)• INFORM(S,H,P)
want.precond: WANT(S, INFORM(S,H,P))can.precond: S KNOW Peffect: H KNOW PE.g., “HCI is offered at 4 pm”
INFORM(S,H,Offered(HCI,4pm))
• REQUEST(S,H,action)effect: WANT(H, DO(H,action))E.g., “Get me a coffee’’
REQUEST(S,H, Get(H,S,coffee))
LN3 Topics in HCI, Summer Semester 2015 31
Additional Speech Acts (II)• INFORMIF(S,H,P) – inform if P is true or false
want.precond: WANT(S, INFORMIF(S,H,P))can.precond: S KNOWIF Peffect: H KNOWIF PE.g., “Is HCI offered at 3 pm?”
REQUEST(S,H,INFORMIF(H,S,Offered(HCI,3pm))• INFORMREF(S,H,description(P)) – inform a value that
makes P truewant.precond: WANT(S, INFORMREF(S,H,description(P)))can.precond: S KNOWREF description(P)effect: H KNOWREF description(P)E.g., “When is HCI offered?”
REQUEST(S,H,INFORMREF(H,S, time t such thatOffered(HCI,t))
LN3 Topics in HCI, Summer Semester 2015 32
Notation: SBAW(X) –i/c SBAW(Y)• Rules concerning actions• Rules concerning knowledge• Rules concerning planning by others
Plan Inference Rules
LN3 Topics in HCI, Summer Semester 2015 33
Rules Concerning Actions• Precondition-Action Rule
SBAW(P) –i SBAW(ACT)if P is a precondition of action ACT
• Body-Action RuleSBAW(B) –i SBAW(ACT)if B is part of the body of action ACT
• Action-Effect RuleSBAW(ACT) –i SBAW(E)if E is an effect of action ACT
• Want-Action RuleSBAW(nW(ACT)) –i SBAW(ACT)if n is the agent of action ACT
LN3 Topics in HCI, Summer Semester 2015 34
Rules Concerning Knowledge• Know-positive Rule
SBAW(A KNOWIF P) –i SBAW(P)
• Know-negative RuleSBAW(A KNOWIF P) –i SBAW(~P)
• Know-value RuleSBAW(A KNOWIF P(a)) –i SBAW(A KNOWREF ix:P(x))
• Know-term RuleSBAW(A KNOWREF ix:D(x)) –i SBAW(P(ix:D(x)))
LN3 Topics in HCI, Summer Semester 2015 35
Rules Concerning Planning by Others• Action-Precondition Rule
XW(ACT) –c XW(P)if P is a precondition of action ACT
• Action-Body RuleXW(ACT) –c XW(B)if B is part of the body of action ACT
• Effect-Action RuleXW(E) –c XW(ACT)if E is an effect of action ACT
• Know RuleXW(P) –c XW(X KNOWIF P)
LN3 Topics in HCI, Summer Semester 2015 36
Controlling Plan Inference• Main elements
– Expectations – possible goals in the domain– Alternatives – plans emerging from the observations
• Plan specification– Infer – suggest inference rules that apply– Expand – apply rules to modify the plan
• Accept a plan – an alternative meets an expectation
– Heuristics are applied to rate a plan
LN3 Topics in HCI, Summer Semester 2015 37
Example – The BOARD Plan
SBAW(WANT(S,Informref(S,A,i(x:time): DEPART.TIME(train1,x)))) Want-action
SBAW(Informref(S,A,i(x:time): DEPART.TIME(train1,x))) effect (Speech Act)
SBAW(A KNOWREF i(x:time): DEPART.TIME(train1,x))
Know-termSBAW(P?(i(x:time): DEPART.TIME(train1,x)))
match with expectationAT(…,ix:DEPART.TIME(train1,x))
BOARD(A,train1,Toronto)|
AT(A,il:DEPART.LOC(train1,l),it:DEPART.TIME(train1,t))
INFER-EXPAND
INFER-EXPAND
ACCEPT
LN3 Topics in HCI, Summer Semester 2015 38
Composite DAs as Plan OperatorsConvinceByInform(Speaker, Hearer, Prop)
Constraints: Agent(Speaker), Agent(Hearer), Proposition(Prop), Bel(Speaker, Prop)
Preconditions: At(Speaker, Loc(Hearer))Effects: Bel(Hearer, Prop)
MotivateByRequest(Speaker, Hearer, Act)Constraints: Agent(Speaker), Agent(Hearer), Action(Act)Preconditions: At(Speaker, Loc(Hearer))Effects: Intend(Hearer, Act)
LN3 Topics in HCI, Summer Semester 2015 39
Trains – Example I (Allen et al., 1995) U: There's been an ice storm off Lake Ontario. Rochester and
Sodus are without power. We need to get emergency crews there as soon as possible.
C: <fig> There are power crews available at Jamestown and Ithaca. And reserve crews without trucks at Dansville. How many do you need?
LN3 Topics in HCI, Summer Semester 2015 40
LN3 Topics in HCI, Summer Semester 2015 41
Trains – Example II (Allen et al., 1994) U: There's been an ice storm off Lake Ontario. Rochester and
Sodus are without power. We need to get emergency crews there as soon as possible.
C: <fig> There are power crews available at Jamestown and Ithaca. And reserve crews without trucks at Dansville. How many do you need?
U: Well, all of them. C: OK. You'll need extra equipment then, which is at the depot
in Bath. U: OK, can you schedule the transport? C: No, The storm's affected Mount Morris as well. It's unlikely
we can get trains through there. OK. We can route it through Sodus instead.
U: No. Go via Avon. I want to get crews to Rochester as soon as possible.
C: OK
LN3 Topics in HCI, Summer Semester 2015 42
Trains – Domain Plan Example
Repair_power(X)¬Power(X) Power(X)
Power_Crew(P) Equipment(E)At(X,P)
Transport(E,X,Y)
Precond Effect
Precond
Effect
Precond
At(Y,E) Clear_road(R,Y,X)
Effect
Precond
Transport(P,Y,X)
At(Y,P)Clear_road(R,Y,X)
Precond
At(X,E)ConstraintsConstraints
ConstraintsConstraints
LN3 Topics in HCI, Summer Semester 2015 43
Trains – Example IIIU: No. Go via Avon. I want to get crews to
Rochester as soon as possible.
MotivateByRequest(U, C,Transport(Crews, Avon, Rochester))
Constraints: Agent(U), Agent(C), Action(Transport) Preconditions: At(U, Loc(C))Effects: Intend(C, Transport(Crews, Avon, Rochester))
LN3 Topics in HCI, Summer Semester 2015 44
Plan-based Dialogue Management • Advantages
– Tight integration between task performance and dialogue interaction
– Complex dialogue strategies can be implemented as generic operations
– Task-dependent dialogue strategies can be added• Disadvantage
– Large knowledge engineering effort
www.monash.edu.au
Agent-basedDialogue Models
Topics in Human Computer Interaction
LN3 Topics in HCI, Summer Semester 2015 46
The BDI Model – A Plan-based ModelThree components:• Beliefs about the world – how things are
perceived by an agent• Desires – how an agent wants things to be
(goals)• Intentions – an agent’s commitment to its
desires (goals) and to the plans selected to achieve these goals
LN3 Topics in HCI, Summer Semester 2015 47
Example – BDI Dialogue Agents
Multi-agent conversation in the marketplace
LN3 Topics in HCI, Summer Semester 2015 48
Reading Material• Towards conversational human-computer interaction, Allen
et al. (2001)• Attention, Intentions and the structure of discourse, Grosz
and Sidner (1986)• Elements of a Plan-Based Theory of Speech Acts, Cohen
and Perrault (1979)• Analyzing intention in utterances, Allen and Perrault (1980)• The TRAINS Project: A case study in building a
conversational planning agent, Allen et al. (1995)• Can I finish? Learning when to respond to incremental
interpretation results in interactive dialogue, DeVault, Sagae and Traum (2009)