Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel2
outlinefalse
typelist
printablefalse

Prolog and Patterns

This section is about implementing the dialog management capabilities of the conversational agent but also about implementing the domain logic that the agent needs to be able to perform its task. As our conversational agent is a task-based agent for recipe recommendation, the conversational competence of our agent focuses on patterns and responses for recipe recommendation. The logic that we need to implement concerns the capabilities our agent needs to reason about user requests about recipes that are available in the agent’s database. We will first focus on adding some conversational capabilities for our agent to respond to a user request to provide a (random) recipe. As before, the approach to dialog management that we use here will require the definition of a pattern and the specification of a (textual) response to the user request. When we have completed that part, we will continue with the part focusing on implementing the reasoning capabilities for extracting such a recipe from the database in Prolog. This will require the definition of several rules for extracting a suitable recipe from the agent’s recipe database.

...

Warning

To test the pattern you just added, as before, you still need to do one more thing: In the dialog_init.mod2g file, this time add the a50recipeSelect pattern also to the agenda of the agent after c10 that is already in it.

You can now [TBU]Run your Conversational Agent again to hear your agent ask you for your recipe preferences.

Note that your team must have also added the recipe recommendation page (but not the recipe confirmation page; see Visuals section below) to enable you to respond to the agent’s inquiry. This page is needed to display a microphone icon that you will need to respond to the agent.

...

This clause specifies that if there are no filters to apply (i.e., the filter list is empty), the output of this filtering of a list of RecipeIDs thus remains unchanged and is that same list of recipe identifiers RecipeIDs.

Visuals

Recipe recommendation page

...

Warning

If your team has implemented the Dialogflow intents and patterns for this capability, you can already test the page you just implemented for the a50recipeSelect pattern. You don’t need the extraction logic for retrieving a recipe from the database for this.

So try and [TBU]Run your Conversational Agent again to see the page you just created. Also, check out the MARBEL agent’s state using the introspector. You should see that the top-level pattern that is at the front of the session is a50recipeConfirm after you tell your agent to just show a recipe.

...

If you have not yet done this, add the a50recipeSelect pattern ID to the agent's agenda in the dialog_init.mod2g file. When you finished implementing this capability and you [TBU]Run your Conversational Agent again, you should be able to conduct the following conversational interaction and go through the following dialog moves:

...