Dialogflow-在捕获所需参数(实体)时触发了其他意图 [英] Dialogflow - Triggered other intent while capturing required parameters(Entity)

查看:89
本文介绍了Dialogflow-在捕获所需参数(实体)时触发了其他意图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了2个意图。



意图1:


训练阶段= 1)天空为蓝色
输入上下文=空

输出上下文=空


意图2:


培训阶段= 1)引发事件(等)
所需参数=
1)参数A(实体;值=橙色,西瓜,芒果)
输入上下文=

输出上下文= RaiseIncident


模拟步骤:

1.引发事件中的用户键。

2.触发意图2,并提示输入参数A。

3.天空中的用户键为蓝色< br>
4. Dialogflow停止捕获param-A并返回意图1中的响应。



这是我的问题:



有没有办法继续捕获param-A,直到输入正确(橙色,水rmelon,mango)输入,而不是触发其他意图?还是这是Dialogflow的标准行为?

解决方案

这是标准行为,并且存在的原因很充分。 / p>

假设您具有描述事件的意图意图,并且必需的参数用于事件类型。因此,如果未提供,则会提示:事件类型是什么?

  U:打开事件
B :事件类型是什么?

如果用户不知道可能的事件类型是什么,该怎么办?也许您会给他们一个意图,让他们说帮助或那里有什么类型?或同等学历。但是,如果它仅接受有效的事件类型,那么它将继续拒绝帮助请求。因此,在您的情况下,对话听起来像是

  U:打开事件
B:事件类型是什么?
U:绿色
B:事件类型是什么?
U:帮助
B:事件类型是什么?

但是由于您可以创建帮助意图,因此您可以提供该信息,并且他们可以-p触发引发事件的意图。

  U:打开事件
B:事件类型是什么?
U:帮助
B:您可以打开芒果或苹果事件类型。你想干什么?
U:引发芒果事件

虽然Dialogflow中所需的参数看起来不错,在许多情况下,它的效果并不理想。最好将其设置为可选参数,以便在他们事先告诉您时将其捕获,但是如果缺少所需的值-提示输入并设置上下文,以便在录制时提示您输入某些内容。然后,您就可以添加上下文相关的帮助或后备处理。


I've created 2 intents.

Intent 1:

Training phase = 1) the sky is blue
Input context = empty
Output context = empty

Intent 2:

Training phase = 1) raise an incident (and etc)
Required param = 1) param-A (entity;value=orange,watermelon,mango)
Input context = empty
Output context = "RaiseIncident"

Steps to simulate:
1. User key in "raise an incident".
2. Intent 2 will be triggered and prompt for the param-A.
3. User key in the sky is blue
4. Dialogflow stop capturing the param-A and return the response in intent 1.

Here is my questions:

Is there any way to continue to capture the param-A until the correct input(orange, watermelon, mango) is entered instead triggering other intent? Or is this the standard behavior of Dialogflow?

解决方案

This is the standard behavior, and is there for a very good reason.

Let's say you have the "raise an incident" Intent the way you describe it, and the required parameter is for incident type. So if not provided, it prompts: "What is the incident type?"

U: Open an incident
B: What is the incident type?

What do you do if the user doesn't know what the possible incident types are? Perhaps you'll give them an Intent where they can say "Help" or "What types are there?" or the equivalent. But if it only accepts valid incident types, then it will keep rejecting the requests for help. So under your scenario, the conversation might sound like

U: Open an incident
B: What is the incident type?
U: Green
B: What is the incident type?
U: Help
B: What is the incident type?

But since you can create a "Help" Intent, then you can provide that information and they can re-trigger the Intent to raise the incident.

U: Open an incident
B: What is the incident type?
U: Help
B: You can open mango or apple incident types. What would you like to do?
U: Open a mango incident

While required parameters in Dialogflow seem like a good thing, it doesn't really work well in a number of cases. Better would be to make it an optional parameter, so you capture it if they tell it to you up front, but if values you need are missing - prompt for them and set the Context so you're recording you're prompting for something. Then you'll be able to add Context-sensitive help or fallback handling.

这篇关于Dialogflow-在捕获所需参数(实体)时触发了其他意图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