question

newuser-27a9b963-c2b7-4ab0-8970-7be425cafff8 avatar image

How to handle Voice design, when we have Slot = Intent Utterance

In my Custom Skill I have only Slot as one of the sample utterance, but that create problem in voice design as if anytime user tells "yes" that intent gets called.
How to handle this, in one question's response I need to have "yes/no" only, but I need it only when Alexa asks that question, not anytime user tells "yes/no"

Should I handle it in my code programatically or there is better way to use Slot in utterance.

alexa skills kitpython
10 |3000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

CharlesF avatar image
CharlesF answered

On the Javascript project I am working on right now, we are handling this 3 different ways. Hopefully this translates to your Python implementation.

1. Change your narrative to stay away from yes/no questions. Instead of "Would you like a sandwich" try "Would you like to try the sandwich or would you like to try something else?"

2. Set up a Yes intent handler using the built-in Amazon Yes intent. Flag the condition you are in with a session attribute and then check that attribute in your Yes handler.

3. Set up a session attribute when you are in your Q and A dialogue and trigger a handler for that attribute instead of a specific intent. Stack that handler higher up in your skill builder so it gets called before your intent handler. Then you can handle different intents in the same handler.

I bet there are some clever dialog directive solutions here as well. Experts: chime in!


10 |3000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.