Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Patterns are a simplified representation of how you think a certain conversation will go, a conversation pattern. The patterns are encoded with a Prolog predicate pattern‘pattern/1 : pattern([Insert Pattern Here]). Agent responses are encoded using the predicate text‘text/2 : text(ResponseName, “Response Text”)

Since your bot agent is very specialized specialized in conducting conversations aimed at cookin recipe selection, there is a limited number of conversation patterns it could encounter and you need to account for those conversational elements.  An . Nonetheless, an important thing to remember is that a conversation could go multiple ways and you need to account for all of those in different versions of our your patterns. 

I We shall walk you through the first pattern and responses. There are sections specified in the patterns.pl and responses.pl files where you should place your patterns and responses. 

...

For this section, you will have to collaborate closely with your Dialogflow and Filter groupmates. Patterns are made up of agent responses and user intents. These user intents are defined by the Dialogflow Intents that your groupmates create. Your naming conventions must match. If you do not know what an intent is, it may be helpful to look into the Dialogflow Intent. You could also have to look for information in the recipe database. 

...

To make a pattern you need to use the Prolog predicate pattern‘pattern(_). pattern This predicate only takes one argument so that means for a conversation with multiple parts we need to use a list. , which should take the form of a prolog list.

We shall start by considering how a greeting would could go. In this greeting pattern, you should assume the bot does not know its name or has none.  ExampleWhen the agent does not introduce itself, the most common greeting pattern would look as follows:

Example:

A: hello

U: hi

In this example conversation, we see A(Agent) greets the user and U(User) greets as well. The first thing in our list within our pattern predicate is always the pattern identification code. In the case of greeting, this is c10. When coding a conversation element you create After this identification code, the dialogue moves in the pattern are specified consecutively . Such a move is represented as a two-element list, where the first element is the person speaking ('agent' or user‘user’) and the second element is the agent response label or the user’s intent (which should share a name with an intent on Dialogflow, be sure to communicate with your groupmates). Thus for this greeting, we reach the following rule head:

...

pattern([c10, [agent, greeting], [user, greeting]])

As I mentioned before, this greeting should occur if the bot agent does not know its name. If the bot knows its name it should introduce itself.

Thus the complete rule is should specify this condition, which could be done as follows:

pattern([c10, [agent, greeting], [user, greeting]]) :- not(agentName(_)).

...

This pattern will be quite similar to the one above but should include the predicate ​​selfIdentification​​'selfIdentification'. Also, be sure to note to self-identify note that the agent must have a name in order to self-identify

c10 responses.pl

In responses.pl you will see the fact text(greeting, ""). Fill in the “” with a response you want your agent to give as a greeting 

...

This rule should produce a response that is returned as Txt. It , and should include the robot's name. 

...

Your user wants to know what your bot does. Create a pattern for this. 

% Example:

% U: what can you do?

% A: At the moment I can …. 

you You should use the intents/predicates 'checkCapability' (for the user) and 'describeCapability' (for the agent).

In responses.pl find text(describeCapability, ""). and fill in the atom with an appropriate response.

c40 Closing 

This is the final pattern that happens when your bot’s program is completecloses the conversation between the user and agent, a farewell. In this pattern, our agent should do the ‘sessionCloser’ and say ‘farewell’. (or another phrasing of goodbye that fits to the agent persona your team is designing).

In responses.pl, fill in a final remark from your agent about your program in the session closer and add a farewell. 

...