Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Info

The information provided here should be sufficient for you to complete the project. For those of you who are interested and want to learn more about conversational patterns and the related coding scheme that we use here (e.g. C4, etc.), see: Moore, R. J., Arar, R. (2019), Conversational UX Design: A Practitioner's Guide to the Natural Conversation Framework. ACM.

Team Contribution

During this week, as a complete team you will select three recipes for the conversational agent from recipes.pl, to work out further in pairs for recipe selection, visual support and recipe instruction. In addition, you will set up the initial version of the cooking assistant, by creating a Dialogflow agent (See here).

You should organize your team and decide who will work on the separate subtasks of Recipe Selection, Visual Support, and Recipe Instruction. In this week, the Recipe Selection team will focus on the start of the conversation, enabling the assistant to greet and to have the user select one of the three recipes, while the Recipe Instruction team will focus on the subsequent instruction of the three recipes. The Visual Support team will incorporate visuals to enrich the conversation. More details about the separate tasks of the three pairs are given below.

Recipe Selection

The tasks for the Recipe Selection team in week 1 concern the steps to allow the user to select a certain recipe from the knowledge base recipes.pl. The recipes used for this course are one-pot recipes that can be made in a linear, step-by-step fashion that you can find on Tasty. Although not yet the focus for this week, you can get some ideas on how to implement the recipe selection task here in the Cooking Assistant space.

Opening the conversation by greeting

  • The agent should open the conversation with a greeting, and by sharing its name (self-identify). To achieve this, add the corresponding C1 opening patterns in the patterns.pl file and choose a name for your chatbot (insert the an agentName/1 fact into the agent’s belief base in the init module).

  • Check out the patterns.pl file as it contains additional instruction details. An opening pattern should be selected when the session history is still empty. Make sure that the agent self-identifies by the corresponding pattern only when an agentName/1 has been instantiated.

  • You should also introduce a greeting intent in your Dialogflow agent to allow the user to respond to the agent's greeting. Click here for instructions on how to create an intent in your Dialogflow Agent.

Enabling recipe selection

  • The initial version of the GOAL agent will immediately start instructing a pasta recipe, while it should only start instructing a recipe after a user request. In the coming weeks you will enable the user to choose for a recipe by specifying particular recipe features. For now, we will assume that the user knows about the different recipes to pick from, and directly mentions the name of a recipe of choice. You may also for now have the agent suggest particular recipes to the user, upon request or as part of the greeting sequence.

  • The first thing to do is to make sure the agent is able to recognize recipe names. To recognize which recipe the user is talking about, in your Dialogflow agent create an entity recipe and add the (shorthand) names of the recipes from recipes.pl (possibly with different variations of the recipe names). Also, add an intent recipeRequest to your Dialogflow agent and integrate these recipe names as entities.

  • Now add a pattern a50recipeName to the patterns.pl file of your GOAL agent. Again, additional instructions are given in the comments of the file. As a final step, add the pattern to the agent's agenda. Make sure the agent's memory is initially empty, and check if the pattern is performed by testing your agent.

Choose Recipe Features

  • A recipe can have multiple features, like their name, ingredients, taste, country of origin, and cooking techniques. Your task here is to think of the three features you want to use to select a recipe (to be incorporated in week 2 and 3).

  • The best way to do this is to do role-playing, where one person is the cooking assistant, and the other person is the user. The user will inquire into the recipes to choose from the 60 available ones, by asking for characteristics (like recipes that are the main dish or contain fish). Note that it does not necessarily have to result in one of the three recipes that were chosen to work out further. You may check the Cooking Assistant space on confluence for an elaboration of possible recipe features and how they are used in traditional websites to facilitate recipe selection.

  • Repeat these role-playing conversations a couple of times, and document well how the conversation was conducted. This will not only give inspiration for the recipe features to include in your project, but may also reveal some typical conversation patterns to be used in the design of the agent (in patterns.pl) in the subsequent weeks.

Recipe Instruction

This section enlists the tasks to be completed by the Recipe Instruction team. The main focus is to work with instructions related to a selected recipe.

Enable Instructions of Recipes

As can be seen in the a30recipeStep pattern in patterns.pl, the agent is triggered by the user intent recipeContinuer. You need to implement such an intent in your Dialogflow agent to make this work. See this page for more information.

Enable End of Recipe

The initial version of the cooking assistant does not indicate that the final step of a recipe has been reached. It does already have a finalStep/3 predicate that is used as a marker for the final step. Modify the text generated for the finalStep intent in the text.pl file using the built-in string_concat/3 predicate to indicate to the user that this is the last step of the recipe.

Enable Closing of Conversation

The agent should close the conversation with a farewell or a last topic check. To this end, add corresponding C4 patterns in the patterns.pl file. A closing pattern should be selected when all patterns in the agenda have been performed. Make sure that the farewell pattern only is performed when the lastTopicCheck/0 behavioral parameter is not set.

