question

jordont avatar image
jordont asked

How to define a default intent when the command doesn't match an utterance?

It seems that no matter how random I make my command that follows my invocation name, it always maps to an intent. For example, if my sample utterances are: IntentOne turn on the tv IntentTwo start the car and I say something like "Alexa, ask to spin around" it will choose one of the intents rather than giving feedback that the utterance doesn't resolve to any intents. Is there any way to get a default behavior when the utterance isn't in the sample utterances?
alexa skills kitvoice-user interface
10 |5000

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

jjaquinta avatar image
jjaquinta answered
No. Alexa isn't a general purpose speech to text engine. It operates with a restricted vocabulary in order to improve quality. It evaluates all the possibilities and picks the one with the highest confidence level. Several of us have asked them to expose the confidence level, so we can make judgements about if the user really wanted to engage self destruct or not. Here is an old demo I did with IBM Watson: https://www.youtube.com/watch?v=ufrGo_JUeEg Their API gives you a confidence level about how well your search matched the result. I use it here to get the user to confirm they want to hear something when it is a low confidence match. If Amazon gave us back confidence level on intent matches we could be similarly adaptive in our skills.
1 comment
10 |5000

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

This would be so helpful. Currently, the skill can match an intent on what I imagine a 0 confidence level is. This is unacceptable, as it makes completely wrong matches pass as correct ones

0 Likes 0 ·
Lascar avatar image
Lascar answered

In recent Audio Player example (line 61):

https://github.com/alexa/skill-sample-nodejs-audio-player/blob/mainline/js/stateHandlers.js

They have this 'Unhandled' intent registration. However it is not in Intent Schema file. I wonder, if that is some internal default. Try and see if you can trigger that one.

1 comment
10 |5000

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

is there something like this in Java as well ?

0 Likes 0 ·
Mark_Sak avatar image
Mark_Sak answered

Does someone find a workaround on this?

1 comment
10 |5000

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

Developers should reply!

0 Likes 0 ·
newuser-e9470d97-3e8c-448e-8a3e-b7e94a528658 avatar image
newuser-e9470d97-3e8c-448e-8a3e-b7e94a528658 answered

How are we supposed to poll for information when no defaultIntent is available? Just make a random utterance that hopefully catches polled info?

10 |5000

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

nuukee avatar image
nuukee answered

I am having the same / similar issue.

As soon as I have one of my intents in, in always defaults to one of them if there should be no match.

For example my intent was something like "who lives here" and it would match it even if I ask "what is the weather like"

I found out that in my case it would always default to the intent which had most sample utterances.

So the reasoning seems to be that if Alexa cannot match an intent it chooses the one with the most utterances as there is the highest chance of matching.

My circumvention right now is to have a "DidNotUnderstand" intent and feed it many many utterances with only gibberish.

It will now default to this intent, which is my intended behavior, and my lambda code will now have a response like "I did not understand you".

Hope this helps.

1 comment
10 |5000

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

Most of the times your idea works. its great workaround. Thank you

0 Likes 0 ·