gpt4 book ai didi

Alexa intent 架构 : Random input being identified as intents

转载 作者:行者123 更新时间:2023-12-04 12:04:57 25 4
gpt4 key购买 nike

我有两个使用相同插槽类型的 intent 。但是,如果输入是随机字符串,Alexa 会自动识别其 JSON 请求中的 intent ,即使它不是话语的一部分。例如,在下面的示例中,如果用户输入是“bla bla bla”,则 GetAccountBalance被标识为没有槽值的 intent ,即使它不是提供的话语的一部分。

对这些情况进行错误检查的方法是什么,在开发 intent 模式时避免此类情况的最佳实践是什么?有没有办法创建一个可以处理所有随机输入的 intent ?

示例架构:

{
"intents": [
{
"intent": "GetAccountBalance",
"slots": [
{
"name": "AccountType",
"type": "ACCOUNT_TYPE"
}
]
},
{
"intent": "GetAccountNumber",
"slots": [
{
"name": "AccountType",
"type": "ACCOUNT_TYPE"
}
]
}
]
}

言论:
GetAccountBalance what is my account balance for {AccountType} Account
GetAccountBalance what is my balance for {AccountType} Account
GetAccountBalance what is the balance for my {AccountType} Account
GetAccountBalance what is {AccountType} account balance
GetAccountBalance what is my account balance
GetAccountBalance what is account balance
GetAccountBalance what is the account balance
GetAccountBalance what is account balance

GetAccountNumber what is my account number for {AccountType} Account
GetAccountNumber what is my number for {AccountType} Account
GetAccountNumber what is the number for my {AccountType} Account
GetAccountNumber what is {AccountType} account number
GetAccountNumber what is my account number
GetAccountNumber what is account number
GetAccountNumber what is the account number
GetAccountNumber what is account number

最佳答案

有一个 hack 可以解决这个问题:

如果没有找到任何匹配项(随机字符串),亚马逊总是以最高的话语数作为 intent 。
所以我创建了一个 intent “DidNotUnderstand”并添加尽可能多的随机话语(足够温和),如果没有找到任何匹配,alexa 将调用“DidNotUnderstand” intent 。

请引用以下链接的第一个回复:
https://forums.developer.amazon.com/questions/4856/intent-triggering-without-utterance-match.html

关于Alexa intent 架构 : Random input being identified as intents,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42931026/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com