A model of a Social Chatbot A. AUGELLO 1 M. GENTILE 2 L. WEIDEVELD 3 F. DIGNUM 3
1. I C A R -‐ N AT I ONA L R E S EARCH COUNC I L O F I TA LY,
2. I T D -‐ N AT I ONA L R E S EARCH COUNC I L O F I TA LY
3. UTRECHT UN I V E RS I T Y, T H E N E THER LANDS
KES-‐IIMSS-‐16 Interac(ve Cogni(ve Systems
Outline
Overview • Serious games for communica3ve skills training • Role of “social context” in conversa3on • Social Prac3ce Theory
Proposed Solu3on: • Injec3ng social intelligence into conversa3onal agents by means of a social prac3ce based architecture
Analysis of a case study inspired to the Communicate! Serious Game
Concluding Remarks
Serious games for communicaOve skills training
Serious games can be exploited as an innova3ve and valid approach by means of simula3on of interac3ons with virtual characters.
Virtual agents can be used to improve communica3ve and social skills.
The players interact with the agents:
• experiencing the social effects of a conversa3on • beLer understanding how elements involved in a social interac3on determine the actual conversa3on and the uLerances that are used.
Script based approach OMen the interac3on in these games is obtained by means of a script dialogue approach
An editor is used to design the dialogues and to specify the feedback of the virtual agent The player can select one sentence from list of mul3ple choices
Drawbacks of a script-‐based approach Interac3on with the virtual agent • The conversa3on and the agent behaviour are predetermined
• The interac3on becomes repe33ve aMer few uses.
Player Experience • Players have no freedom in the dialogue • The communica3ve experience is different from a real one
Proposed SoluOon We are implemen3ng a game where: • The player can experiment different roles and situa3ons and can interact with a greater freedom;
• The agent is not simple reac3ve but has its autonomy
We need to • Consider a different approach to implement the conversa3onal agent
• Formalize the agent’s knowledge and the reasoning process • Provide the agent of social skills
Role of social context in conversaOon The dialogue is a joint ac3vity that must consider both individual and social processes
Different communica3on strategies can be used according to the specific social context
The same sentence can be used with a different meaning in different context and can raise different social effects
You should take a cat
Role of social context in conversaOon
A Social pracOce model for the creaOon of social agents Premises: • Social context is oMen used as another aspect to consider in agents planning
• Including social context adds excessive complexity to agents planning.
Social Prac3ce Theory (Reckwitz, 2002) • A ‘social prac3ce’ is a rou3nized type of behaviour which consists of several interconnected elements.
• Social prac3ces can be used to describe the social context in an efficient way.
• Pu5ng social prac7ces at the heart of the delibera7on allows for more efficient planning (Dignum and Dignum, 2014)
Social pracOce model
Chatbot as a starOng point Strength: ◦ It is possible to create quickly a conversa3onal agent, avoiding natural language processing issues
◦ It is easy to define the chatbot behaviour through the design of proper ques3on answers modules (AIML categories)
Weaknesses : ◦ Chatbots lacks the ability to keep an overview and a structure of the en3re conversa3on. ◦ In AIML the dialogue is managed keeping track of the last conversa3on exchange and seang conversa3on topics.
◦ It is difficult to design chatbots able to correctly manage social conversa3onal prac3ces.
<category> <paLern>MY NAME IS *</paLern>
<that>HELLO THERE WHAT IS YOUR NAME</that> <template>Nice to meet you <star /></template> </category>
A Social Agent Architecture for serious games
Agent’s IdenOty The iden3ty of the agent formalizes: ◦ his beliefs ◦ the informa3on related to the possible social prac3ces
◦ the state of the dialogue ◦ The rules for the genera3on of plans and the defini3on of norms
◦ The analysis of possible norm viola3ons and the state variables upda3ng.
◦ The linguis3c knowledge for the conversa3on management
S-‐AIML The S-‐AIML language and its processor are enhancements respec3vely of AIML language and the ALICE dialogue engine.
The S-‐AIML chatbot is able to manage the dialogue according to a specific social prac3ce.
New tags have been introduced to: ◦ Organize categories according to the main concept of a social prac3ce, such as the scenes of a plan paLern;
◦ Interact with a forward chaining rules engine (i.e. drools) (insert facts, detract facts, perform queries…)
◦ Dynamically ac3vate/deac3vate categories according to precondi3ons
Agent’s DeliberaOon The delibera3on module is composed of ◦ a rules engine ◦ the (S-‐AIML) processor
The interac3on of these two modules allows the agent to manage the dialogue according to the social prac3ce model: ◦ given a specific social prac3ce the agent deliberates according to facts, data and rules related to the prac3ce;
◦ the result of the reasoning process leads to dynamic ac3va3on of a small set of S-‐AIML categories
Agent’s DeliberaOon The agent can update the value of the state variables through the reasoning process but he can also update them by means of the S-‐AIML processor.
The agent con3nuously monitors possible viola3ons of social prac3ce norms: ◦ Depending on the actual situa3on, expecta3ons are confirmed and the prac3ce is con3nued or the social prac3ce is re-‐evaluated
◦ In case of a viola3on the agent will act in a proper manner, stopping the execu3on of that prac3ce if necessary.
It is important to highlight that a social prac3ce is not a determinis3c structure, some behaviours of the agent are determined by the actual state of the dialogue inside a specific prac3ce!
A Case study Scenario
The pa0ent is confused and worried. In the wai0ng room talks with other pa0ents to obtain some useful informa0on about the doctor
A pa0ent goes to the hospital because he has an appointment with his doctor. The pa0ent’s expecta0on is to quickly obtain the medicine prescrip0on and leave the hospital in few minutes
That day there is another doctor in the office. The pa0ent must describe his health history. During the anamnesi the doctor recommends the pa0ent to further examine his situa0on by making a CAT scan.
Social Prac7ce Doctor-‐Pa7ent Dialogue
Physical Context Resources Places Actors
Current Time, Medical Instruments Hospital, Office User, Agent
Social Context Social Interpreta3on Roles Norms
Consul3ng room, Consul3ng 3me Doctor, Pa3ent Pa3ent must be coopera3ve, Doctor must be polite
Ac7vi7es Welcome, Presenta3on, Data Gathering, Symptoms Descrip3on, Speech acts
Plan PaJerns Welcome, Presenta3on, Data Gathering, Symptoms Descrip3on, Therapy, Appointmnet Scheduling, Gree3ngs
Meaning Support the pa3ent, create trust, elici3ng pa3ent’s concerns, emphate3c response
Competences Listening Effec3vely, Being Empathe3c, Use effec3vely explanatory skills
Social PracOces Examples
Social PracOces Examples Social Prac7ce Pa7ent-‐Pa7ent Dialogue
Physical Context Resources Places Actors
Current Time, Medical Instruments Hospital room User, Agent
Social Context Social Interpreta3on Roles Norms
Wai3ng room, Consul3ng 3me Pa3ent, Pa3ent Pa3ent must be polite
Ac7vi7es Presenta3on, Informa3on Gathering, Giving Informa3on, Experiences Sharing, Speech acts
Plan PaJerns Presenta3on, Experiences Sharing, Informa3on Gathering
Meaning Obtain support, give support, estabilish a rela3on, trust, elici3ng concerns, emphate3c response, sharing similar problems, sharing the same doctor.
Competences Listening Effec3vely, Being Emphate3c, Use effec3vely explanatory skills
Example of rules formalizaOon rule "setAc3vePrac3ce” when $a:Agent($prac3ce:ac3vePrac3ce,$chat:chatSession) then Scene next=$prac3ce.getFirstScene(); if (next!=null) {$a.setCurrentScene(next); $chat.predicates.put(”scene",next.getName()); } end
Example of rules formalizaOon Rules can be directly linked to this social prac3ce. These rules can be formalized according to what emerges in several studies in the effect of communica3on in health care contexts
”If the doctor shows a low empathy the pa0ent sa0sfac0on decreases”.
Some rules must be defined as norms that must be respected inside the social prac3ce such as the rule asser3ng that
”The doctor must be polite”.
An example of scenario managed with tradiOonal AIML <category> <paLern>You should make a computerized axial tomography </paLern> <template> <condi3on name=”interlocutor” > <li value=”familiar”>Who gave you the medical degree? </li> <li value=”pa3ent”>Did you already done this examina3on ? </li> <li value=”doctor”> <condi3on name=”doctor type” > <li value=”family doctor”>Tell me doctor, could i have something of serious? <think><set name=”emo3on”>fear </set> </think> </li> </condi3on> … </condi3on> </template> </category>
The same example managed with S-‐AIML
<social prac3ce name=“unknown doctor consulta3on”> <category> <precondi3on> <el>trust>low</el> </precondi3on> <paLern>You must make a computerized axial tomography</paLern> <template> Why should I make this examina3on? <think> <el>emo3on=fear</el> <el>trus3ng=trus3ng−3</el> </think> <template> </category>
Conclusion and future works The proposed solu3on: • puts social prac3ce at the heart of the delibera3ve process of an agent; • allows for a dynamic ac3va3on of categories, depending on the current social prac3ce, the pursued plan, the on-‐going ac3vity, and finally, at the lowest level the agent’s iden3ty;
• allows for a great flexibility in the conversa3on while at the same 3me simplifying the formaliza3on of the chatbot KB;
• ensures to the player a greater freedom in sentences expression, and the possibility to experiment dynamic scenarios and different roles;
Future work will regard: • a more developed implementa3on of the serious game according to a proper learning design approach;
• an improvement of the social prac3ces representa3ons; • a deep formaliza3on of the scenarios.