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.
You can give the intent a name on the top screen and add a couple of variants in which the intent may be phrased under Training Phrases (See below).
You can think of likely phrase variants yourself to get started. But, more importantly, you may find out about which phrase variants you should add by inspecting actual conversations that your agent has with a user during testing.
Be sure to press the blue 'SAVE' button when you are done. If you have provided over five phrases, Dialogflow will train a classification model that recognizes phrases similar to the training phrases.
For a proper connection to the MARBEL agent, make sure that the exact Intent name is given as a title in the 'Actions and parameters' box. The names of the Intents and entities that you can use will also be suggested to you in the project instructions.
It is very important to also fill in the exact Intent name in the 'Actions and parameters' box! Without adding this, your MARBEL agent will not receive intents from the Dialogflow agent!
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 Intents
On the Intent page, you can select the three vertical dots in the upper right-hand corner
and then select ‘Upload Intent’.
You can choose to downloaded a .json file from your directories, upload it and save the intent.
Adding Entities to a Dialogflow Agent
Entities can be added by clicking the '+' sign next to Entities item in the left-hand menu bar of the dashboard page.
You can specify entity types (e.g.: 'recipes') and specific entity entries (e.g.: 'pasta aglio e olio').
When manually creating entities, be sure to use the synonym functionality to make sure synonyms are mapped onto the main entity entry word. This is important for the robustness of the agent, since different users may use different words to refer to the same entity.
For example:
On the right, we see the synonyms or other entries for southern-american. In the database of recipes, a recipe from South America is coded as ‘southern-american’, which is why the standard name of the entity (the name on the left) is exactly the same. This way, any of the forms to the right that are mentioned by the user will be forwarded to the MARBEL agent as ‘southern-american’, and can be aligned with the database entry.
We shall provide CSV files for some of the entities, so you do not have to manually add all entities yourself. This 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’ 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.
Making a Dialogflow Agent: medium.com, cloud.google.com.