如何动态训练 api.ai/dialogflow 聊天机器人?

How to train api.ai/dialogflow chatbot dynamically?

我正在尝试生成一些 "quick reply templates",即可能根据聊天线程中以前的消息使用 Api.ai/Dialogflow.

进行回复

我在某种程度上训练了 api.ai 代理,使其仅针对某些选定的查询生成回复。现在,我想增强它以生成更多查询的回复,但手动训练代理以处理大量查询实际上是不可能的。有没有办法通过分析之前的聊天线程来动态训练 api.ai 聊天机器人,我已经存储在数据库中或使用正在进行的聊天数据。

用户是一些卖家,所以我假设他们只会谈论产品,所以每个聊天线程中的问题都会有些相似。

目前没有API训练。

如果您有代理的查询日志(通过 API 或您的网络钩子),您可以 "train" 您的代理使用这些日志来确定最常见的未答复查询查看有多少查询与默认回退意图匹配,并使用 Dialogflow 的 API 为这些查询创建新的意图和响应:https://dialogflow.com/docs/reference/agent/intents#post_intents

看起来现在可以通过 API 进行训练:https://dialogflow.com/docs/training,以及上传带有训练列表的文本文件。

You can add more Training Phrases using the POST and PUT API methods for the /intents endpoint.

Any changes made via the API to alter the agent's behavior, initiate the training in the same way when you save an intent. This trains the agent with the changes delievered through the API.