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 12 Next »

Dialogflow

deleteFilterValue 

‘deleteFilterValue’ is useful to deal with a scenario where the user requests to remove a filter that they have already put on specifically. For example, “I wish to remove the onion filter”, “Forget about excluding broccoli”, and “Can you delete the Chinese cuisine”. Add some training phrases with all the different filters that could be deleted.

It is important that in your training phrases, you include all filter-related entities and that these entities are also given specific values and parameter names in the Action and Parameters tables. These entities are given new parameters and value names in order to identify them as a filter to be deleted. Specifically, you tag the entity in your training phrases as normal and then you change the parameter name and value name to “entitynameDel”. Your entity table under Action and Parameters should look like this when you are done. 

noMoreFilters 

The ‘noMoreFilters’ intent is used when the user does not want to add any more filters to their recipes list and wishes to see the available recipes.

Prolog and Patterns

a21noMoreFilters 

Example:

A: “What other filters would you like to add”

U: “I do not want more filters  “

A: “Ok. Here is a list of recipes” / “Sorry the list is still too long to show”

a21noMoreFilters pattern handles a user request to not add more feature requests, preferences, or requirements. When filtering the recipes, the user is not shown the list of filtered recipes until there are only 15 (or fewer) recipes. It could be, though, that the user does not wish to filter recipes further. The user would then use the NoMoreFilters intent. The agent can then allow the user to see the list with the ‘grantPicture’ response, or deny with ‘pictureNotGranted’. If the agent grants the user’s request, the pattern should end with the agent updating its memory using ‘[agent, update(['show'='true'])]’. This triggers the showing of recipes by updating the agent’s memory.

Implement the ‘a21noMoreFilters’ pattern in patterns.pl.

In responses.pl we have to make two rules, for ‘grantPicture’ and ‘pictureNotGranted’. An agent can allow the list of recipe pictures to be shown if the list is less than 100 recipes long. An agent cannot grant the recipes if the list is over 99 recipes long. The ‘recipesFiltered’ predicate provides a list of the filtered recipes. Fill in the two rules with the corresponding conditions.

Visuals

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

Test it Out

  • No labels