0
votes

I created Custom Slot Type for my Alexa trivia game. Answers to trivia questions can be anything: words, numbers, phrases, names. I inserted to Slot Values all the correct answers. But the problem is, skill doesn't recognize any wrong answers. Response intent just doesn't get triggered. Instead it says reprompt text immediately. Is there any possibility to teach it to understand any word in response? My interaction model is:

        "intents": [
            {
                "name": "AMAZON.CancelIntent",
                "samples": []
            },
            {
                "name": "AMAZON.HelpIntent",
                "samples": []
            },
            {
                "name": "AMAZON.StopIntent",
                "samples": []
            },
            {
                "name": "AnswerIntent",
                "slots": [
                    {
                        "name": "one",
                        "type": "RoundAnswer"
                    },
                    {
                        "name": "two",
                        "type": "RoundAnswer"
                    }
                ],
                "samples": [
                    "The answers are First {one} Second {two}",
                    "my answers are First {one}  Second {two}",
                    "first answer is {one} Second answer is {two} ",
                    "{one} and {two}",
                    "{one}  {two} ",
                    "{one}",
                    "The answer is {one} "
                ]
            },
            {
                "name": "DontKnowIntent",
                "slots": [],
                "samples": [
                    "i don't know",
                    "don't know",
                    "i don't know that one",
                    "dunno",
                    "skip",
                    "i don't know that",
                    "who knows",
                    "i don't know this question"
                ]
            },
            {
                "name": "AMAZON.StartOverIntent",
                "samples": [
                    "let's start from the beginning",
                    "start from the beginning",
                    "start game",
                    "new game",
                    "start",
                    "start new game"
                ]
            },
            {
                "name": "AMAZON.RepeatIntent",
                "samples": []
            },
            {
                "name": "AMAZON.YesIntent",
                "samples": []
            },
            {
                "name": "AMAZON.NoIntent",
                "samples": []
            },
            {
                "name": "AMAZON.NavigateHomeIntent",
                "samples": []
            }
        ],
        "types": [
            {
                "name": "RoundAnswer",
                "values": [
                    {
                        "name": {
                            "value": "thirty six"
                        }
                    },
                    {
                        "name": {
                            "value": "Could not swim"
                        }
                    },
                    {
                        "name": {
                            "value": "Dentist"
                        }
                    },
                    {
                        "name": {
                            "value": "Black mud"
                        }
                    },
                    {
                        "name": {
                            "value": "Fireball"
                        }
                    },
                    {
                        "name": {
                            "value": "Comet"
                        }
                    },
                    {
                        "name": {
                            "value": "13,000"
                        }
                    }
                    ...many more here

                ]
            }
        ]
    },
    "dialog": {
        "intents": [
            {
                "name": "AnswerIntent",
                "confirmationRequired": false,
                "prompts": {},
                "slots": [
                    {
                        "name": "one",
                        "type": "RoundAnswer",
                        "confirmationRequired": false,
                        "elicitationRequired": true,
                        "prompts": {
                            "elicitation": "Elicit.Slot.1498167634260.856164267644"
                        }
                    },
                    {
                        "name": "two",
                        "type": "RoundAnswer",
                        "confirmationRequired": false,
                        "elicitationRequired": false,
                        "prompts": {}
                    }
                ]
            }
        ],
        "delegationStrategy": "SKILL_RESPONSE"
    },
    "prompts": [
        {
            "id": "Confirm.Slot.1498167634260.856164267644",
            "variations": [
                {
                    "type": "PlainText",
                    "value": "ok"
                }
            ]
        },
        {
            "id": "Confirm.Slot.1498167634260.534517403250",
            "variations": [
                {
                    "type": "PlainText",
                    "value": "ok"
                }
            ]
        },
        {
            "id": "Confirm.Slot.1498167634260.145008767498",
            "variations": [
                {
                    "type": "PlainText",
                    "value": "ok"
                }
            ]
        },
        {
            "id": "Confirm.Slot.1498167634260.1214922796775",
            "variations": [
                {
                    "type": "PlainText",
                    "value": "ok"
                }
            ]
        },
        {
            "id": "Elicit.Slot.1498167634260.856164267644",
            "variations": [
                {
                    "type": "PlainText",
                    "value": "what's the answer?"
                }
            ]
        },
        {
            "id": "Confirm.Slot.1498167634260.1519619016259",
            "variations": [
                {
                    "type": "PlainText",
                    "value": "ok"
                }
            ]
        },
        {
            "id": "Confirm.Slot.1498167634260.1412749795564",
            "variations": [
                {
                    "type": "PlainText",
                    "value": "ok"
                }
            ]
        },
        {
            "id": "Confirm.Slot.1498167634260.1335829309782",
            "variations": [
                {
                    "type": "PlainText",
                    "value": "ok"
                }
            ]
        },
        {
            "id": "Confirm.Intent.654381803412",
            "variations": [
                {
                    "type": "PlainText",
                    "value": "are your answers final?"
                }
            ]
        }
    ]
}
1
Share your interaction modeljohndoe

1 Answers

0
votes

Alexa only invokes the correct intent when the slots included in that utterance match with the slot values hard coded in the interaction model.

I have few suggestions for you

  1. Instead of guessing the Answer directly you may make the user utter the correct option example : Alexa: What is the capital of India ? option a) Delhi Option b) Hyderabad User : Option a

    yes Register option a and option b as slot values in the Interaction model and matching those options to the answer depends on how you design your code /json or db (i suggest the answers should be in key value pair line { a:Delhi , b: Hyderabad , answer : a})

  2. If you register all the right and wrong answers i.e all the options of your questions in your interaction model then alexa would recognize the slot value and invoke the correct intent. But sometimes user might say MJ instead of Michael Jackson so you have to add the synonyms too , better go with 1st point