如果您使用的是 Amazon Lex V2,請改參閱 Amazon Lex V2 指南。
如果您使用的是 Amazon Lex V1,我們建議您將機器人升級至 Amazon Lex V2。我們不再將新功能新增至 V1,並強烈建議對所有新機器人使用 V2。
本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
步驟 3:新增自訂和內建意圖
意圖代表呼叫中心代理程式希望機器人執行的動作。在這種情況下,客服人員希望機器人根據客服人員與客戶的對話,建議回應和有用的資源。
Amazon Lex 有兩種類型的意圖:自訂意圖和內建意圖。 AMAZON.KendraSearchIntent
是內建意圖。機器人使用 AMAZON.KendraSearchIntent
意圖來查詢索引,並顯示 Amazon Kendra 建議的回應。
此範例中的機器人不需要自訂意圖。不過,若要建置機器人,您必須建立至少一個具有至少一個範例表達式的自訂意圖。只有建置您的客服人員助理機器人才需要此意圖。它不會執行任何其他 函數。意圖的表達方式不得回答客戶可能提出的任何問題。這可確保AMAZON.KendraSearchIntent
呼叫 來回答客戶查詢。如需詳細資訊,請參閱AMAZON.KendraSearchIntent。
建立所需的自訂意圖
-
在 Getting started with your bot (開始使用您的機器人) 頁面上,選擇 Create intent (建立意圖)。
-
針對 Add intent (新增意圖),選擇 Create intent (建立意圖)。
-
在建立意圖對話方塊中,輸入意圖的描述性名稱,例如
RequiredIntent
。 -
針對範例表達式,輸入描述性表達式,例如
Required utterance
。 -
選擇儲存意圖。
新增 AMAZON.KendraSearchIntent intent 和回應訊息
-
在導覽窗格中,選擇意圖旁的加號 (+)。
-
選擇搜尋現有的意圖。
-
在搜尋意圖方塊中,輸入
AMAZON.KendraSearchIntent
,然後從清單中選擇。 -
為意圖提供描述性名稱,例如
AgentAssistSearchIntent
,然後選擇新增。 -
在意圖編輯器中,選擇 Amazon Kendra query (Amazon Kendra 查詢) 以開啟查詢選項。
-
選擇您希望搜尋的索引,
-
在回應區段中,將下列三個訊息新增至訊息群組。
I found an answer for the customer query: ((x-amz-lex:kendra-search-response-question_answer-question-1)) and the answer is ((x-amz-lex:kendra-search-response-question_answer-answer-1)). I found an excerpt from a helpful document: ((x-amz-lex:kendra-search-response-document-1)). I think this answer will help the customer: ((x-amz-lex:kendra-search-response-answer-1)).
-
選擇儲存意圖。
-
選擇建置以建置機器人。