Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alexa intent slot AMAZON.LITERAL causes failed build

I'm trying to use the AMAZON.LITERAL slot type in my Alexa skill, but when I try building, I see this error:

Build Failed
Slot name "{What}" is used in a sample utterance but not defined in the intent schema. Error code: UndefinedSlotName - Thursday, Apr 12, 2018, 2:08 PM

The slot is named What, and I'm 100% sure it is defined. It builds successfully if I change the slot type to anything except AMAZON.LITERAL.

Here is my entire model:

{
    "interactionModel": {
        "languageModel": {
            "invocationName": "chores",
            "intents": [
                {
                    "name": "AMAZON.CancelIntent",
                    "samples": []
                },
                {
                    "name": "AMAZON.HelpIntent",
                    "samples": []
                },
                {
                    "name": "AMAZON.StopIntent",
                    "samples": []
                },
                {
                    "name": "Remember",
                    "slots": [
                        {
                            "name": "Who",
                            "type": "AMAZON.Person"
                        },
                        {
                            "name": "When",
                            "type": "AMAZON.DATE"
                        },
                        {
                            "name": "What",
                            "type": "AMAZON.LITERAL"
                        }
                    ],
                    "samples": [
                        "remember {Who} {What} {When}"
                    ]
                }
            ],
            "types": []
        }
    }
}

EDIT:

This is the response I got from Amazon when I submitted the bug:

We are not supporting AMAZON.Literal slot type anymore and we ask developer to use customer slot type is they have some set of values but if not then you can use AMAZON.SearchQuery where you will get the whole query which customer is looking for and same you can use it in you lambda function.

like image 579
SimpleJ Avatar asked Mar 06 '23 10:03

SimpleJ


1 Answers

I faced the same issue. Here's the solution.

You need to define your Sample Utterances as

Remember {Neil | Who} {died | What} {yesterday | When}

Amazon made it mandatory to provide the example inputs along with your Slot names as AMAZON.LITERAL can take in a wide variety of values.

For more information, refer here.

like image 109
Arghya Avatar answered May 17 '23 02:05

Arghya