简体   繁体   English

对话流在三个交互后返回“对不起,我无能为力”消息

[英]Dialogflow returning a "Sorry I can't help" message after three interactions

This issue started this morning (21 June 2019) affecting ALL our dialogflow agents.这个问题从今天早上(2019 年 6 月 21 日)开始,影响了我们所有的对话流代理。 Previously they have been working fine, though we had observed this behaviour occasionally over the past month, but found it difficult to reproduce.以前他们一直工作得很好,虽然我们在过去的一个月里偶尔会观察到这种行为,但发现很难重现。

Now we can reliably reproduce it and it has hammered all our voice work.现在我们可以可靠地重现它,它已经影响了我们所有的语音工作。

Our webhook returns a piece of json like this to trigger an event to move the user to the next intent:我们的 webhook 返回一段这样的 json 来触发一个事件,将用户移动到下一个意图:

"followupEventInput": {
    "name": "Textbox",
    "languageCode": "en-AU"
}

The problem is that if we use events more than twice after the initial trigger, the user is just given a message "Sorry, I can't help" and the Agent is forcibly closed.问题是,如果我们在初始触发后使用事件超过两次,用户只会收到一条消息“对不起,我无法帮助”并且代理被强行关闭。

Example conversation:
"Talk to Foobar Toys"
  "Welcome to Foobar Toys. How can I help you?" (Start app)
"I'd like to know about Lego"
  "Do you want to know about Technic, or Star Wars lego?" (Invocation started)
"Technic"
  "Are you interested in sets or minifigs?" (Interaction 1)
"sets"
  "What kind of sets?" (Interaction 2)
"cars"
  "Sorry, I can't help." (Failure after interaction 2.)

This is very similar behaviour to as if we were using a default fallback intent all the time, but we aren't.这与我们一直使用默认回退意图非常相似,但我们不是。

The interactions are all intents triggered by events.交互都是由事件触发的意图。

If we DO happen to trigger a fallback intent or help text, the counter resets and we can keep going until we next hit this.如果我们碰巧触发了回退意图或帮助文本,计数器会重置,我们可以继续前进,直到我们下一次点击它。

A LOT of our workflows involve more than 2 interactions.我们的很多工作流程都涉及 2 次以上的交互。 So this is a pretty big deal.所以这是一个相当大的问题。 Any advice appreciated.任何建议表示赞赏。 I've spent a day or two trying to work out a scenario in which this doesn't happen for us with no luck at all.我花了一两天时间试图找出一个场景,在这种场景中,如果我们完全没有运气,就不会发生这种情况。

So, we've worked out what caused this, and have managed to work around it.所以,我们已经找出了导致这种情况的原因,并设法解决了这个问题。

Our Agent was composed of several intents that each had a required input parameter called "input."我们的 Agent 由几个意图组成,每个意图都有一个称为“输入”的必需输入参数。 Triggering of the intents via our webhook was done (sometimes) by use of the follow-up event.通过我们的 webhook 触发意图是通过使用后续事件(有时)完成的。 In FireBase this is achieved by using a statement like:在 FireBase 中,这是通过使用如下语句来实现的:

agent.setFollowupEvent('message');

where "message" is the name of the event that is linked to your intent.其中“消息”是与您的意图相关联的事件的名称。

It seems that by taking the workflow out of the hands of the dialogFlow core, we somehow triggered it into thinking that it wasn't managing to match any intents, even though our code was effectively telling it which intent to send the conversation to.似乎通过将工作流从 dialogFlow 核心手中夺走,我们以某种方式触发它认为它无法匹配任何意图,即使我们的代码有效地告诉它要将对话发送到哪个意图。

Our workaround for now is to have a single intent that matches on sys.any and not pass back followup events any more.我们现在的解决方法是有一个与 sys.any 匹配的单一意图,并且不再传回后续事件。

If anyone is interested, I have a very simple workflow+firebase that reproduces this issue.如果有人感兴趣,我有一个非常简单的工作流程+firebase 来重现这个问题。

Added later - Response from Google稍后添加 - 来自 Google 的回复

"it seems that the cause of the issue is the slot filling using @sys.any as an entity. Please don't use @sys.any on slot filing as to this is not a standard practice on using @sys.any." “似乎问题的原因是使用@sys.any 作为实体填充插槽。请不要在插槽归档中使用@sys.any,因为这不是使用@sys.any 的标准做法。”

Here was my setup and my hacky fix:这是我的设置和我的hacky修复:

intent1, triggered by event "eventIntent1", with parameter 'value' of type @sys.number. intent1,由事件“eventIntent1”触发,参数“value”类型为@sys.number。 Intent gets one number, stores it in the conversation context. Intent 获取一个数字,将其存储在对话上下文中。 It it doesn't have four numbers yet, it calls itself through followup("eventIntent1") to get another number.它还没有四个数字,它通过 followup("eventIntent1") 调用自己以获取另一个数字。

Desired conversation:想要的对话:

assistant: "give me a number"
user: "1"
assistant: "give me a number"
user: "2"
assistant: "give me a number"
user: "3"
assistant: "give me a number"
user: "4"
assistant: "You gave me 1 2 3 4"

Actual conversation:实际对话:

assistant: "give me a number"
user: "1"
assistant: "give me a number"
user: "2"
assistant: "give me a number"
user: "3"
assistant: "Sorry, I can't help"

Fix:使固定:

The fix was to setup another intent called "intent2" triggered by an event "eventIntent2".修复方法是设置另一个由事件“eventIntent2”触发的名为“intent2”的意图。 The slot filling for them is identical (the logic above), except intent1 calls "eventIntent2" for a followup, while "intent2" calls "eventIntent1" for a followup.它们的插槽填充是相同的(上面的逻辑),除了 intent1 调用“eventIntent2”进行后续操作,而“intent2”调用“eventIntent1”进行后续操作。 This tricks it into not having the same intent called times in a row.这会诱使它没有连续称为时间的相同意图。 It allowed me to record an unlimited number of values.它允许我记录无限数量的值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在三次回退后使用 Dialogflow 抛出自定义消息 - How to throw a custom message using Dialogflow after three times of fallback 从 zip 导入后无法将 Dialogflow 与 Google Assistant 集成 - Can't integrate Dialogflow with Google Assistant after importing from zip 在第 2 季度打开 webhook 后,Dialogflow 内联无法计数 - Dialogflow inline can't count after open webhook on q2 逻辑后从 webhook 返回 Dialogflow 参数 - Returning Dialogflow parameters from webhook after logic Dialogflow ES - 我无法创建意图(只有后备意图) - Dialogflow ES - I can't create Intent (only fallback intent) 在与 Dialogflow 的对话中存储唯一的 usersId(userStorage ERROR Can't set headers after sent to user) - store unique usersId across conversations with Dialogflow (userStorage ERROR Can't set headers after sent to user) Dialogflow 与 API 交互并基于此向用户提问 - Dialogflow interactions with API and asking the users question based on that 当我在制作后不断删除代理时,我们可以在对话流中制作多少个代理 - How many agents we can make in dialogflow,when I constatntly deleteing the agents after making 无法创建会话客户端对话流 - Can't create session client dialogflow 无法使用 dialogflow 播放 .mp3 文件 - Can't play .mp3 files with dialogflow
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM