提供: Bright Pattern Documentation
移動先: 案内検索
(Created page with "この記事では、 設定されたチャットサービスにおいて対話型ボットとして利用で...")
 
(25 intermediate revisions by the same user not shown)
Line 5: Line 5:
  
  
[[File:BPChat-Ex-1.PNG|thumb|450px|center|Chat showing an integrated Lex bot and suggestions for the agent]]
+
[[File:BPChat-Ex-1.PNG|thumb|450px|center|統合されたLexボットおよびエージェントへの提案を示すチャット]]
  
== Procedure ==
+
== 手順 ==
This procedure will walk you through the process of setting up your first Amazon Lex bot. For a deeper understanding of Amazon Lex and other AWS resources, refer to [https://docs.aws.amazon.com/lex/latest/dg/what-is.html AWS’s Amazon Lex Developer Guide].
+
この手順では、初めてのAmazon Lexボットを設定するプロセスについて説明します。 Amazon Lexおよびその他のAWSリソースの詳細については、
 +
[https://docs.aws.amazon.com/lex/latest/dg/what-is.html AWS’s Amazon Lex Developer Guide]をご覧ください。
  
=== Step 1: Create an AWS account ===
+
=== ステップ 1: AWSアカウントを作成します。 ===
# If you haven’t already done so, [https://docs.aws.amazon.com/lex/latest/dg/gs-account.html set up an AWS account].
+
# 作成がまだの場合、[https://docs.aws.amazon.com/lex/latest/dg/gs-account.html AWSアカウントの作成]を行います。
  
=== Step 2: Create an IAM user, grant administrative permissions, and save credentials ===
+
=== ステップ 2: IAMユーザーの作成、管理者権限の付与、認証情報の保存を行います。 ===
Our integration accounts require access keys to connect to and use your Amazon Lex bot. Access keys are created and managed in AWS Identity and Access Management (IAM) services.
+
我々の統合アカウントには、Amazon Lexボットに接続して使用するためのアクセスキーが必要です。アクセスキーは、AWS Identity and Access Management(IAM)サービスで作成および管理されます。
  
To get an access key, you need to:
+
アクセスキーを取得するには、次の操作を行います:
# Go to your [https://console.aws.amazon.com/iam/ AWS Management Console > IAM Dashboard]. If you don't know where it is, search AWS Services for "IAM."<br /><br />
+
# [https://console.aws.amazon.com/iam/ AWS マネジメントコンソール > IAM ダッシュボード]へ進みます。場所が分からない場合、AWS サービスで"IAMを検索します。"<br /><br />
# From the IAM root menu, click '''Users''' and then click '''Add user''' to create an IAM user and grant administrative permissions. Adding a user creates credentials that are used to access AWS.<br /><br />[[File:Lex-10.PNG|thumb|800px|center|Add IAM User]]<br /><br />
+
# IAMルートメニューで  '''ユーザー'''をクリックした後、'''ユーザーの追加'''をクリックし、IAMユーザーの作成と管理者権限の付与を行います。ユーザーを追加すると、AWSへのアクセスに使用される認証情報が生成されます。<br /><br />[[File:Lex-10.PNG|thumb|800px|center|IAMユーザーの追加]]<br /><br />
# Copy the '''access key ID''' (e.g., AKIAIOSFODNN7EXAMPLE) and the '''secret access key''' (e.g., wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY). Save this for when you set up an [[5.3:Tutorials-for-admins/SetupanAWSLexIntegrationAccount |  AWS Lex bot/chat suggestions integration account]].<br /><br />
+
# '''access key ID''' (例: AKIAIOSFODNN7EXAMPLE)および'''secret access key''' (例: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY)をコピーします。このデータは、[[5.3:Tutorials-for-admins/SetupanAWSLexIntegrationAccount |  AWS Lexボット/チャットサジェスト統合アカウント]]の設定の際に必要になるので、保存します。<br /><br />
  
For more information, see [https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html Managing Access Keys for IAM Users].
+
詳しい情報については、[https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html IAMユーザー のアクセスキーの管理]をご覧ください。
  
=== Step 3: Add Lex as a service and create a sample bot ===
+
=== ステップ 3: Lexをサービスとして追加し、サンプルボットを作成します。 ===
# Sign in to the AWS Management Console and open the [https://console.aws.amazon.com/lex/ Amazon Lex console].<br /><br />
+
# AWS マネジメントコンソールへサインインし、 [https://console.aws.amazon.com/lex/ Amazon Lex コンソール]を開きます。<br /><br />
# On the ''Create your bot'' page, you can create a custom bot or create a ready-to-use one with a sample template. For the sake of this example procedure, select the '''Book Trip''' sample.<br /><br />
+
# ''ボットの作成'' ページで、カスタムボットを作成するか、サンプルテンプレートを基にすぐに使用できるボットを作成します。この例では、'''Book Trip''' サンプルを選択します。<br /><br />
# The Create Your Bot page will open. That is where you develop your Amazon Lex bot.
+
# ボットの作成ページが開きます。 今ページでAmazon Lex ボットを作成します。
  
  
[[File:Lex-1.PNG|thumb|800px|center|Amazon Lex Create Your Bot page]]
+
[[File:Lex-1.PNG|thumb|800px|center|Amazon Lex ボットの作成ページ]]
  
  
=== Step 4: Review the bot workspace ===
+
=== ステップ 4: ボットのワークスペースを確認します。 ===
The bot workspace will open. Notice that there are four tabs at the top: Editor, Settings, Channels, and Monitoring. In this exercise, we will be focusing on the '''Editor''' tab only. You can come back to the other tabs later.
+
ボットのワークスペースが開きます。上部にエディター、設定、チャンネル、モニタリングという4つのタブがあります。この例では、'''エディター'''タブが使われます。後で他のタブに戻ることができます。
  
  
[[File:Lex-2.PNG|thumb|800px|center|Amazon Lex Editor properties]]
+
[[File:Lex-2.PNG|thumb|800px|center|Amazon Lex エディタープロパティ]]
  
  
The Editor tab includes the properties for every intent.
+
エディタータブには、各インテントのプロパティが含まれます。
  
=== Step 5: Edit intent properties ===
+
=== ステップ 5: インテントプロパティを編集します。 ===
''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.
+
''インテント''とは、お客様が入力したキーワードによってトリガーされるアクションです。インテントは、お客様がしたいこととして捉えても良いです。例えば、Lexのサンプルボットに含まれている最初のインテントは"BookCar"です。これは、お客様がしたいこと(車を予約すること)と、ボットがお客様のテキスト入力に基づいて行うべきのことを認識することです。
  
==== 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")<br /><br />
+
* '''フレーズのサンプル''' :インテントをトリガーするフレーズ (つまり、キーワード)です (例: "車を予約する" または "車の予約を行う" または "車の予約")<br /><br />
* '''Lambda initialization and validation''' - AWS Lambda Function that validates the customer's input<br /><br />
+
* '''Lambdaの初期化と検証''' :お客様の入力を検証するAWS Lambda関数<br /><br />
* '''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)<br /><br />
+
* '''スロット''':インテントアクションを実行するためにお客様が提供するデータ(例えば、 "PickUpCity"というスロットは、車の貸出場所に関する顧客データを収集します)<br /><br />
* '''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?")<br /><br />
+
* '''確認プロンプト''':インテントアクションを確認し、お客様にお客様にデータを入力するように求める質問  (例: "車のお受け取り場所は {PickUpCity}ですね。予約手続きを継続しますか ")<br /><br />
* '''Fulfillment''' - AWS's business logic required to fulfill the customer's intent<br /><br />
+
* '''フルフィルメント''':お客様の目的(インテント)を達成するために必要なAWSビジネスロジック <br /><br />
** '''AWS Lamda Function''' - The function used as a code hook for your Amazon Lex bot; this can perform initialization and validation, fulfillment, or both<br /><br />
+
** '''AWS Lamda関数''':Amazon Lexボットのコードフックとして使われる関数です。これにより、初期化と検証、フルフィルメント、またはその両方を実行できます。<br /><br />
** '''Return parameters to client''' - Sends the intent information to the client application (i.e., Bright Pattern scenario) for intent fulfillment<br /><br />
+
** '''パラメータをクライアントへ送信''':インテントのフルフィルメントのため、インテント情報をクライアントアプリケーション (つまり、Bright Patternシナリオ)に送信します。<br /><br />
* '''Response''' - Message(s) or response cards that close the intent or invoke a different one
+
* '''返答''':インテントをクローズするか、別のインテントを呼び出すメッセージまたは応答カード。
  
=== Step 6: Save and build ===
+
=== ステップ 6: 保存して作成します。 ===
# For this example procedure, leave everything on the Editor tab as-is.<br /><br />
+
# この例では、エディタータブの内容を全てそのままにします。<br /><br />
# If you did change something, be sure to click '''Save''' at the bottom.<br /><br />
+
# 変更があった場合、下部の '''保存''' をクリックします。<br /><br />
#Click '''Build''' at the top of the page. This builds the bot with the configured intents.
+
#ページの上部にある '''ビルド'''をクリックします。これにより、設定されたインテントに対応するボットが 作成されます。
  
=== Step 7: Test it ===
+
=== ステップ 7: ボットをテストします。===
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.<br /><br />
+
#画面の右側で'''チャットボットのテスト'''をクリックし、チャットウィンドウをポップアウトします。<br /><br />
# Try typing a request such as, “I want to book a trip.” See what happens.
+
# “旅行ツアーを予約する”など、リクエストを入力します。表示される内容をご覧ください。
  
  
[[File:Lex-9.PNG|thumb|650px|center|Test chat that invokes the BookCar intent]]
+
[[File:Lex-9.PNG|thumb|650px|center| BookCarインテントを呼び出すテストチャット]]
  
  
=== Step 8: Publish your bot ===
+
=== ステップ 8: ボットを公開します。 ===
# At the top of the page, click '''Publish'''.<br /><br />
+
# ページの上部にある'''公開'''をクリックします。<br /><br />
# 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.<br /><br />
+
# 開いた''公開''ダイアログ で、設定されたボット用に新しいエイリアス (例: “TripBooker”) を選択または作成します。''エイリアス''は、ボットの特定のバージョンを指すために使用されます。同じボットに複数のエイリアスがあると、同じボットの異なるインテントとプロパティへアクセスできます。<br /><br />
# Click '''Publish''' again.
+
# もう一度 '''公開'''をクリックします。
  
  
[[File:Lex-3.PNG|thumb|800px|center|Publish this version (alias) of the Amazon Lex bot]]
+
[[File:Lex-3.PNG|thumb|800px|center|Amazon Lex ボットの原バージョン(エイリアス)を公開します。]]
  
  
== 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:
+
Bright Patternコンタクトセンターと統合できるAmazon Lexボットの基本設定が完了しました。次の操作を実行できます:
* Read AWS documentation, explore Amazon Lex intents and slot types, and edit as desired
+
* AWS書類の閲覧、 Amazon Lex インテントとスロットタイプの確認、必要に応じての編集を行います。
* Create an [[5.3:Tutorials-for-admins/SetupanAWSLexIntegrationAccount |  AWS Lex bot/chat suggestions integration account]]  
+
* [[5.3:Tutorials-for-admins/SetupanAWSLexIntegrationAccount |  AWS Lex ボット/チャットサジェスト統合アカウント]]を作成します。
* Edit a [[Scenario-builder-reference-guide/HowtoCreateChatScenarioThatUsesBots |  chat scenario that uses your bot]]
+
* [[Scenario-builder-reference-guide/HowtoCreateChatScenarioThatUsesBots |  ボットを使うチャットシナリオ]]を作成します。
* [[Tutorials-for-admins/AI/HowtoIntegrateBotswithChat |  Configure web chat to work with bots]]
+
* [[Tutorials-for-admins/AI/HowtoIntegrateBotswithChat |  ボットに対応するウェブチャットを設定します。]]

Latest revision as of 21:03, 7 April 2020

• English
• 5.19 • 5.3 • 5.8

Amazon Lexボットの作成方法

Bright Patternコンタクトセンターは、AWSマネジメントコンソールからチャットボットを設定、テスト、展開するためのプラットフォームであるAmazon Lexと統合します。 Lexは、自動音声認識(ASR)と自然言語理解(NLU)の両方のテクノロジーを提供し、チャットボットがお客様の音声とテキストを認識し、意図を理解し、音声読み上げを可能にします。 Lexとの統合により、コンタクトセンターはチャットシナリオを通じてLexにアクセスし、チャット対話においてボットによるサポートサービスを提供できます。

この記事では、 設定されたチャットサービスにおいて対話型ボットとして利用できるAmazon Lexボットの設定方法について説明します。


統合されたLexボットおよびエージェントへの提案を示すチャット

手順

この手順では、初めてのAmazon Lexボットを設定するプロセスについて説明します。 Amazon Lexおよびその他のAWSリソースの詳細については、

AWS’s Amazon Lex Developer Guideをご覧ください。

ステップ 1: AWSアカウントを作成します。

  1. 作成がまだの場合、AWSアカウントの作成を行います。

ステップ 2: IAMユーザーの作成、管理者権限の付与、認証情報の保存を行います。

我々の統合アカウントには、Amazon Lexボットに接続して使用するためのアクセスキーが必要です。アクセスキーは、AWS Identity and Access Management(IAM)サービスで作成および管理されます。

アクセスキーを取得するには、次の操作を行います:

  1. AWS マネジメントコンソール > IAM ダッシュボードへ進みます。場所が分からない場合、AWS サービスで"IAMを検索します。"

  2. IAMルートメニューで ユーザーをクリックした後、ユーザーの追加をクリックし、IAMユーザーの作成と管理者権限の付与を行います。ユーザーを追加すると、AWSへのアクセスに使用される認証情報が生成されます。

    IAMユーザーの追加


  3. access key ID (例: AKIAIOSFODNN7EXAMPLE)およびsecret access key (例: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY)をコピーします。このデータは、 AWS Lexボット/チャットサジェスト統合アカウントの設定の際に必要になるので、保存します。

詳しい情報については、IAMユーザー のアクセスキーの管理をご覧ください。

ステップ 3: Lexをサービスとして追加し、サンプルボットを作成します。

  1. AWS マネジメントコンソールへサインインし、 Amazon Lex コンソールを開きます。

  2. ボットの作成 ページで、カスタムボットを作成するか、サンプルテンプレートを基にすぐに使用できるボットを作成します。この例では、Book Trip サンプルを選択します。

  3. ボットの作成ページが開きます。 今ページでAmazon Lex ボットを作成します。


Amazon Lex ボットの作成ページ


ステップ 4: ボットのワークスペースを確認します。

ボットのワークスペースが開きます。上部にエディター、設定、チャンネル、モニタリングという4つのタブがあります。この例では、エディタータブが使われます。後で他のタブに戻ることができます。


Amazon Lex エディタープロパティ


エディタータブには、各インテントのプロパティが含まれます。

ステップ 5: インテントプロパティを編集します。

インテントとは、お客様が入力したキーワードによってトリガーされるアクションです。インテントは、お客様がしたいこととして捉えても良いです。例えば、Lexのサンプルボットに含まれている最初のインテントは"BookCar"です。これは、お客様がしたいこと(車を予約すること)と、ボットがお客様のテキスト入力に基づいて行うべきのことを認識することです。

プロパティ

  • フレーズのサンプル :インテントをトリガーするフレーズ (つまり、キーワード)です (例: "車を予約する" または "車の予約を行う" または "車の予約")

  • Lambdaの初期化と検証 :お客様の入力を検証するAWS Lambda関数

  • スロット:インテントアクションを実行するためにお客様が提供するデータ(例えば、 "PickUpCity"というスロットは、車の貸出場所に関する顧客データを収集します)

  • 確認プロンプト:インテントアクションを確認し、お客様にお客様にデータを入力するように求める質問 (例: "車のお受け取り場所は {PickUpCity}ですね。予約手続きを継続しますか ")

  • フルフィルメント:お客様の目的(インテント)を達成するために必要なAWSビジネスロジック

    • AWS Lamda関数:Amazon Lexボットのコードフックとして使われる関数です。これにより、初期化と検証、フルフィルメント、またはその両方を実行できます。

    • パラメータをクライアントへ送信:インテントのフルフィルメントのため、インテント情報をクライアントアプリケーション (つまり、Bright Patternシナリオ)に送信します。

  • 返答:インテントをクローズするか、別のインテントを呼び出すメッセージまたは応答カード。

ステップ 6: 保存して作成します。

  1. この例では、エディタータブの内容を全てそのままにします。

  2. 変更があった場合、下部の 保存 をクリックします。

  3. ページの上部にある ビルドをクリックします。これにより、設定されたインテントに対応するボットが 作成されます。

ステップ 7: ボットをテストします。

作成完了後、チャットウィンドウでボットをテストします。

  1. 画面の右側でチャットボットのテストをクリックし、チャットウィンドウをポップアウトします。

  2. “旅行ツアーを予約する”など、リクエストを入力します。表示される内容をご覧ください。


BookCarインテントを呼び出すテストチャット


ステップ 8: ボットを公開します。

  1. ページの上部にある公開をクリックします。

  2. 開いた公開ダイアログ で、設定されたボット用に新しいエイリアス (例: “TripBooker”) を選択または作成します。エイリアスは、ボットの特定のバージョンを指すために使用されます。同じボットに複数のエイリアスがあると、同じボットの異なるインテントとプロパティへアクセスできます。

  3. もう一度 公開をクリックします。


Amazon Lex ボットの原バージョン(エイリアス)を公開します。


次のステップ

Bright Patternコンタクトセンターと統合できるAmazon Lexボットの基本設定が完了しました。次の操作を実行できます: