2017-03-21 15 views
5

同じスロットタイプを使用する2つのインテントがあります。ただし、入力がランダムな文字列の場合、AlexaはJSONリクエスト内の意図を自動的に識別しますが、発言の一部ではありません。例えば、以下の例では、ユーザ入力が「bla bla bla」であった場合、GetAccountBalanceは、提供された発声の一部ではないがスロット値のない意図として識別される。Alexa Intent Schema:ランダム入力がインテントとして識別される

これらのケースをエラーチェックする方法と、インテントスキーマを開発する際に、このようなケースを避けるベストプラクティスは何ですか。すべてのランダム入力を処理できるインテントを作成する方法はありますか?

例スキーマ:

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

発話:Alexaのスキルを開発する際

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 

答えて

2

、アレクサは、常にユーザーが純粋ちんぷんかんぷんを話す場合でも発射する意図をピックアップします。私が知っている限り、デフォルト/キャッチオールインテントを設定する方法はありません。

エラー処理の点では、ドキュメントから次のようなことが重要です。

Note that a custom slot type is not the equivalent of an enumeration. Values outside the list are still returned if recognised by the spoken language understanding system. Although input to a custom slot type is weighted towards the values in the list, it is not constrained to just the items on the list. Your code still needs to include validation and error checking when using slot values.

また、いくつかのトピックエラー処理にさらに飛び込むリンクをフォローアップしている上記のリンク。

2

この問題を解決する一つのハックがあります:何のいずれかのマッチが(ランダムな文字列)Amazonは常に発話の最高なしで意図を取る見つからない場合は

が。 私は、「DidNotUnderstand」というインテントを作成し、アレクサが「DidNotUnderstand」インテントを呼び出すようなものが見つからなければ、できるだけ多くのランダムな発声を追加できます。

下記のリンクから最初の返信をご参照ください: https://forums.developer.amazon.com/questions/4856/intent-triggering-without-utterance-match.html

関連する問題