Training

Since Dialogflow's natural language processing is based on machine learning, you can add training data that the agent learns from and uses to improve its performance.

Dialogflow's training feature provides an interface for incorporating both external and internal customer interaction logs into an agent's training phrases. You can use this feature to build a new Dialogflow agent using logs of existing customer interactions and to improve the performance of a live Dialogflow agent using its own logs.

Conversation list

The Training page shows a list of conversations. Logs for your agent's conversations automatically appear in the conversation list as customers chat with your agent. You can also upload log data captured outside of Dialogflow.

For each conversation in the list, the following information is displayed:

Field name Description
Conversation The first utterance in the conversation.
Requests The number of requests in the conversation. In the case of a conversation logged from agent interaction, the term request refers to a message directed to the agent by the user. In the case of data uploaded as a text file, each line in the file is considered a request.
No match The number of "no match" requests. This corresponds to the number of requests that cannot currently be matched to an intent.
Date The date that the conversation was logged or uploaded.
Status (optional) The status shows whether you have previously assigned requests to intents and is indicated by a green checkmark (see "when are you open" in the screenshot above).

Upload conversation logs

Click UPLOAD on the Training page to upload a file containing conversation logs and make it available in the conversation list for training.

The upload facility accepts either a single text file with one log per line or a zip archive containing up to 10 text files. A single text file, or the total unpacked size of all the text files in a zip, should not exceed 3 MB.

Since the training tool considers every line in the file a request, files should only include logs that are potentially useful as training phrases within intents. If you are using existing customer logs, you should only include utterances made by the customer. For example, if you have logs for conversations between customers and your customer service agents, you should exclude anything said by the customer service agents.

See the following table for examples of valid and invalid log lines:

Utterance Valid
I need help with a problem Yes
Customer: I need help with a problem No (should not include any text aside from the utterance)
I need help with a problem
Sure, here's the solution
No (should only include utterances made by the customer)

The UI is updated once a file is successfully uploaded and imported. You can click BACK to return to the conversation list, where the new conversation is displayed.

The training process

Clicking on a specific conversation opens the training view. This view displays a list of all the requests in the conversation, along with the date, the total number of requests, and the number of requests that could not be matched to an intent.

For each request, you can choose to perform an action in order to improve your agent. Training is done in bulk across an entire conversation, so any changes specified will not be applied until you click APPROVE.

The following actions are available for each request:

View the currently matched intent (if any)

See the currently matched intent in the Intent field below the "User says" text field.

Requests not matched to a specific intent will appear as follows:

Approve proposed actions

Clicking APPROVE implements all the actions selected for this conversation and returns you to the conversation list. If you make changes to intents, the agent begins training after you click APPROVE.

You can continue to make changes by returning to the conversation, selecting new actions, and clicking APPROVE again.

Add the request as a training phrase

Using historical training data, you can add requests from users as training phrases to new or existing intents. You can click on the request and edit the text before adding it.

The different methods for adding requests to training phrases are outlined below:

Add to the currently matched intent

  1. Click the checkmark icon check in the top right.
  2. Once the checkmark is green, click APPROVE to update the intent.

Add to a different intent

  1. Click the current intent name (or the "Click to assign" link for a no match response) to show the intent selection menu.
  2. Click the name of the intent you want to add the phrase to.
  3. Once the checkmark is green, click APPROVE to update the intent.

Add to a new intent

  1. Click the current intent name (or the "Click to assign" link for a no match response) to show the intent selection menu.

  2. Click Create new.

  3. Enter a new intent name.

  4. Once the checkmark is green, click APPROVE to update the intent.

Add to the Default Fallback Intent (Negative examples)

  1. Click the cancel icon block.
  2. Click APPROVE.

Add and edit entity annotations for the request

Requests show matched entities as highlighted words (or annotations). To add or edit an entity annotation, follow these steps:

  1. Click on an annotation or select the words you want to annotate.
  2. Choose an existing entity from the menu.

Delete the request from the training view

  1. Click the delete icon delete.
  2. Click APPROVE.