简体   繁体   English

在 Dialogflow 中,如何处理具有相同参考值的多个实体?

[英]In Dialogflow, How to deal with multiple entities having the same reference values?

I have 2 entities Entity A and Entity B. Entity A has a reference value called Walmart and Entity B also has a reference value called Walmart.我有 2 个实体实体 A 和实体 B。实体 A 有一个名为 Walmart 的参考值,而实体 B 也有一个名为 Walmart 的参考值。 Now when a user enters 'Show me sales for Walmart', and I want the bot to get me sales for the Walmart listed under Entity B only.现在,当用户输入“向我展示 Walmart 的销售额”时,我希望机器人仅向我提供实体 B 下列出的 Walmart 的销售额。 How can I make the bot understand that?我怎样才能让机器人明白这一点? Is there a way for the bot to return a prompt asking me which one of the 2 I want to look at?机器人有没有办法返回一个提示,询问我想看哪两个? Appreciate the help感谢帮助

(since you added all dialogflow tags it's difficult to know what version you're using, so please choose only the ones that fit your needs next time.) (由于您添加了所有对话框流标签,因此很难知道您使用的是什么版本,所以下次请只选择适合您需要的版本。)

If you're using Dialogflow-cx , which I'm comfortable with, I'd suggest you to tie the entity recognition to an intent.如果您使用的是我很满意的Dialogflow-cx ,我建议您将实体识别与意图联系起来。 This way, you control the way dialogflow matches your user's input.这样,您可以控制对话流匹配用户输入的方式。

So, in the case of a page where you ask questions create form parameters and add only the entity you're interested in, flag the "required" checkbox and provide a fulfilment which asks the user "Which is your favorite supermarket?".因此,在您提出问题的页面中,创建表单参数并仅添加您感兴趣的实体,标记“必需”复选框并提供询问用户“您最喜欢的超市是哪家?”的履行。

Otherwise, if you're dealing with free user input create an intent and annotate the training phrases only with your desired entity .否则,如果您正在处理免费的用户输入,请创建一个意图并仅使用您想要的实体注释训练短语 provide as many training phrases you can think of: this way every time that intent is matched you'll only see results for that specific entity.提供您能想到的尽可能多的训练短语:这样每次匹配意图时,您只会看到该特定实体的结果。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM