Versions Compared

Key

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

Dialogflow

Extend your addFilter intent and add training phrases and entities for excluding an ingredient (type). For example, your Dialogflow agent should be able to make sense of the phrase “recipe without cucumber”. To make sure that the MARBEL agent will be able to handle these ingredients differently from the ones a user wants to include, you should create new parameter names that suggest the ingredient (type) should be excluded instead of included. The table in the Action and parameters section should be extended as follows:

...

As a next step, in a similar vein, extend your agent such that it is able to exclude a cuisine or a dietary restriction (a recipe should not be Japanese or vegan). The table in the Action and parameters section for your addFilter intent should be extended as follows:

...

Prolog and Patterns

In your recipe_selection.pl file, add the following rules for applying the corresponding filters to the new entities we introduced above. You should define rules for the following clauses:

  • applyFilter('excludeingredient', Ingredient, RecipeIDsIn, RecipeIDsOut): There is a predicate in the ingredient_hierarchies.pl file which might be useful.

  • applyFilter('excludeingredienttype', Ingredient, RecipeIDsIn, RecipeIDsOut): The body of this rule is similar to the ‘exclude ingredient’ rule (the difference between ingredient and ingredient type is catered for in ingredient_hierarchy.pl).

  • applyFilter('excludedietaryrestriction', Restriction, RecipeIDsIn, RecipeIDsOut)

  • applyFilter('excludecuisine', Cuisine, RecipeIDsIn, RecipeIDsOut)

Visuals

Nothing we ask you to do here for this capability. It’s up to you.

...

Info

All done?

Proceed with https://socialrobotics.atlassian.net/wiki/spaces/PM2/pages/2216001572/BuildingDesigning+and+Developing+Your+Agent#Agent-Capability-8%3A9%3A-Confirm-the-Chosen-Recipe