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

Dialogflow

Confirmation, Disconfirmation, Farewell Intents

Add the following intents, following the same procedure as you did for the ‘greeting’ intent. Use the intent names as specified below:

  1. confirmation

    1. If a user wants to agree or say ‘yes’.

  2. no

    1. If a user wants to disagree or say ‘no’.

  3. farewell

    1. If a user wants to say 'goodbye'.

Prolog and Patterns

a50recipeConfirm: Confirming a Recipe in patterns.pl

After the user selects a recipe, the agent should confirm the user’s choice. We foresee two potential situations for this conversation, which can be accommodated by making two a50recipeConfirm patterns. After the agent uses ‘recipeCheck’ to ask if the user can look over the recipe information to decide if they want to cook that recipe, the user could confirm (1), or deny (2).

In patterns.pl, make the a50recipeConfirm patterns for the two scenarios mentioned above. Look at Dialogflow for the appropriate Intent identification naming. If the user says it does not want to choose that recipe, we need to go back to a50recipeSelect. How would one do this?

In responses.pl fill in ‘text(recipeCheck, “”)’ response.

c43: Farewell in patterns.pl

Make a pattern that encapsulates the following conversation called c43.

% Pattern C4.3: Closing Farewell (Agent)
% Example:
% A: goodbye
% U: bye
% Instruction:
% 1. Introduce an intent ‘farewell' for saying goodbye by adding this intent to your Dialogflow
% agent (for user recognition) and the response.pl file (for agent text generation).
% 2. Add a pattern here where the agent initiates (i.e. starts) saying goodbye and then the user is
% allowed to say goodbye.
% 3. Add the c43 pattern you introduced to the agent’s agenda.

Visuals

Add a closing page at the end of the program to bid farewell and thank the user.

%%% Thank you page at the end.
page(c43, _, Html) :-

Extend

Introduce a last topic check to your farewell pattern to see if the user wants anything else or wishes to find another recipe. If they do restart the entire conversation. Note: this can be done using [agent, restart] which resets the agent agenda to the initial agenda at the start of session.

Test it Out

Add c43 to the agent agenda in the dialog_init file.

Run the agent all the way through from greeting to closing.

  • No labels