alexa / alexa-skills-kit-sdk-for-nodejs

The Alexa Skills Kit SDK for Node.js helps you get a skill up and running quickly, letting you focus on skill logic instead of boilerplate code.
Apache License 2.0
3.12k stars 737 forks source link

Dynamic Entities for NON-MUSIC slots and catalogs #598

Closed teddy-owen closed 4 years ago

teddy-owen commented 4 years ago

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[x ] Feature request
[x ] Documentation issue or request
[ ] Other... Please describe:

Please add documentation/features to allow for Dynamic entities to work for NON-MUSIC slots and thus catalogs. It seems that Amazon has not provided the info and/or capabilities for this to work, after lots of investigation. the issue is that Dynamic entities requires you to first create a catalog for the target slot. Docs state: "To use dynamic entities, ensure that your skill has a static catalog with defined slot types and slot names." Then, when you actually try to create a catalog, you must choose a type from the following list: "AMAZON.MusicAlbum", "AMAZON.MusicGroup", "AMAZON.Genre", "AMAZON.MusicPlaylist", "AMAZON.MusicRecording", "AMAZON.BroadcastChannel". If your slot is not music related, youre out of luck. So maybe, you think you can just pick an arbitrary type and go from there, but then you find that they have restrictions on what the catagory entities can look like which of course will all be music specific. This "Dynamic entities" feature is such a common use case, that I cannot believe how poorly documented and difficult it is. My app contains a simple, dynamic list of items for each of my users. They can edit that list. Then, I want alexa to ask them to pick one of the items on their list. So of course, the slot value (list_item) expects them to say one of those items and then match it to the correct/closest one. So, I should be able to respond with a dynamic entitly list of their current list. Unfortuneatly this simple and common task has proven to be nearly impossible. Id appreciate any guidance and I hope Amazon publishes MUCH clearer documentation for the steps of how to achieve this.

Sources:

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

Node.js and NPM Info

sattpat commented 4 years ago

Hi @teddy-owen . Thanks for reporting this issue. I am trying to understand what your use case here is. If your use case requires a custom catalog, you should be able to do so and entity resolution should work on the slot. We can better understand your issue if you could share the skill model and the intent requests that you are making.

sattpat commented 4 years ago

Hi @teddy-owen. I was able to test the dynamic entities feature and the conclusion I can draw is that "static catalog" refers to values that are entered against a slot type in the interaction model. All that is needed is the slot type defined in the interaction model and then a set of sample values which are entered against the slot type, to train the models. Then at runtime, you can use dynamic entities directive to provide additional, personalized values to alexa.

I have set the action item to updating our documentation

ShenChen93 commented 4 years ago

Hi @teddy-owen ,

It seems you are confused by the term 'static catalog'. 'Static catalog' refers to the slot types (+ values) defined in the interaction model, but 'static catalog' is not a term used across Alexa documentation and should be removed for consistency.

We've updated our doc with following changes:

old: With the use of dynamic entities, you can augment your skill's predefined static catalogs by allowing your skill to dynamically create new entities in runtime
new: With the use of dynamic entities, you can augment your skill's predefined slot types in the interaction model by allowing your skill to dynamically create new entities in runtime

old: Alexa returns entity resolution results from both the dynamic and static catalogs.
new: Alexa returns entity resolution results from both the dynamic slot type values and the slot type values in the interaction model.

Closed the issue for now and feel free to reopen if you have any concerns.

Thanks, Shen