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

skb*_*hmn 7 alexa alexa-skill alexa-skills-kit alexa-voice-service

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

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

示例架构:

{
  "intents": [
    {
      "intent": "GetAccountBalance",
      "slots": [
        {
          "name": "AccountType",
          "type": "ACCOUNT_TYPE"
        }
      ]
    },
    {
      "intent": "GetAccountNumber",
      "slots": [
        {
          "name": "AccountType",
          "type": "ACCOUNT_TYPE"
        }
      ]
    }
  ]
}
Run Code Online (Sandbox Code Playgroud)

话语:

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
Run Code Online (Sandbox Code Playgroud)

dd6*_*619 1

根据文档

AMAZON.FallbackIntent当用户的语音输入与技能中的任何其他意图不匹配时,将触发(仅适用于英语(美国))。AMAZON.FallbackIntent与自动生成的域外模型相匹配。

代码片段:

'AMAZON.FallbackIntent': function (intent, session, response) {
    response.ask("Optimus Prime didn't get that one....","");
}
Run Code Online (Sandbox Code Playgroud)