Visual Support

The assignment related to visual support is about how visuals can provide support for choosing a recipe or improving understanding of recipe instruction.

Visuals to display chosen recipe

You should design the visuals with respect to the recipe name and the instructions. This should enrich the information communicated to the user through text and images displayed on the screen.

A first implementation is to display the name and an image related to the chosen three recipes, using HTML. In the initial GOAL code, the pasta recipe is displayed as an image in the initialization of the agent (see dialog_init.mod2g), whenever the agent says something (see dialog_generation.mod2g) and whenever the agent is waiting for the user to say something (see dialog_update.mod2g). This is obviously not a very useful way to do this. Make the PastaAglioPage rule in html.pl more generic by displaying the recipe of choice:

  • Find images for the recipes that you have chosen to work out further.

  • Define img cards as was done for PastaAglio.

  • Define a rule by which the page is rendered based on the currently chosen recipe.

  • For recipes for which you have not added an image, you may display the name of the recipe.

  • Make sure that the statements in dialog_generation.mod2g, dialog_init.mod2g and dialog_update.mod2g are updated as well, so that they will not always render the PastaAglio image.

Week - 1 Deliverable

...

Assigning Roles Within Your Team

At the start of the course, you are expected to have formed a team of 6.One of the first things to think about as a team is how to divide the three main tasks or roles amongst your team members:

  1. Dialogflow and Filters (2 team members);

  2. Visual Support (2 team members); and

  3. Patterns and Responses (2 team members).

The two team members with a similar role should work together in pairs. You can successfully do pair programming in person or remotely. As you will all need to work on one and the same agent, however, it will also be essential for the three pair programming subteams to communicate well with each other to make sure the three programming tasks are adequately integrated and work well together. Another task that you will have as a team that will be essential to develop an effective and robust agent is to continuously evaluate and test your bot once it is up and running (even if it is still only minimally functioning!). For this, make sure you also read the Agent testing page.

At the end of this project, you and your team should have a fully functioning conversational agent that is able to assist users with selecting a recipe they would like to cook!

...

This agent will be composed of MARBEL modules and Prolog files which you can develop and edit in Eclipse and which will interact with a Dialogflow agent that you need to create and further develop. As a start, we will use a large recipe database that the agent can use to suggest recipes to users. The user should be able to tell the agent what they would like, and the agent should try to find a matching recipe (of course, assuming that one is available in the database).

To help you decide which team member fits best to which role, the three roles are described briefly below.

Role 1: Dialogflow and Filters (D&F)

Do you want to get to know a very cool Google Cloud tool, and like to optimize the agent’s understanding of what the user says? In the introductory part of the course, you should have learned a bit about Dialogflow. If that sounded super cool to you, then this could be the section for you! You will create Intents, Entities, and Prolog Filter Rules in order to provide the agent with the vocabulary comprehension and filtering abilities it needs to converse about recipes.

For more information, go to the Dialogflow and Filters Section:

...

Role 2: Visual Support (VS)

Do you want to get creative? Your agent will not only have a conversational component, but a visual one. The program uses dynamic webpages to provide the user with visual support in their conversation. This not only includes subtitles to the conversation, but also information in support of what is talked about at any moment - such as the recipes that fit the preferences voiced by the user. If you are ready to break out a bit of HTML and Prolog, you can create cool pages through rules. The Visual Support team will incorporate visuals to enrich the conversation.

For more information, go to the Visual Support Section:

...

Role 3: Patterns and Responses (P&R)

Do you like to think in more detail about the anatomy of a conversation? Then this role could be of interest to you. The patterns and responses section focuses on the conversation part of the conversational agent. Your bot will not be the most robust it can only handle some specific tasks. Thus, we create patterns of what we think conversations in the agent’s intended domain will look like so it knows what to expect and how to respond. You will encode these patterns in Prolog and add responses for every situation.

For more information go to the Pattern and Responses Section:

...

Setting up the Tools You Need

Before you actually install the tools that you need for this project, first have a brief look at this page to get a quick overview of what you will use for developing your agent:

...

Now you have some idea of what software tools you will be using, get started by following the instructions on this page for setting up the tools you will need:

...

Getting up to Speed: the Background Knowledge You Need

Before beginning your project, we would like you all to familiarize yourself with some important background knowledge about Git and Dialogflow. You will find you will need this to successfully navigate this project, and it will help you to better understand what some of the tools and one of the key components of the agent are all about. The basic stuff that we think you really need to know can be found here:

...

Note

Note that to test your knowledge of these subjects, there are Canvas quizzes that must be completed.

Info

The information provided here should be sufficient for you to complete the project. For those of you who are interested and want to learn more about conversational patterns and the related coding scheme that we use here (e.g. C4, etc.), see: Moore, R. J., Arar, R. (2019), Conversational UX Design: A Practitioner's Guide to the Natural Conversation Framework. ACM.