My custom slot type accepts unexpected values

I noticed something strange when testing my model for interacting with the Alexa skillset.

I defined a custom slot type, for example:

CAR_MAKERS Mercedes | BMW | Volkswagen 

And my scheme of intent was something like this:

 { "intents": [ { "intent": "CountCarsIntent", "slots": [ { "name": "CarMaker", "type": "CAR_MAKERS" }, ... 

with exemplary statements such as:

 CountCarsIntent Add {Amount} cars to {CarMaker} 

Now, when testing in the developer's console, I noticed that I can write things like:

 "Add three cars to Ford" 

And it really will analyze it correctly! Although Ford was never mentioned in the interaction model! Lambda request:

  "request": { "type": "IntentRequest", ... "intent": { "name": "CountCarsIntent", "slots": { "CarMaker": { "name": "ExpenseCategory", "value": "whatever" }, ... 

This really surprises me, because the documentation on custom slot types says quite clearly that a slot can only accept values ​​that are listed in the interaction model.

Now it seems that the values ​​are also being analyzed dynamically! Is this a new feature, or am I missing something?

+7
alexa-skills-kit alexa alexa-skill
source share
1 answer

This is actually normal (and good, IMO). Alexa uses the word list that you provide as a guide, not the final list.

If he didn’t have that kind of flexibility, then there would be no way to find out if users are using words that you did not expect. This way you can study and improve your list and processing.

+5
source share

All Articles