“包罗万象” Alexa技能套件输入不正确的意图 [英] "Catch-all" for Alexa Skills Kit input not in defined intent

查看:104
本文介绍了“包罗万象” Alexa技能套件输入不正确的意图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个Alexa应用程序,该应用程序必须能够处理问题的答案。我有一个 SkipIntent 意图,该意图具有示例性发音,可以跳过一个问题。

I am building an Alexa app that needs to be able to process answers to a question. I have an SkipIntent intent that has sample utterances to skip a question.

我想构建一个 AnswerIntent 可以接受可以是任何答案的答案,并根据正确答案进行处理。我尝试为此使用 Amazon.LITERAL 类型并带有一些示例(来自此问题:如何接受Free-form-text-as作为输入到Amazon Skill Kit? ):

I want to build an AnswerIntent that can take answers that can be anything and process them against the correct answer. I tried using an Amazon.LITERAL type for this with a few samples as such (from this question: How to accept the Free form text as input to Amazon Skill Kit?):

AnswerIntent {bottle|Answer}
AnswerIntent is it {bottle|Answer}
AnswerIntent is it a {bottle|Answer}
AnswerIntent is it an {bottle|Answer}
AnswerIntent a {bottle|Answer}
AnswerIntent an {bottle|Answer}
AnswerIntent {pillow|Answer}
AnswerIntent is it {pillow|Answer}
AnswerIntent is it a {pillow|Answer}
AnswerIntent is it an {pillow|Answer}
AnswerIntent a {pillow|Answer}
AnswerIntent an {pillow|Answer}

如果我在答案前加上是还是其他定义的前缀之一,但没有得到仅回答的意思。似乎与我的 SkipIntent 混淆了,该定义为:

This actually works if I prepend the answer with "is it" or one of the other defined prefixes, but it doesn't get the "answer only" piece. It seems to get confused with my SkipIntent which is defined as:

SkipIntent i don't know
SkipIntent don't know
SkipIntent skip
SkipIntent i don't know that
SkipIntent who knows
SkipIntent i don't know this question
SkipIntent i don't know that one
SkipIntent dunno

我正确定义 AnswerIntent ?如果没有,是否有更好的方法来捕捉无限的可能性?亚马逊似乎不喜欢LITERAL方法,所以我愿意接受更好的方法。

Am I defining the AnswerIntent correctly? If not, is there a better way to catch an infinite amount of possibilities? Amazon seems to not like the LITERAL method, so I would be open to a better way.

推荐答案

亚马逊的Alexa服务不是设计好的听写。这是开发者福音主义者的一致回应。因此,您将无法提供所需的确切客户体验:可以自行进行任何输入。

Amazon's Alexa service is not designed for dictation. This has been the consistent response from the Developer Evangelists. So you will not be able to give the exact customer experience you want: being able take any sort of input on its own.

您超出了Alexa的设计规范,即欺骗它接受一个通用插槽。

You are going beyond Alexa's design specifications by 'tricking' it into accepting a 'generic slot'. Plenty of people have done this, but it will never perform well, as you have found.

具体来说,对于您的用例来说,独自尝试使用通用插槽特别有用坏。在内部,Alexa使用交互模型来构建可能被识别的可能句子的树。然后,它获取输入的声音,并将其与树匹配。最终以最高置信度的分支是所选分支。

Specifically, for your use case, trying a generic slot on its own is particularly bad. Internally Alexa uses the interaction model to build up a tree of possible sentences that might be recognized. It then takes the input sounds, and matches them against the tree. Whichever branch ends up with the highest confidence is the branch that is selected.

添加通用插槽时,您会在树中添加一个几乎匹配任何节点的节点,它会与具有特定值的分支竞争。例如。如果Alexa在 X, Y和 之间进行选择,则通常会选择 。这就是为什么您自己的通用插槽会吞噬其他答案的原因。

When you add a generic slot, you add a node into the tree that matches almost anything, it competes with branches that mach specific values. E.g. if Alexa has the choice between "X", "Y" and "", it is usually going to pick "". This is why your a generic slot on its own is swallowing the other answers.

如果您想要一种具有高品质表现的技能,则应该寻求一种能够不要使用通用插槽。例如,您可以在问答型技能中使用多项选择。或选择具有特定答案之一的问题,例如颜色或美国。

If you want a skill that performs with a high quality, you should seek a design that does not use generic slots. You might, for example, use multiple choice in a Question-and-Answer type skill. Or pick questions that have one of a specific set of answers, like colors or US States.

如果您只是在做演示,那么请确保使用通用插槽。您可以做足够的工作来使录音看起来不错。

If you are just doing a demo, then, sure, use generic slots. You can do enough takes to get the recording to look good.

这篇关于“包罗万象” Alexa技能套件输入不正确的意图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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