Versions Compared

Key

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

We have taken you by the hand thus far and walked you through the code you were asked to produce step-by-step. We will still be providing useful information for you to learn more about developing conversational agents, but now we will change gears a bit and leave more for you to figure out yourself, too. Remember that you can find useful information and links on the Project Background Knowledge page.

Dialogflow

Conversational patterns set expectations about what actors participating in a conversation will do, but users often will not quite meet these expectations and make moves that do not fit into the active pattern. The conversational agent will need to be able to handle such “unexpected” moves from users. “Unexpected” here means that these moves do not fit into the currently active conversational pattern, not that such moves should not be expected from users. Two intents that we should actually expect to match with what a user could say are an appreciation intent and an intent for checking what the agent is capable of. You should add the following intents to your Dialogflow agent, making sure that you use the intent labels specified below:

...

Throughout the project, you should keep checking the validation page for issues and update the fallback intent by adding negative examples when they come to mind (e.g., when you add more training phrases for other intents).

Prolog and Patterns

Repair

When a conversational agent does not understand a user, it needs to have the conversational competence to deal with the situation. Here, we will make two important distinctions related to the type of misunderstanding. The first case is that the agent is not able to match what a user says with an intent and the Dialogflow agent matches with a fallback intent. The second case is quite different. Here the Dialogflow agent is able to make sense of what a user says and matches it with one of the intents created for that agent. The conversational agent, however, has trouble handling the intent within the conversational context as defined by the active conversational pattern. In other words, the intent does not fit into that pattern and the question is how the agent should deal with this. We provide two repair mechanisms using (somewhat special) patterns again for the agent to deal with each of these situations.

...

In Moore and Arar’s taxonomy, this classifies as a c30 pattern for a general capability check. Implement this pattern in the patterns.pl file. You should use the intent labels checkCapability and describeCapability. Define the agent’s response in the responses.pl file.

Visuals

...

Info

A similar design choice for specifying the response applies for the describeCapability as to the contextMismatch(Intent) intent, although for somewhat different reasons. As Moore and Arar, 2019, also argue, a long presentation of the agent’s capabilities in a conversational interaction does not work in practice. In other words, specifying a long text for the agent’s response is not very suitable for a conversational agent. A more conversational approach would be to refine the response and take the context where a user asks for what the agent can do into account. You thus could also consider using the text/3 predicate that allows specifying context and design responses that are different for each of these contexts when a user asks for help.

Visuals

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

Test it Out

Say random stuff like “the sky is blue” in all steps and see how your agent responds and if it freezes or if you are allowed to continue.

...

it Out

Before we added the repair patterns above, the agent got stuck if it misunderstood something and was not able to proceed with the conversation. With the changes made now, you should be able to say something random, the agent should indicate that it does not understand, and you should be able to continue with the ongoing, active pattern.

We do not provide a detailed testing script here anymore but leave it up to you to systematically test your agent. You could say random stuff like “the sky is blue” at any step during the conversational interaction and evaluate whether your agent responds and you can continue afterwards with the conversation.

Info

All done?

Proceed with Capability 5: Filter Recipes by Ingredients.