Amazon Lexボットの作成方法
Bright Patternコンタクトセンターは、AWSマネジメントコンソールからチャットボットを設定、テスト、展開するためのプラットフォームであるAmazon Lexと統合します。 Lexは、自動音声認識(ASR)と自然言語理解(NLU)の両方のテクノロジーを提供し、チャットボットがお客様の音声とテキストを認識し、意図を理解し、音声読み上げを可能にします。 Lexとの統合により、コンタクトセンターはチャットシナリオを通じてLexにアクセスし、チャット対話においてボットによるサポートサービスを提供できます。
この記事では、 設定されたチャットサービスにおいて対話型ボットとして利用できるAmazon Lexボットの設定方法について説明します。
手順
この手順では、最初のAmazon Lexボットを設定するプロセスについて説明します。 Amazon Lexおよびその他のAWSリソースの詳細については、
AWS’s Amazon Lex Developer Guideをご覧ください。
ステップ 1: AWSアカウントを作成します。
- 作成がまだの場合、AWSアカウントの作成を行います。
ステップ 2: IAMユーザーの作成、管理者権限の付与、認証情報の保存を行います。
我々の統合アカウントには、Amazon Lexボットに接続して使用するためのアクセスキーが必要です。アクセスキーは、AWS Identity and Access Management(IAM)サービスで作成および管理されます。
アクセスキーを取得するには、次の操作を行います:
- AWS マネジメントコンソール > IAM ダッシュボードへ進みます。場所が分からない場合、AWS サービスで"IAMを検索します。"
- IAMルートメニューで ユーザーをクリックした後、ユーザーの追加をクリックし、IAMユーザーの作成と管理者権限の付与を行います。ユーザーを追加すると、AWSへのアクセスに使用される認証情報が生成されます。
- access key ID (例: AKIAIOSFODNN7EXAMPLE)およびsecret access key (例: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY)をコピーします。このデータは、 AWS Lexボット/チャットサジェスト統合アカウントの設定の際に必要になるので、保存します。
詳しい情報については、IAMユーザー のアクセスキーの管理をご覧ください。
ステップ 3: Lexをサービスとして追加し、サンプルボットを作成します。
- AWS マネジメントコンソールへサインインし、 Amazon Lex コンソールを開きます。
- ボットの作成 ページで、カスタムボットを作成するか、サンプルテンプレートを基にすぐに使用できるボットを作成します。この例では、Book Trip サンプルを選択します。
- ボットの作成ページが開きます。 今ページでAmazon Lex ボットを作成します。
ステップ 4: ボットのワークスペースを確認します。
ボットのワークスペースが開きます。上部にエディター、設定、チャンネル、モニタリングという4つのタブがあります。この例では、エディタータブが使われます。後で他のタブに戻ることができます。
エディタータブには、各目的に使うプロパティが含まれます。
Step 5: Edit intent properties
Intents are actions triggered by keywords entered by your customer. You can think of intents as what customers want to do. For example, the first intent included in our sample Lex bot is "BookCar," which is what the customer wants to do (book a car) and what the bot recognizes it needs to do based on the customer's text input.
Properties
- Sample utterances - Phrases (i.e., keywords) that trigger the intent (e.g., "Reserve a car" or "make a car reservation" or "book a car")
- Lambda initialization and validation - AWS Lambda Function that validates the customer's input
- Slots - Data the customer must provide in order to fulfill the intent action (e.g., slot "PickUpCity" collects customer data about the city in which the car will be picked up)
- Confirmation prompt - Questions that confirm the intent actions and prompt the customer to input data (e.g., "Okay, I have you down for a car to be picked up in {PickUpCity}. Should I continue booking the car?")
- Fulfillment - AWS's business logic required to fulfill the customer's intent
- AWS Lamda Function - The function used as a code hook for your Amazon Lex bot; this can perform initialization and validation, fulfillment, or both
- Return parameters to client - Sends the intent information to the client application (i.e., Bright Pattern scenario) for intent fulfillment
- AWS Lamda Function - The function used as a code hook for your Amazon Lex bot; this can perform initialization and validation, fulfillment, or both
- Response - Message(s) or response cards that close the intent or invoke a different one
Step 6: Save and build
- For this example procedure, leave everything on the Editor tab as-is.
- If you did change something, be sure to click Save at the bottom.
- Click Build at the top of the page. This builds the bot with the configured intents.
Step 7: Test it
Once the build is complete, you can test the bot in the chat window.
- On the right side of the screen, click Test chatbot to pop out the chat window.
- Try typing a request such as, “I want to book a trip.” See what happens.
Step 8: Publish your bot
- At the top of the page, click Publish.
- In the Publish dialog that opens, choose or create a new alias (e.g., “TripBooker”) for this bot. The alias is used to point to the specific version of the bot. Having multiple aliases for the same bot allows you to keep and access different intents and properties for the same bot.
- Click Publish again.
Next Steps
You have now set up a very basic Amazon Lex bot that can be integrated with Bright Pattern Contact Center. You may now:
- Read AWS documentation, explore Amazon Lex intents and slot types, and edit as desired
- Create an AWS Lex bot/chat suggestions integration account
- Edit a chat scenario that uses your bot
- Configure web chat to work with bots
< 前へ | 次へ >