Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
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.
...
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 Overview 1 page
The objective of this capability is to create a page that facilitates users in having a conversation about recipes with the agent. We will walk you through the detailed steps to illustrate how to implement the code for such a page below.
...
Note |
---|
The conversational agent at this stage is not able to handle misunderstandings or speech recognition errors. Dialogflow will return a default fallback intent (fallback) (check the intents in your Dialogflow agent) if it is not able to classify speech into one of the intents created. We have not yet introduced a pattern, however, needed for handling such a fallback intent and the agent will therefore get stuck if speech recognition fails. Dialogflow should not have too much trouble with recognizing a simple greeting phrase, however. |
...