Tutorial: Building an Example Diatheke Model

Cobalt has deployed a demo where a user can interact with Diatheke in the context of exploring an image of Salzburg, Austria. This tutorial walks through a simplified version of that model with details around zooming in and out and applying filters. The files referenced in the document are available to download here.

Stories are at the core of Diatheke models. A Diatheke model is mostly composed of stories where each story is designed to accomplish a goal. When the model is first loaded, the main story is activated. Then, depending on the user inputs, other stories are executed.

Because stories are the main building blocks of the Diatheke models, knowing how to define them is the first step to building a model. This tutorial gives examples of several stories, starting with the main story, which must exist in any Diatheke model.

Contents

  • Main Story - the starting point for a model
  • Every model begins with the main story, which must be named “main.yaml”.

  • Zoom intent
  • An intent file specifies different example utterances, ways to express the user’s intention. The example utterances can also include slots for different entities, with each entity defined in a file with the same name as the slot.

  • Zoom story, command, and reply
  • Each story is defined in a yaml file under the stories folder. In the case of zoom story, we need to create a zoom_story.yaml file as shown below.

  • Conditional action example: zoom with error handling
  • The zoom example on the previous page is over-simplified. Many commands return values that the dialogue uses in its responses. Let’s extend the zoom example to let the calling application return an error message if the user zooms in or out too far.

  • Multi-turn story example: Apply filter
  • Beyond single-turn command-and-control stories, Diatheke can model complex dialogues with multiple interactions between the user and the system. Diatheke can prompt the user for more information (“slot filling”) and can respond to multiple different intents in the context of the same story.

  • Multi-turn story example: List filters
  • There may stories that require multiple dialogue turns between the user and Diatheke. For example, what if Diatheke asks “What filter do you want?” and the user doesn’t know what the options are?
    We can include other intents to allow them to ask what filters are available.