Alexa Intent Schema: random input is defined as intent

I have two intentions that use the same types of slots. However, if the input is a random string, Alexa will automatically identify the intent in its JSON request, even if it is not part of the statements. For example, in the example below, if the user input was "bla bla bla", GetAccountBalance identified as a target without a slot value, even if it is not part of the statements provided.

What is the error checking method for these cases and what is the best way to avoid such cases when designing an intent scheme? Is there a way to create an intent that can handle all random inputs?

Example circuit:

 { "intents": [ { "intent": "GetAccountBalance", "slots": [ { "name": "AccountType", "type": "ACCOUNT_TYPE" } ] }, { "intent": "GetAccountNumber", "slots": [ { "name": "AccountType", "type": "ACCOUNT_TYPE" } ] } ] } 

Statements:

 GetAccountBalance what is my account balance for {AccountType} Account GetAccountBalance what is my balance for {AccountType} Account GetAccountBalance what is the balance for my {AccountType} Account GetAccountBalance what is {AccountType} account balance GetAccountBalance what is my account balance GetAccountBalance what is account balance GetAccountBalance what is the account balance GetAccountBalance what is account balance GetAccountNumber what is my account number for {AccountType} Account GetAccountNumber what is my number for {AccountType} Account GetAccountNumber what is the number for my {AccountType} Account GetAccountNumber what is {AccountType} account number GetAccountNumber what is my account number GetAccountNumber what is account number GetAccountNumber what is the account number GetAccountNumber what is account number 
+5
source share
2 answers

When developing the Alexa skill, Alexa will always try to shoot, even if the user speaks of pure gibberish. As far as I know, there is no way to set the default intent / catch -all.

In terms of error handling, the following excerpt from the documents is really important.

Please note that the type of user slot is not equivalent to an enumeration. Non-list values ​​are still returned if recognized by the spoken language understanding system. Although custom slot type input is weighted relative to the values ​​in the list, it is not limited to items in the list. Your code should still include validation and error checking when using slot values.

The link above also has a few follow-up links, which further plunge into error handling in messages.

+2
source

There is one hack to solve this problem:

If no match is found (random string), Amazon always accepts the intention with the highest number of sayings. Thus, I created one intention “DidNotUnderstand” and added as many random statements as possible (reasonably moderate) as a result, if no match is found, alexa will call the intention “DidNotUnderstand”.

Please refer to the first answer below: https://forums.developer.amazon.com/questions/4856/intent-triggering-without-utterance-match.html

+2
source

Source: https://habr.com/ru/post/1265744/


All Articles