Skip to content

Prototype of a dialogue system that deliberates on top of the social context, in which the dialogue scenarios are easy to author.

Notifications You must be signed in to change notification settings

GAIPS/socially-aware-interactions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Socially Aware Interactions: From dialogue trees to natural language dialogue systems

Tree-based dialogue training tools, such as the Dialogue Trainer Software, generally include easy-to-use authoring interfaces. Nevertheless, the following disadvantages are still present:

  • Dialogue is not self-made: players are unable to learn relevant communication skills
  • Dialogue is predetermined: agent does not need to adapt to changes in the context
  • Dialogue tree is very large: editor may have trouble managing the dialogue

On the other hand, natural language dialogue systems are flexible, allow users to write their own input, and are also able to manage errors in the conversation. However, in these systems, authoring interfaces are usually not available to create and edit scenarios, or they are simply made for a specific scenario, being difficult to generalize to other contexts.

Therefore, our main goal was to find a middle-ground between these two types of systems, focusing on the flexibility, robustness and authoring requirements of the dialogue. The agent should then adapt to the context of the dialogue by employing a simple and general deliberation mechanism, and dialogue scenarios should be simple to create and configure in an authoring tool. In order to fulfil these requirements, we created a prototype of a dialogue system based on the Cognitive Social Frames model and the theory of social practices. The dialogue system's interface and deliberation mechanism were implemented in Python and the dialogue scenarios were authored in Twine.

Agent Architecture

architecture

Application Snapshot

app snapshot

Getting Started

  1. Download or clone this repository
  2. Download and install Twine
  3. Open Twine and add the Twison add-on by adding a new format and pointing to its url
  4. Create a new story (scenario), or import to Twine the file "AnamnesisScenario.html", which is in the folder "scenarios/Twine" of the repository, editing it if you want to
  5. Play the story and a webpage will open with the story in a JSON format
  6. Copy all the text from that webpage
  7. Open the "scenarios/JSON" folder, which already contains 2 examples of JSON files
  8. Create a new JSON text file in the folder and paste the JSON text you copied earlier to that file
  9. Run the "dialogueSystem.exe" file of the "exe" folder, select the JSON file of your preference and click on the start button

Scenario Configuration in Twine

Roles

Create passage with tag "roles" – the user role is defined inside {{user}} {{/user}}, and the same logic applies for the agent role ({{agent}} {{/agent}}).

Frames

Create passage with tag "frame" and add any other context and knowledge tags you want. Connect it to another frame by writing their name between double square brackets ([[Introduction]]).

frame specific

This is an overview of the connected frames in Twine.

frame general
Resources

Create passage with a title that corresponds to the resource’s utterance. Add tags that match the tags of existing frames, since resources are connected to the frames. Add the role of the resource as a tag if it is necessary (according to the roles defined in the roles passage). Connect the resource to another, if you want, by using double square brackets. Add knowledge if it is the case - the "add to knowledge base" property is defined inside {{addKnowledge}} {{/addKnowledge}}.

This is an example of a resource passage without any role defined and not connected to any other resource passage.

resource specific

This is an example of a resource passage with a defined role (patient), connected to one other resource passage and that updates knowledge base.

resource specific knowledge base

This is an overview of the dialogue trees with one or more utterances in Twine.

Timeout

If you'd like the agent to detect that the user has not responded for a defined amount of time, create a passage with the tags "frame" and "timeout". The time, in seconds, of the timeout can be specified, within the frame, inside {{timer}} {{/timer}}. This frame is not linked to any other frame and its resources are defined just like the resources associated with the other frames.

timeout frame

Future Work

In the future, we hope to be able to improve this prototype, fulfiling the following points:

  • Manage more errors in the dialogue, besides the timeout error
  • Allow the system to create dialogues with no speaking turns specified
  • Map the user inputs to appropriate context tags, and extract relevant knowledge from them
  • Attempt to create dialogue scenarios with crowdsourced data

About

Prototype of a dialogue system that deliberates on top of the social context, in which the dialogue scenarios are easy to author.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published