Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Dialogflow
Tip |
---|
Before you start: make sure your MARBEL agent is connected to your Dialogflow agent and you completed the Getting Your Conversational Agent Up and Running step. |
Info |
---|
Read more about creating intents and entities before you start on the 2025 Dialogflow: Creating Intents and Entities page. |
Creating a greeting intent
You will need to create intents for your Dialogflow agent. The first intent we want to create is a greeting intent. When you inspect your Dialogflow agent’s intents, you will see there already is an intent called Default Welcome Intent. As we want you to create your own greeting (or welcoming) intent for your agent, you should remove this intent first. Before you do so, you can still check out the Training Phrases for this intent which you could reuse for creating your own greeting intent.
Delete the Default Welcome Intent in your Dialogflow agent.
Create a new intent called greeting.
Add Training Phrases: Add several expressions (at least 10) as examples of how a user might greet your agent. Be thorough and try to cover as many phrases as you can come up with. For inspiration, you can do a Google search for greeting phrases. You may find, for example, useful phrases here: 20 Greetings in English. You can also ask ChatGPT to generate example phrases.
Under Action and parameters make sure the box above the table is filled in with the name of your intent as shown in the image below.
...
Note |
---|
Don’t forget to press SAVE! |
Warning |
---|
Test that your greeting intent is working by using the microphone button in the test console on the Dialogflow console page. Try various phrases also using the test console and check whether what you say is recognized as a greeting intentsure your MARBEL agent is connected to your Dialogflow agent and you completed the Getting Your Conversational Agent Up and Running 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 You can now 2025 Run your Conversational Agent again to hear your agent say its first opening words. Note that unless the corresponding 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 2025 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 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 2025 Visual Support Guide for more on how to use these components.As before, try to organize the structure of your page into several segments or rows and organize the code for generating HTML in your rule to reflect this same structure. Then piece together the various parts of the page as you have seen before (if you have more than one part) and, finally, as a last step, use the
html/4
predicate to generate the content for the body of your HTML webpage.
...