首页 文章

Alexa技能没有发送正确的意图

提问于
浏览
3

我正在编写一个Alexa技能的以下设置:

Intent Schema

{
  "intents": [
    {
      "intent": "AddToGroceriesIntent",
      "slots": [
        {
          "name": "GroceriesItems",
          "type": "GROCERIES_ITEMS"
        }
      ]
    },
    {
      "intent": "GetGroceriesIntent"
    },
    {
      "intent": "ClearGroceriesIntent"
    },
    {
      "intent": "AMAZON.HelpIntent"
    },
    {
      "intent": "AMAZON.StopIntent"
    },
    {
      "intent": "AMAZON.CancelIntent"
    }
  ]
}

Sample Utterances

AddToGroceriesIntent to add {GroceriesItems}
AddToGroceriesIntent to add {GroceriesItems} to shopping list
AddToGroceriesIntent to add {GroceriesItems} to the shopping list
AddToGroceriesIntent to add {GroceriesItems} to the list
GetGroceriesIntent list
GetGroceriesIntent shopping list
GetGroceriesIntent for the shopping list
GetGroceriesIntent for the list
GetGroceriesIntent what's on my shopping list
GetGroceriesIntent what's on the shopping list
GetGroceriesIntent what's on the list
GetGroceriesIntent what's on my list
GetGroceriesIntent what is on my shopping list
GetGroceriesIntent what is on the shopping list
GetGroceriesIntent what is on the list
GetGroceriesIntent what is on my list
ClearGroceriesIntent to clear my shopping list
ClearGroceriesIntent to clear my list
ClearGroceriesIntent to clear the shopping list
ClearGroceriesIntent to clear the list
ClearGroceriesIntent to empty my shopping list
ClearGroceriesIntent to empty my list
ClearGroceriesIntent to empty the shopping list
ClearGroceriesIntent to empty the list
ClearGroceriesIntent to delete my shopping list
ClearGroceriesIntent to delete my list
ClearGroceriesIntent to delete the shopping list
ClearGroceriesIntent to delete the list

当Alexa听到时:

alexa要求我的应用程序清除我的购物清单

正如预期的那样,发送了正确的 ClearGroceriesIntent . 然而,当Alexa听到时:

alexa要求我的应用程序清除购物清单

而是发送 GetGroceriesIntent .

服务模拟器无法复制此问题 - 它可以正常工作 . 只有在演讲过程中,它才会变得混乱,尽管(根据历史记录)Alexa听到的内容与我在测试表中输入的内容完全相同 .

(所有AddToGroceriesIntent和GetGroceriesIntent话语都按预期工作)

1 回答

  • 3

    一个可能有帮助的建议是更改你的样本话语以删除连接词 - 在你的情况下'to'和'for'不应该在样本话语中,参考'Invoking a Skill with a Specific Request (Intent)'下的these docs . 我不确定这是否能解决问题,但无论如何都要好 . 如果问题仍然存在,您可能会遇到一个情况,该情况映射到this discussion,关于NLP如何总是返回您的意图 - 即使它没有理解 .

相关问题