Training

When your agent is trained, Dialogflow uses your training data to build machine learning models specifically for your agent. Each flow of your agent has its own model. This training data primarily consists of intents, intent training phrases, and entities referenced in a flow; which are effectively used as machine learning data labels. However, agent models are built using parameter prompt responses, state handlers, agent settings, and many other pieces of data associated with your agent.

Whenever you change your agent, you should ensure that the agent is trained before attempting to use it. Depending on your agent settings, training may occur automatically or manually.

Draft flow automatic training

By default, flow training for a draft flow is executed automatically every time you update and save a flow from the console. Popup dialogs will display the status of this training.

However, updating your agent with the API does not trigger automatic training.

Draft flow manual training

You can update the flow-specific ML settings to disable automatic training for a draft flow.

To manually train a flow from the console, click the Train NLU button in the ML settings.

To manually train a flow with the API, call the train method for the Flow type.

Select a protocol and version for the Flow reference:

Protocol V3 V3beta1
REST Flow resource Flow resource
RPC Flow interface Flow interface
C# Not available Not available
Go Not available Not available
Java FlowsClient FlowsClient
Node.js FlowsClient FlowsClient
PHP Not available Not available
Python FlowsClient FlowsClient
Ruby Not available Not available

Flow version automatic training

Whenever a new flow version is created, the new flow version is automatically trained.

To create a new flow version from the console, click the Create button on the Version panel.

To create a new flow version with the API, call the create method for the Version type.

Select a protocol and version for the Version reference:

Protocol V3 V3beta1
REST Version resource Version resource
RPC Version interface Version interface
C# Not available Not available
Go Not available Not available
Java VersionsClient VersionsClient
Node.js VersionsClient VersionsClient
PHP Not available Not available
Python VersionsClient VersionsClient
Ruby Not available Not available