Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Dialogflow
Removing feature requests again
...
Recall that we used the agent intent ackFilter to implement the first move in this fragment as part of the a21featureRequest
pattern. If a user complies with the agent’s request, that would trigger another a21featureRequest
pattern. If a user does not comply but rather responds negatively, we can also view that as a disconfirmation move. We argue that we can reuse that intent to capture negative responses to the agent’s request. A user, for that matter, could also simply respond to the agent’s move by saying “No, I won’t” or something similar. We implemented this intent before, but we should extend it to now also cover the variety of user expressions a user could use to say they do not want to add anything else. So, you should add training phrases to make sure these expressions are covered too.
Prolog and Patterns
We will begin with implementing a pattern for allowing a user to express they are done, and then get back to what is still missing to implement requests to remove a filter.
...
We can base the name for the agent intent on our design choice to show more recipe pictures and call the one that grants the user’s request pictureGranted
, and the one that denies the request pictureNotGranted
. Using these labels, you can implement two versions of the a21noMoreFilters
pattern in the patterns.pl
file. And don’t forget to add responses for the agent intents pictureGranted
and pictureNotGranted
to the responses.pl
file. This will require you to define two rules each with a different condition on the number of recipes left. Recall that you can use the recipesFiltered/1
predicate to compute a list of the filtered recipes and use that to compute how many recipes are still left after filtering.
...
This completes the implementation of all the different cases for the agent’s response. The patterns for removing filters should now work!
Visuals
What you do visually for this capability is up to you.
...