Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Adding Intents to a Dialogflow Agent

This can be done manually or by uploading a .json file that we provided.

Manually Adding Intents

...

To add an intent to the agent, when on the dashboard page of your Dialogflow Agent, click on the '+' sign next to the Intents item in the left-hand menu bar.

...

Table of Contents

There are several resources that may be useful for you to learn more about Dialogflow. First, check out Google’s documentation, for example, about Dialogflow agents, intents, and entities. You might also find it useful to inspect the following external resource about developing a Dialogflow agent: medium.com. In this project, we will (only) use the basic Natural Language Understanding (NLU) capabilities that Dialogflow provides: transcribing (speech) utterances, classifying those utterances into intents, and extracting entities from those utterances. There are a few specific requirements for making a Dialogflow agent that we use for NLU work seamlessly with the MARBEL agent that we use for dialog management. Make sure to check out the specifics below!

Creating an intent in a Dialogflow agent

You can add a new intent to your Dialogflow agent manually, using the https://dialogflow.cloud.google.com/ console, or by uploading a JSON file. For some intents, that require many examples as Training Phrases to work well, we have provided you with such files.

Check out Google’s documentation for Dialogflow with instructions on how to https://cloud.google.com/dialogflow/es/docs/intents-manage. It is important to add good https://cloud.google.com/dialogflow/es/docs/intents-training-phrases. You should think of good phrase variants yourself. But just as important, you may also find out about which phrase variants you should add by inspecting actual conversations that your agent has with

...

someone during testing. Ask your team members to conduct conversations and check out the Training https://cloud.google.com/dialogflow/es/docs/training tool afterward.

Note

Be sure to press the blue 'SAVE' button when you are done. If you have provided over five phrases, Dialogflow will

...

already start training a classification model that recognizes phrases similar to the training phrases

...

you provided.

Note

It is very important to also fill in the exact Intent correct intent name in the 'Actions and parameters' box! Without adding If you forget to add this, your MARBEL agent will not receive any intents from the your Dialogflow agent!

...

Note

Note that entity names under the Action and Parameters area should be specified in lowercase.

...

  • Also, make sure that the webhook switch is checked (see the figure below). Responses can be left untouched, as those are handled by the MARBEL agent.

...

Uploading an intent

On the Intent page where you can create a new intent, you can also select the three vertical dots in the upper right-hand corner next to the Create Intent button:

...

and then select ‘Upload Intent’.From the menu that then appears, you can select Upload Intent. You can choose to downloaded a .json JSON file from your directories, upload it, and save the intent. By hoovering over an intent, you can also select to download that intent.

Adding

...

and uploading entities to a Dialogflow

...

agent

Entities can be added by clicking the '+' sign next to Entities item selecting Entities in the left -hand sidebar menu bar of the dashboard page.in the https://dialogflow.cloud.google.com/ console. You can specify entity types (e.g.: 'recipes') and specific entity entries (e.g.: 'pasta aglio e olio')an entity type such as recipe and for each type specify entity entries such as, pasta aglio e olio, for example. Check out Google’s documentation on https://cloud.google.com/dialogflow/es/docs/entities-overview.

When manually creating entities, be sure to use the synonym functionality to make sure that multiple words or phrases that are considered equivalent (synonyms) are mapped onto the same main entity entry word, also known as the reference value. Some entity entries have multiple words or phrases that are considered equivalent, such as, for example, scallion and green onion. For these entity entries, you provide one reference value and one or more synonyms. This is important for the robustness of the agent, since different users may use different words to refer to the same entity .For exampleentry. We provide one more example to illustrate what this looks like:

...

On the right, we see the synonyms or other entries for various synonyms are listed for the entity entry reference value southern-american. In We did not pick the reference value randomly here but derived it from how recipes are represented in the database of recipes , (the recipe_database.pl file). The cuisine of a recipe from South America is coded as ‘southern'southern-american’american', which is why the standard name reference value of the entity entry (the name on the left) is exactly the samethat. This way, will ensure that any of the forms phrases to the right that are when mentioned by the user a user will be mapped onto the reference value. This value, in our example 'southern-american', will be forwarded to the MARBEL agent as ‘southern-american’, and can be aligned with the database entry.We shall provide and because it matches with the way things have been coded in the database this will facilitate matching entity entries received from the Dialogflow agent with values in the database processed by the MARBEL agent.

While we will ask you to create some entities, for your convenience, we have provided you with CSV files for some of the entities, so you do entity types which have many entity entries (such as the ingredient type, for example). You will not have to manually add all entities yourself. This of these entity types yourself!

A disclaimer is in place though: Although we have tried to do our utmost best to ensure the quality of the data we provided, we cannot give 100% guarantees that there are no issues with it and there may still be small mistakes in the CSV files (due to the automatic processing of the data after scraping it from a website).

The files that we have provided to you can be used in Dialogflow by going to the main page of entities and clicking on the three vertical dots next to the blue ‘CREATE ENTITY’ button. Click ‘Upload Entity’ Upload Entity and choose the file you wish to upload.

For additional pointers, you may inspect the following external resources:

...

Overview of Dialogflow Agents.

...

Overview of Intents.

...

Overview of Entities.

...

.