[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-18。"],[[["\u003cp\u003eAgent training utilizes intents, training phrases, and entities as machine learning data labels, along with other agent-specific data, to build machine learning models.\u003c/p\u003e\n"],["\u003cp\u003eDraft agents can be automatically trained upon updates unless manually disabled in agent settings, whereas API updates do not trigger automatic training.\u003c/p\u003e\n"],["\u003cp\u003eAgent versions are automatically trained upon creation.\u003c/p\u003e\n"],["\u003cp\u003eThe Training Tool allows for review of actual conversation data to improve training data by adding end-user expressions to intents or the fallback intent, and you can also import prepared conversation data for analysis.\u003c/p\u003e\n"],["\u003cp\u003eThe Training Tool is best used throughout the agent development process, as well as periodically in production to ensure correct behaviour, and users should import only relevant, quality data for optimal use of the tool.\u003c/p\u003e\n"]]],[],null,["# Training\n\nWhen your agent is trained,\nDialogflow uses your training data to build machine learning models\nspecifically for your agent.\nThis training data primarily consists of intents, intent training phrases,\nand entities referenced in an agent;\nwhich are effectively used as machine learning data labels.\nHowever, agent models are built using\nparameter prompt responses,\nagent settings, and many other pieces of data associated with your agent.\n\nWhenever you change your agent,\nyou should ensure that the agent is trained before attempting to use it.\nDepending on your agent settings,\ntraining may occur automatically or manually.\n\nYou can also use the [Training Tool](#tool)\nto analyze and import actual conversation data,\nand to improve your training data.\n\nDraft agent automatic training\n------------------------------\n\nBy default,\nagent training for a\n[draft agent](/dialogflow/es/docs/agents-versions)\nis executed automatically\nevery time you update and save the agent from the console.\nPopup dialogs will display the status of this training.\n\nHowever, updating your agent with the API does not trigger automatic training.\n\nDraft agent manual training\n---------------------------\n\nYou can update agent\n[ML settings](/dialogflow/es/docs/agents-settings#ml)\nto disable automatic training for a draft agent.\n\nIf your agent has more than 780 intents,\nor if you have disabled the automatic training setting,\nyou must manually execute training.\n\nTo manually train an agent from the console,\nclick the **Train** button in the ML settings.\n\nTo manually train an agent with the API,\ncall the `train` method on the\n[Agent](/dialogflow/docs/reference/common-types#agents)\ntype.\n| **Note:** After [restore or import](https://cloud.google.com/dialogflow/es/docs/agents-settings#export), the agent is retrained, even if the automatic training is disabled.\n\nAgent version automatic training\n--------------------------------\n\nWhenever a new\n[agent version](/dialogflow/es/docs/agents-versions)\nis created, the new agent version is automatically trained.\n\nTo create a new agent version from the console,\nclick the **Publish a version** button on the Environments tab.\n\nTo create a new agent version with the API,\ncall the `create` method for the\n[Version type](/dialogflow/es/docs/reference/common-types#versions)\nto create a new agent version.\n\nTraining Tool\n-------------\n\nThe Training Tool is used to review end-users inputs sent to your agent\nand to improve your training data.\nUsing the tool, you can:\n\n- Review actual end-users inputs and the intents that are matched for each conversational turn with the current agent model.\n- Add the end-user expressions from these conversations to the training phrases of the matched intents, different intents, or fallback intents.\n- Import end-user expressions you have prepared or captured from actual conversations.\n\nThe tool uses\n[agent history](/dialogflow/docs/history)\ndata to load conversations, so\n[interaction logging](/dialogflow/docs/agents-settings#general)\nmust be enabled to use the tool.\nThe Training Tool only shows end-user expressions.\nTo view both agent and end-user conversation data,\nsee the more complete agent history.\n\nTo open the Training Tool:\n\n1. Go to the [Dialogflow ES console](https://dialogflow.cloud.google.com).\n2. Select your agent near the top of the left sidebar menu.\n3. Click **Training** in the left sidebar menu.\n\n### Conversation list\n\nWhen you open the tool, it shows the conversation list.\nThis is a list of recent conversations in reverse chronological order.\nEach row in the list provides a summary of a conversation.\nThe following table describes each of the UI elements:\n\n### Training view\n\nWhen you click a row in the conversation list,\nit opens the conversation in training view.\nThe training view shows a list of conversational turns\nand provides controls to add this data to your training data.\n| **Note:** You don't have to worry about duplicate training phrases. If you add training phrases that already exist to an intent, Dialogflow will merge them into one example.\n\nWhen you edit the displayed data or click a task button on the right,\nyou create training data update tasks that get queued for saving.\nOnce you are done creating tasks,\nclick the **Approve** button to execute all queued tasks.\nOnce approved,\nyou should [manually train your agent](#draft-manual).\n\nThe following table describes each of the UI elements:\n\n### Annotations\n\nWhen looking at a conversation in training view,\nend-user expressions show matched entities as highlighted\n[annotations](/dialogflow/docs/intents-training-phrases#annotation).\nTo add or edit an annotation:\n\n1. Click an annotation or select the words you want to annotate.\n2. Choose an existing entity from the menu.\n\n### Import conversations\n\nYou can import conversation data files\nyou have prepared or captured to the Training Tool.\nImporting conversations can be used to improve an existing agent.\nTo upload a conversation, click the **Upload** button at the top of the page.\nThen, you can analyze this data for adding to training data as described above.\n\nThe following describes the file content format, its limitations,\nand the results:\n\n- Each uploaded file results in a single conversation in the Training Tool.\n- Requests are not sent to the detect intent API, therefore, no contexts are activated and no intents are matched.\n- A single text file or a zip archive that can contain up to 10 text files.\n- One upload cannot exceed 3 MB.\n- The files should only contain end-user expressions delimited by newlines.\n- Ideally, files should only include data that is useful as training phrases.\n- The order of the end-user expressions is not important.\n\nHere is an example file: \n\n```\nI want information about my account.\nWhat is my checking account balance?\nHow do I transfer money to my savings account?\n```\n\n### Limitations\n\n- The Training Tool is only available for the `global` [region](/dialogflow/es/docs/how/region).\n- The Training Tool does not take the [ML Classification Threshold](/dialogflow/es/docs/agents-settings#ml) setting into consideration for intent matching. You may see different intents matched at runtime and in the Training tool, even if the agent model has not changed.\n- End-user inputs containing [required](/dialogflow/es/docs/intents-actions-parameters#required) parameter values may not match to the expected intents in the Training tool, while matching correctly at runtime. This may happen in the following situations:\n - There are no annotated training phrases in that intent.\n - The input significantly differs from the training phrases.\n\nBest practices\n--------------\n\n### Use the Training Tool at various stages of development\n\nUse the Training Tool at various stages of agent development,\nand refine your training data at each stage:\n\n- Before your agent is released to production, test it with a small group of users.\n- Shortly after your agent is released to production, examine if real conversations are behaving as expected.\n- Whenever significant changes are made to your agent, check that the new changes are behaving as expected.\n- Run the tool periodically for production agents, to perform regular analysis.\n\n### Import quality data\n\nThe following can often be useful sources of data:\n\n- Logs of conversations with human customer service agents.\n- Online customer support conversations (email, forums, FAQs).\n- Customer questions on social media.\n\nYou should avoid the following types of data:\n\n- Long-form, non-conversational end-user expressions.\n- End-user expressions that are not relevant to any of the intents in your agent.\n- Logs of things not said by end-users (for example, responses from customer service agents)."]]