Customer service calls require customer agents to have the customer’s account information to process the caller’s request. For example, to provide a status on an insurance claim, the support agent needs policy holder information such as the policy ID and claim number. Such information is often collected in the interactive voice response (IVR) flow at the beginning of a customer support call. IVR systems have typically used grammars based on the Speech Recognition Grammar Specification (SRGS) format to define rules and parse caller information (policy ID, claim number). You can now use the same grammars in ایمیزون لیکس to collect information in a speech conversation. You can also provide semantic interpretation rules using ECMAScript tags within the grammar files. The grammar support in Amazon Lex provides granular control for collecting and postprocessing user input so you can manage an effective dialog.
In this post, we review the grammar support in Amazon Lex and author a sample grammar for use in an ایمیزون کنیکٹ contact flow.
Use grammars to collect information in a conversation
You can author the grammar as a slot type in Amazon Lex. First, you provide a set of rules in the SRGS format to interpret user input. As an optional second step, you can write an ECMA script that transforms the information collected in the dialog. Lastly, you store the grammar as an XML file in an ایمیزون سادہ اسٹوریج سروس (Amazon S3) bucket and reference the link in your bot definition. SRGS grammars are specifically designed for voice and DTMF modality. We use the following sample conversations to model our bot:
بات چیت 1
IVR: Hello! How can I help you today?
User: I want to check my account balance.
IVR: ضرور۔ مجھے کون سا اکاؤنٹ نکالنا چاہئے؟
User: Checking.
IVR: اکاؤنٹ نمبر کیا ہے؟
User: 1111 2222 3333 4444
IVR: For verification purposes, what is your date of birth?
User: Jan 1st 2000.
IVR: Thank you. The balance on your checking account is $123 dollars.
بات چیت 2
IVR: Hello! How can I help you today?
User: I want to check my account balance.
IVR: ضرور۔ مجھے کون سا اکاؤنٹ نکالنا چاہئے؟
User: Savings.
IVR: اکاؤنٹ نمبر کیا ہے؟
User: I want to talk to an agent.
IVR: Ok. Let me transfer the call. An agent should be able to help you with your request.
In the sample conversations, the IVR requests the account type, account number, and date of birth to process the caller’s requests. In this post, we review how to use the grammars to collect the information and postprocess it with ECMA scripts. The grammars for account ID and date cover multiple ways to provide the information. We also review the grammar in case the caller can’t provide the requested details (for example, their savings account number) and instead opts to speak with an agent.
Build an Amazon Lex chatbot with grammars
We build an Amazon Lex bot with intents to perform common retail banking functions such as checking account balance, transferring funds, and ordering checks. The CheckAccountBalance
intent collects details such as account type, account ID, and date of birth, and provides the balance amount. We use a grammar slot type to collect the account ID and date of birth. If the caller doesn’t know the information or asks for an agent, the call is transferred to a human agent. Let’s review the grammar for the account ID:
The grammar has two rules to parse user input. The first rule interprets the digits provided by the caller. These digits are appended to the output via an ECMA script tag variable (out
). The second rule manages the dialog if the caller wants to talk to an agent
. اس معاملے میں out
tag is populated with the word agent. After the rules are parsed, the out tag carries the account number (out.AccountNumber
) or the string agent
. The downstream business logic can now use the out
tag handle the call.
ایمیزون لیکس بوٹ کا نمونہ لگائیں۔
نمونہ بوٹ بنانے اور گرامر شامل کرنے کے لیے، درج ذیل مراحل کو انجام دیں۔ یہ ایک ایمیزون لیکس بوٹ بناتا ہے جسے کہا جاتا ہے۔ BankingBot
, and two grammar slot types (accountNumber
, dateOfBirth
).
- ڈاؤن لوڈ، اتارنا ایمیزون لیکس بوٹ.
- ایمیزون لیکس کنسول پر، منتخب کریں۔ عوامل، پھر منتخب کریں درآمد کریں.
- فائل کا انتخاب کریں۔
BankingBot.zip
جسے آپ نے ڈاؤن لوڈ کیا، اور منتخب کریں۔ درآمد کریں. In the IAM Permissions section, for Runtime role, choose ایک نیا کردار بنائیں with basic Amazon Lex permissions. - بوٹ کا انتخاب کریں۔
BankingBot
ایمیزون لیکس کنسول پر۔ - Download the XML files for accountNumber اور dateOfBirth. (Note: In some browsers you will have to “Save the link” to download the XML files)
- Amazon S3 کنسول پر، XML فائلیں اپ لوڈ کریں۔
- Navigate to the slot types on the Amazon Lex console, and click on the
accountNumber
سلاٹ کی قسم - In the slot type grammar select the S3 bucket with the XML file and provide the object key. Click on سلاٹ کی قسم کو محفوظ کریں۔.
- Navigate to the slot types on the Amazon Lex console, and click on the
dateOfBirth
سلاٹ کی قسم - In the slot type grammar select the S3 bucket with the XML file and provide the object key. Click on سلاٹ کی قسم کو محفوظ کریں۔.
- After the grammars are saved, choose تعمیر.
- سپورٹنگ ڈاؤن لوڈ کریں۔ او ڈبلیو ایس لامبڈا۔ and Navigate to the AWS Lambda console.
- On the create function page select شروع سے مصنف. As basic information please provide the following: فنکشن کا نام
BankingBotEnglish
، اور رن ٹائمPython 3.8
. - پر کلک کریں فنکشن بنائیں۔ In the Code source section, open
lambda_funciton.py
اور حذف the existing code. لوڈ the code and open it in a text editor. کاپی کریں اور چسپاں کریں the code into the emptylambda_funciton.py
ٹیب. - میں سے انتخاب کریں تعینات
- Navigate to the Amazon Lex Console and select
BankingBot
ہے. پر کلک کریں تعیناتی اور پھر علیحدگی اس کے بعدTestBotAlias
- پر علیحدگی صفحہ منتخب کریں۔ زبانوں اور پر جائیں انگریزی (امریکہ).
- کے لئے ذرائع منتخب
BankingBotEnglish
، کے لئے لیمبڈا ورژن یا عرف منتخب$LATEST
- Navigate to the Amazon Connect console, choose رابطہ بہاؤ.
- ڈاؤن لوڈ، اتارنا رابطہ بہاؤ ایمیزون لیکس بوٹ کے ساتھ ضم کرنے کے لیے۔
- In the Amazon Lex section, select your Amazon Lex bot and make it available for use in the Amazon Connect contact flows.
- اسے ایپلیکیشن میں لوڈ کرنے کے لیے رابطہ کا بہاؤ منتخب کریں۔
- Make sure the right bot is configured in the “Get Customer Input” block. Add a phone number to the contact flow.
- "کام کرنے والی قطار سیٹ کریں" بلاک میں ایک قطار کا انتخاب کریں۔
- فون نمبر پر کال کرکے IVR کے بہاؤ کی جانچ کریں۔
- Test the solution.
حل کی جانچ کریں۔
You can call in to the Amazon Connect phone number and interact with the bot. You can also test the solution directly on the Amazon Lex V2 console using voice and DTMF.
نتیجہ
Custom grammar slots provide the ability to collect different types of information in a conversation. You have the flexibility to capture transitions such as handover to an agent. Additionally, you can postprocess the information before running the business logic. You can enable grammar slot types via the Amazon Lex V2 console or AWS SDK. The capability is available in all AWS Regions where Amazon Lex operates in the English (Australia), English (UK), and English (US) locales.
مزید جاننے کے لیے رجوع کریں۔ حسب ضرورت گرائمر سلاٹ کی قسم کا استعمال کرنا. You can also view the Amazon Lex documentation for SRGS or ECMAScript مزید معلومات کے لیے.
مصنفین کے بارے میں
کائی لوریک ایک پیشہ ور خدمات Amazon Connect کنسلٹنٹ ہے۔ وہ توسیع پذیر کسٹمر کے تجربے کے حل کو ڈیزائن اور لاگو کرنے پر کام کرتا ہے۔ اپنے فارغ وقت میں، وہ کھیل، سنو بورڈنگ، یا پہاڑوں میں پیدل سفر کرتے ہوئے پایا جا سکتا ہے۔
ہرشل پمپلکھوٹے۔ is a Product Manager on the Amazon Lex team. He spends his time trying to get machines to engage (nicely) with humans.
- "
- 100
- 9
- اکاؤنٹ
- ایجنٹ
- تمام
- ایمیزون
- رقم
- درخواست
- آسٹریلیا
- دستیاب
- AWS
- بینکنگ
- شروع
- بلاک
- بوٹ
- تعمیر
- کاروبار
- فون
- کالر
- قبضہ
- جانچ پڑتال
- چیک
- میں سے انتخاب کریں
- کوڈ
- جمع
- جمع
- کامن
- کنسول
- کنسلٹنٹ
- رابطہ کریں
- کنٹرول
- بات چیت
- مکالمات
- پیدا
- اپنی مرضی کے
- گاہک کا تجربہ
- کسٹمر سپورٹ
- ڈیزائننگ
- مختلف
- ہندسے
- براہ راست
- نہیں کرتا
- ڈالر
- ایڈیٹر
- موثر
- کو چالو کرنے کے
- انگریزی
- مثال کے طور پر
- باہر نکلیں
- تجربہ
- پہلا
- لچک
- بہاؤ
- کے بعد
- فارمیٹ
- ملا
- تقریب
- فنڈز
- مدد
- کس طرح
- کیسے
- HTTPS
- انسانی
- انسان
- معلومات
- ان پٹ
- انشورنس
- ضم
- ارادے
- انٹرایکٹو
- IT
- کلیدی
- زبان
- جانیں
- LINK
- لوڈ
- مشینیں
- مینیجر
- ماڈل
- زیادہ
- ایک سے زیادہ
- تعداد
- کھول
- پوائنٹ
- پالیسی
- عمل
- مصنوعات
- پیشہ ورانہ
- فراہم
- فراہم کرتا ہے
- عوامی
- مقاصد
- درخواست
- درخواستوں
- کی ضرورت
- جواب
- خوردہ
- کا جائزہ لینے کے
- روٹ
- قوانین
- چل رہا ہے
- توسیع پذیر
- sdk
- سروس
- سروسز
- مقرر
- سادہ
- So
- حل
- حل
- کچھ
- خاص طور پر
- اسپورٹس
- شروع کریں
- درجہ
- ذخیرہ
- ذخیرہ
- حمایت
- امدادی
- سسٹمز
- بات
- ٹیم
- ٹیسٹ
- وقت
- آج
- منتقل
- منتقل
- منتقلی
- عام طور پر
- Uk
- us
- استعمال کی شرائط
- توثیق
- لنک
- وائس
- W3
- کیا
- کیا ہے
- کے اندر
- کام کر
- کام کرتا ہے
- XML