首页 文章

Alexa Intent Schema:随机输入被识别为意图

提问于
浏览
6

我有两个使用相同插槽类型的意图 . 但是,如果输入是随机字符串,则Alexa会自动识别其JSON请求中的意图,即使它不是话语的一部分 . 例如,在下面的示例中,如果用户输入为'bla bla bla',则 GetAccountBalance 被标识为没有插槽值的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

4 回答

相关问题