0

I am trying to make a mock interview skill on Alexa where the skill asks the user a question for example: "tell me about your background and experiences".

The user would give an answer, and when the user is done answering, he/she can say "next question" to get the next question.

So "next question" is really the only intent the app is waiting to hear. The problem is when the user is giving an answer for example:

"My name is Bob, I am from New York, I studied biology, etc.",

the session is still live, and Alexa obviously doesn't understand the intent so AMAZON.FallbackIntent gets triggered.

Is there a way to just return an empty string when AMAZON.FallbackIntent gets called so the mock interview session doesn't get disrupted?

Thank you!

able-leopard
  • 115
  • 1
  • 14

1 Answers1

0

It sounds like you need to control the session and constrain the user.

IMO Alexa has a lot of trouble with long user utterances. The problem really stems from the interaction model and the unpredictability of what a user will say. This blog post sheds some light on VUI issues (https://medium.com/hackernoon/lessons-learned-moving-from-web-to-voice-development-35daa1d301db). tl;dr - you have to maintain state and context.

One approach you can take is to ask the user specific questions. "What is your name?" should map to one intent and update the session/persistence with the slot value. Then you respond with the next question you want the user to answer(i.e. "Where do you live", "what university did you attend") , having another intent ready to handle that slot value. You have to realize that users can say anything at any point in your Alexa Skill session and your skill has to handle it.

Here's an Amazon Developer blog post that can help you better understand dialog management and slot confirmation: https://developer.amazon.com/blogs/alexa/post/3a23c045-b568-4a6a-8a8c-fd5511a08053/build-advanced-alexa-skills-confirm-what-customers-want-with-dialog-management

  • Thanks for your response Steven. I understand the dialog part, but the skill is not really looking for any particular response in the answer. Or another way to ask this is, is there anyway for the skill to ignore whatever the user says and only listen to the "next question" intent while keeping the session open? I search all over and it seems like its a limitation on Alexa's end and can't find a solution so far. – able-leopard Jan 14 '20 at 21:51
  • Maybe `.withShouldEndSession(false)` or `.reprompt('some message to direct the user')` is what you need to keep the session alive. Another blog post for you to read ( :^) ): https://developer.amazon.com/blogs/alexa/post/9ec7c7d2-a937-4676-b936-48dd2abd0f66/what-s-new-with-request-handling-in-the-alexa-skills-kit-sdk-for-node-js – Steven Senkus Jan 15 '20 at 20:32
  • Thanks. Yes I already have ``` .withShouldEndSession(false) ``` Then for the .reprompt I set an empty reprompt if it gets called. I'll keep digging and keep you updated if I find a solution. – able-leopard Jan 16 '20 at 21:18