步驟 3:新增自訂和內建意圖 - Amazon Lex V1

如果您使用的是 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

建立所需的自訂意圖
  1. Getting started with your bot (開始使用您的機器人) 頁面上,選擇 Create intent (建立意圖)

  2. 針對 Add intent (新增意圖),選擇 Create intent (建立意圖)

  3. 建立意圖對話方塊中,輸入意圖的描述性名稱,例如 RequiredIntent

  4. 針對範例表達式,輸入描述性表達式,例如 Required utterance

  5. 選擇儲存意圖

新增 AMAZON.KendraSearchIntent intent 和回應訊息
  1. 在導覽窗格中,選擇意圖旁的加號 (+)。

  2. 選擇搜尋現有的意圖

  3. 搜尋意圖方塊中,輸入 AMAZON.KendraSearchIntent,然後從清單中選擇。

  4. 為意圖提供描述性名稱,例如 AgentAssistSearchIntent,然後選擇新增

  5. 在意圖編輯器中,選擇 Amazon Kendra query (Amazon Kendra 查詢) 以開啟查詢選項。

  6. 選擇您希望搜尋的索引,

  7. 回應區段中,將下列三個訊息新增至訊息群組。

    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)).
  8. 選擇儲存意圖

  9. 選擇建置以建置機器人。

下一步驟

步驟 4:設定 Amazon Cognito