Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Dialogflow

Extend your addFilter intent to include phrases and entities for excluding an ingredient. Example: “recipe without cucumber”.

Your Parameter table should be extended as follows:

Prolog and Patterns

In recipe_selection.pl add the following applyFilter functions

Predicate to filter recipes on the exclusion of a specific ingredient 

applyFilter('excludeingredient', Ingredient, RecipeIDsIn, RecipeIDsOut) :-

  • There is a predicate in ingredient_hierarchies.pl which one could consider useful

Predicate to filter recipes on the exclusion of a specific ingredient type (for example: ‘beef’)

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)

Visuals

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

Test it Out

Try to filter by excluding an ingredient check the a50recipeConfirm page to ensure that the ingredient is not present when you select your recipe.

Extend

Extend your agent to be able to exclude a cuisine or a dietary restriction. Your addFilter intent Parameter table should be extended as follows:

Test it Out

Test your agent on its ability to exclude a cuisine and a dietary restriction.

  • No labels