我有两个使用相同插槽类型的意图。但是,如果输入是随机字符串,Alexa 会自动识别其 JSON 请求中的意图,即使它不是话语的一部分。例如,在下面的示例中,如果用户输入是“bla bla bla”,GetAccountBalance
则将其标识为没有槽值的意图,即使它不是提供的话语的一部分。
对这些情况进行错误检查的方法是什么?在开发意图模式时避免此类情况的最佳实践是什么?有没有办法创建一个可以处理所有随机输入的意图?
示例架构:
{
"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