Reputation: 36
I have an Alexa skill that asks for at least one sports team (teamOne), and optionally two sports teams (teamOne and teamTwo).
I'm using the built in slot type AMAZON.SportsTeam for both of these slots.
I'm noticing it sometimes picks up something not even close to a sports team.
Here is an example: The user asks the skill for "what is Pittsburgh Steelers" and it's parsing it like this:
"teamOne": {
"name": "teamOne",
"value": "what is",
"confirmationStatus": "NONE"
},
"teamTwo": {
"name": "teamTwo",
"value": "Pittsburgh Steelers",
"confirmationStatus": "NONE"
}
How on earth is it assuming "what is" is the name of a sports team? How can I make this skill better without manually defining hundreds (thousands?) of sports teams? Obviously this isn't the 'correct' way to invoke the skill but the user shouldn't suffer because of that.
Upvotes: 0
Views: 88
Reputation: 395
We were surprised that the slot values are not bound by the values defined in them. We had a couple slots defined with specific values for our application, but sometimes received invalid data. We fixed this a couple of ways after talking with Amazon Alexa folks:
A) For defined lists we have methods in our server which run the incoming value against a fixed list for that particular slot type. When no exact match is found we determine the closest match and use that value.
B) Define many different utterances to match an intent, in your case above you may add: [who are the (teamSlotValue)], [who is (teamSlotValue)], [what is (teamSlotValue)], etc... covering as many permutations of the intent possible. We found that doing this for each utterance can increase accuracy, not only of invoking the correct utterance, but also reducing noise in the slot values.
Upvotes: 2