Alexa 技能意图不使用我插槽中的单词列表

Alexa skill intent does not use the list of words in my slot

假设我有一个具有以下意图的 alexa 技能:

{
"intents": [
  {
      "intent": "aaa",
      "slots": []
  },
  {
      "intent": "bbb",
      "slots": [
        {
          "name": "City",
          "type": "CITIES"
        }
      ]
  },
  {
      "intent": "ccc",
      "slots": [
        {
          "name": "City",
          "type": "CITIES"
        }
      ]
  },
  {
      "intent": "ddd",
      "slots": [
        {
          "name": "City",
          "type": "CITIES"
        },
        { "name": "Name",
          "type": "USER_NAMES"}
      ]
  },
 ]
}

假设我使用这个简单的话语:

ddd tell me if user {Name} lives in the {City}.

通过这样做,我假设在我的 alexa 技能中,只要我的 Intent 正在调用,就会在我的自定义插槽和插槽城市中的插槽名称中提供 Names 之一城市 在我的自定义栏中。

但是,结果是我收到了我没有在自定义广告位中提供的自由文本。自由文本,如果你说的话听起来像我说的,但意思不同。

我不太确定是我做错了什么还是设计如此。

是的,这很正常,也是一个常见的混淆来源:您为自定义槽提供的单词列表仅供参考,而不是最终集。

由于这是一个混乱的根源,他们发布了一篇关于它的博客post:
Why a Custom Slot is the Literal Solution

另外,请注意,您可以使用和建造城市的 built-in 插槽类型,请参见此处:
https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/slot-type-reference