Versions Compared

Key

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

Before you start: make sure your MARBEL agent is connected to your Dialogflow agent and you completed the [TBU]Your MARBEL Agent step.

Prolog and Patterns

Greeting pattern without self-identification

...

Warning

To test and hear something, you still need to do one more thing: In the dialog_init.mod2g file, add the c10 pattern name also to the agenda of the agent after start that is already in it (separate them by a comma, the agenda is a list!).

You can now [TBU]Run your Conversational Agent again to hear your agent say its first opening words.

Note that unless the corresponding c10 pattern and the textual response have also been added to the pattern.pl and responses.pl file, your code will not yet work. Also, make sure you have not already added a name for your agent; the basic greeting pattern c10 assumes that the agent has no name yet!

Finally, you will not yet be able to respond with a greeting yourself without a welcoming page (see Visuals section below). This page should display a microphone icon that you will need to start talking back to the agent.

...

Warning

When you have added a name for your agent, and the new pattern and rule for generating a self-identifying phrase, you can now [TBU]Run your Conversational Agent again to hear your agent self-identify itself.

Visuals

Welcoming page

When a user has visited the Start page and clicked on the Start button, your agent should start by greeting its user. But we would also like to show a webpage that welcomes the user and is shown while the greeting pattern c10 is active and ongoing. Additionally, the new page provides the user with the ability to start talking by clicking on the microphone icon.

As before, we need to introduce a rule for generating a webpage. The head of this rule should be page(c10, _, Html). We advise you to reuse the same overall structure for the Prolog rule as for the Start page you created in the html.pl file. Add your rule for the welcoming page also to the html.pl file.

The main requirement for this page is that it shows a microphone icon that the user can use to start talking to the agent. All you need to do for this is to create a page with a header. A second requirement is that your page should not have a button for moving on to the next page! Progress should be made by talking from now on! Ideas for this page could be to show a greeting and introduce your agent by showing its name. Next, we provide some suggestions on how you could proceed with creating the welcoming page for your agent:

...

 As a start, consider the condition that needs to succeed when this page is generated. Hint: look at the rule for the Start page and check out how the first argument of the page/3 head of this rule is reused for defining the condition for showing the page.

...

Think about the design of your welcoming page. What should the page look like? You can show text that introduces your agent somewhere, using the agentName(Name) fact to retrieve its name, for example (if you do, also take into account what should happen if the agent has no name!). You can use https://www.w3schools.com/bootstrap4/bootstrap_jumbotron.asp, https://www.w3schools.com/bootstrap4/bootstrap_alerts.asp, or other Bootstrap components to display the text. You can add other visual elements using images, or add more advanced layouts for your page. Check out the [TBU]Visual Support Guide for more on how to use these components.

...

.

Whether you followed our suggestions above or not, make sure your welcoming page looks inviting!

...