{"id":1023,"date":"2021-10-13T08:35:21","date_gmt":"2021-10-13T08:35:21","guid":{"rendered":"https:\/\/salarydistribution.com\/machine-learning\/2021\/10\/13\/how-to-approach-conversation-design-getting-started-with-amazon-lex-part-2\/"},"modified":"2021-10-13T08:35:21","modified_gmt":"2021-10-13T08:35:21","slug":"how-to-approach-conversation-design-getting-started-with-amazon-lex-part-2","status":"publish","type":"post","link":"https:\/\/salarydistribution.com\/machine-learning\/2021\/10\/13\/how-to-approach-conversation-design-getting-started-with-amazon-lex-part-2\/","title":{"rendered":"How to approach conversation design: Getting started with Amazon Lex (Part 2)"},"content":{"rendered":"<div id=\"\">\n<p><a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/11\/ML-3119-convo.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29179\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/11\/ML-3119-convo.png\" alt=\"\" width=\"1429\" height=\"360\"><\/a><\/p>\n<p>As you plan your new <a href=\"https:\/\/aws.amazon.com\/lex\/\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon Lex<\/a> application, the following conversation design best practices can help your team succeed in creating a great customer experience. <a href=\"https:\/\/aws.amazon.com\/blogs\/machine-learning\/part-1-approach-conversation-design-the-basics\/\" target=\"_blank\" rel=\"noopener noreferrer\">In our previous post<\/a>, we discussed how to create the foundation for good conversation design. We explored the business value of good conversational design and provided some tips on building a team. We also talked about the importance of identifying use cases to create an informed foundation for your conversational interfaces. Throughout our series, we emphasize the importance of keeping the customer at the focus of your design process\u2014this will improve the customer experience.<\/p>\n<p>In this post, with our foundation established, we review high-level design best practices and how to use them when designing your conversational interfaces. First, we discuss individual steps of the design process, and offer tips on gathering requirements and thinking about the differences between voice and text design. Then we cover individual steps in the design process, including creating sample dialogs, writing prompts, handling errors, and documenting the AI experience. These steps help focus the design of your project and streamline time to production. Throughout, we use examples from retail banking. You can also create your own bot using our self-paced <a href=\"https:\/\/amazonlex.workshop.aws\/banker-bot.html\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon Lex Workshop<\/a>.<\/p>\n<h2>Gather all requirements before designing<\/h2>\n<p>A great design process starts with no design. Take the time to get all the key stakeholders in the same room to discuss your use cases. This includes the customer experience (CX) team and the business or product owner, in addition to developers, subject-matter experts, customer service representatives (CSRs), and contact center supervisors. You need people with varying viewpoints of the business and customer needs. Together, you can gather all the requirements to make your customers successful. A diverse group of stakeholders ensures that you have a variety of perspectives on the future design.<\/p>\n<p>Prepare for the meeting by thinking through a number of questions for your team. Consider both the \u201chappy path\u201d (how the customer can go through the system relatively friction-free) and any places the customer might encounter problems. For example, if your application will process payments, discuss what happens if the customer wants to make that payment outside of the available date window. To verify customer identity, discuss the various ways they can do that (for example, date of birth, personal identification numbers, ZIP code or postal code), and when or if to transfer them to a human agent if they fail.<\/p>\n<p>With that said, you want to create an ideal customer experience for the majority of your customers. The remaining customers may have unique requirements best served by human agents. If you try to design for every customer need, your system will become unmanageable.<\/p>\n<p>With a clear understanding of the overall experience before you start designing, you can reduce time to production, with fewer revisions. It also saves development resource hours, which can save money on your project.<\/p>\n<h2>Design for voice and text<\/h2>\n<p>Before you design, you need to know how your customers will interact with the application. Will they be speaking, typing, or both? Designing for voice and text have different challenges.<\/p>\n<p>Let\u2019s think about presenting information in voice first. Voice design must occur in a sequential order, because customers can\u2019t skip around between pieces of information or skim what they\u2019re hearing. This sequencing means that the words customers hear must occur in an order that is logical to the customer. Additionally, providing the customer with too much information all at once could result in cognitive overload\u2014giving the customer so much information that they can\u2019t remember everything.<\/p>\n<p>A text interface, alternatively, lets customers take their time to read or skim, and they can skip around as they take in the information. But cognitive overload can happen in text as well. You don\u2019t want your system delivering extra-long prompts. The length of one message shouldn\u2019t exceed the amount of space visible to customers without scrolling. Using multiple text bubbles or message groups can help with this, but don\u2019t overuse them. If the application sends several messages all at once and the customer still has to scroll, it degrades the customer experience.<\/p>\n<p>In terms of recognition, voice and text have different paths. For voice, the system first uses an automated speech recognition (ASR) system to transcribe the speech to text. Next, the text is provided to the natural language understanding (NLU). In a text-based system, the typed words go directly to the NLU. The extra step for voice can involve more difficulties, but you can account for these in the design (see the later section on handling errors).<\/p>\n<p>You can consider using a single application for both voice and text. Keep in mind that customers may need to receive the information in different presentation styles. For example, a list format in a text window doesn\u2019t read well in voice. A paragraph of payment summary details is understandable in voice, but may make finding the important details difficult in text. You can use <a href=\"https:\/\/docs.aws.amazon.com\/lex\/latest\/dg\/context-mgmt-session-attribs.html\" target=\"_blank\" rel=\"noopener noreferrer\">session attributes<\/a> to have Amazon Lex provide the correct prompt to the customer. This allows you to have the same macro structure of the interaction flow while targeting voice and text customers separately.<\/p>\n<h2>Create sample dialogs and review to ensure alignment<\/h2>\n<p>With all the requirements gathered and a decision on the interaction type, it\u2019s time to write. From your use cases\u2014the tasks your customers can accomplish in your application\u2014you can create sample dialogs. These dialogs help you and your stakeholders better understand how customers will interact with the application. Use the requirements you gathered earlier to create multiple scenarios. Your dialogs should include at least one happy path per use case and other exchanges that are more error-prone. However, these aren\u2019t meant to be exhaustive documentation of every possible flow or error scenario. These are high-level snapshots into various customer exchanges. After you\u2019re written these samples, take them back to your stakeholders. Again, it\u2019s ideal to meet with everyone who was involved in the requirements gathering. If you can\u2019t get everyone, be sure to invite the primary CX stakeholders and have the full list of requirements for reference.<\/p>\n<p>The following is sample dialog for a customer changing their direct debit account.<\/p>\n<table border=\"1px\">\n<tbody>\n<tr>\n<td><span>Turn<\/span><\/td>\n<td><span>Participant<\/span><\/td>\n<td><span>Dialog<\/span><\/td>\n<td><span>Notes<\/span><\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>Amazon Lex<\/td>\n<td>Thanks for contacting Your Favorite Loan Company. What can I help you with today?<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>Customer<\/td>\n<td>I wanna set up a recurring payment.<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>Amazon Lex<\/td>\n<td>Your current balance is [$200.00]. That includes an overdue balance of [$100.00]. A payment of [$200.00] is due on October 15th. To set up a recurring payment, you\u2019ll need the routing number and the account number. Do you have that information ready?<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>Customer<\/td>\n<td>No<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>Amazon Lex<\/td>\n<td>Okay. I can wait. Let me know when you have the information.<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>Customer<\/td>\n<td>\u2026<br \/>I\u2019m ready.<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>Amazon Lex<\/td>\n<td>To start, what\u2019s the 9-digit routing number?<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>Customer<\/td>\n<td>999-999-999<\/td>\n<td>Verify against checksum list<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>Amazon Lex<\/td>\n<td>And what\u2019s the account number?<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>Customer<\/td>\n<td>1234 567 890<\/td>\n<\/tr>\n<tr>\n<td>\u2026<\/td>\n<td>\u2026<\/td>\n<td>\u2026<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Reviewing the dialogs at this early phase has two benefits. First, you can confirm that you have understood and captured all of the requirements. It\u2019s important to verify this before doing most of the design construction. Second, you have a variety of perspectives reviewing your work. Take this time to workshop difficult ideas and improve the design.<\/p>\n<p>After you have sign-off from the business on the sample dialogs, you should ensure that your prompts will elicit the responses that you\u2019re expecting. Clear, concise, and unambiguous prompts may be the most important step in creating a natural-sounding and intuitive conversational interface.<\/p>\n<h2>Write prompts conversationally<\/h2>\n<p>The first draft of your sample dialogs doesn\u2019t need to have finalized wording. This is a starting point. All good writing goes through multiple drafts, so have a working session\u2014or multiple sessions\u2014on prompt wording. Keep the audience limited to your primary CX stakeholders. These sessions shouldn\u2019t only focus on the words the customer will see or hear, but also on how the customer may respond.<\/p>\n<p>The first and most important goal is to avoid ambiguity. Ambiguity can arise in many forms, like \u201cDo you want to continue, cancel, or start over?\u201d This question doesn\u2019t seem like it\u2019s ambiguous. In voice, the customer could hear, \u201cDo you want to continue\u2026\u201d and reply, \u201cYes\u201d before the bot finishes. If the application isn\u2019t expecting \u201cYes\u201d as a response, this can lead to issues. Ultimately, the goal is to focus on being clear and thinking through how a customer could respond.<\/p>\n<p>Second, provide customers with information as concisely as possible. When identifying a customer, you may want to let them know they\u2019ve been successful. You have choices. Your application can be verbose: \u201cThank you. We have matched that information to the information on record in your account.\u201d Your application can be terse: \u201cThanks.\u201d Or the response can be some length between the two examples. You need to choose what makes the most sense for your brand and your application\u2019s personality. However, long, clunky responses to short answers are part of the reason why AI interfaces sound mechanical and not conversational. While we don\u2019t want to mask the fact that the customer is interacting with AI, it can still be conversationally.<\/p>\n<p>Third, provide customers with only the information they need to know. For example, a customer calls, and the application doesn\u2019t recognize the customer\u2019s phone number. We don\u2019t need to tell the customer, \u201cI don\u2019t recognize the number you\u2019re calling from.\u201d The customer likely knows that the number doesn\u2019t match. If customers are identified by their phone number, you can ask, \u201cWhat\u2019s the phone number on your account?\u201d This interaction implicitly acknowledges that the system didn\u2019t match the phone number while attempting to gather the necessary information.<\/p>\n<p>Additionally, the wording should sound like a natural conversational exchange and not like a piece of formal writing. It\u2019s okay to use phrasing that doesn\u2019t follow strict grammar rules. For example, in natural, native US English, people regularly split infinitives (\u201cto not go\u201d), end sentences with prepositions (\u201cWho\u2019s that going to?\u201d), and start sentences with conjunctions (\u201cAnd where do you think you\u2019re going?\u201d). Use contractions (\u201ccan\u2019t\u201c), even contractions that aren\u2019t technically correct grammar (for example, \u201cwhat\u2019re\u201d for \u201cwhat are\u201d in voice), unless this contradicts your brand attributes and your <a href=\"https:\/\/developer.amazon.com\/blogs\/alexa\/post\/1884bc03-66f0-49ea-819b-e5db6407ec68\/hear-it-from-a-skill-builder-how-to-create-a-persona-for-your-alexa-skill\" target=\"_blank\" rel=\"noopener noreferrer\">system personality<\/a>. Even if unacceptable in traditional writing, using common speech patterns makes the application sound more natural and conversational in any language or dialect.<\/p>\n<p>Finally, be flexible. After you have your wording in draft form, say it out loud\u2014even if your application is text-based. Does it sound natural? If your team is using an <a href=\"https:\/\/aws.amazon.com\/polly\/\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon Polly<\/a> voice, sign in to the Amazon Polly console and test the prompts. If it doesn\u2019t sound natural, you can update the wording. You can also modify the speed, style, and other attributes using <a href=\"https:\/\/docs.aws.amazon.com\/polly\/latest\/dg\/supportedtags.html\" target=\"_blank\" rel=\"noopener noreferrer\">SSML markup<\/a>. Going through this practice may lead to wording changes. If you need the legal department to review the wording, test your wording before you submit it for approval. That way, you won\u2019t need to ask legal for approval twice.<\/p>\n<p>For additional tips, see our posts on writing great prompts for <a href=\"https:\/\/developer.amazon.com\/en-US\/blogs\/alexa\/alexa-skills-kit\/2019\/06\/writing-great-prompts-for-built-in-slots\" target=\"_blank\" rel=\"noopener noreferrer\">built-in slots<\/a> and <a href=\"https:\/\/developer.amazon.com\/en-US\/blogs\/alexa\/alexa-skills-kit\/2019\/07\/guiding-users-with-successful-alexa-prompts-for-custom-slots\" target=\"_blank\" rel=\"noopener noreferrer\">custom slots<\/a>.<\/p>\n<h2>Handle errors<\/h2>\n<p>What happens when your customer starts describing their dog\u2019s latest toy to your banking bot? What happens when your customer wants to pay less than the minimum amount due?<\/p>\n<p>You need to account for these scenarios when possible. The first example involves customer input that doesn\u2019t correlate to a defined intent. These phrases can be treated as a \u201cno match,\u201d that is, a phrase that the application\u2019s NLU isn\u2019t trained on. With Amazon Lex, you can use the <a href=\"https:\/\/docs.aws.amazon.com\/lex\/latest\/dg\/built-in-intent-fallback.html\" target=\"_blank\" rel=\"noopener noreferrer\">built-in fallback intent<\/a>. The fallback intent gives your customer a second try to provide their intent. You want to write prompts for the fallback intent that guide your customers toward providing responses that your application can handle.<\/p>\n<p>Error scenarios beyond no matches may take more consideration. You likely already know some situations where your customers will fail. To account for these scenarios, consider the following:<\/p>\n<ul>\n<li>Where the customer can fail<\/li>\n<li>What help the application can provide to help the customer be successful<\/li>\n<li>How to ensure that the customer doesn\u2019t get caught in an endless help-loop<\/li>\n<\/ul>\n<p>For a minimum payment amount, what wording will you use if the customer offers a lower amount? How many tries will you let the customer have before removing them from the flow? And then will you transfer those customers, disconnect them, or take them back to a main menu? These are all examples of questions you need to ask.<\/p>\n<p>With all error messaging, you want to ensure that the application wording aligns with your brand and the application\u2019s personality. If you don\u2019t, customers will notice, and they can find these experiences jarring.<\/p>\n<p>Well-crafted error handling improves customer experience. It helps increase caller containment and decrease call abandonment. And although the term \u201cerror handling\u201d implies difficulties, it should be viewed as helping the customer. Ultimately, you want to improve your customer\u2019s experience, and customers need flows that help them through difficult points.<\/p>\n<h2>Document and manage content<\/h2>\n<p>Now, you\u2019ve created your sample dialogs, determined your error scenarios, and gotten approval. It\u2019s time for the rest of the documentation.<\/p>\n<p>First, create a flow diagram. This is a more detailed view of the interaction paths for your customer. The flow should include all happy paths in addition to specific error handling scenarios. You can optionally include some or all application wording for the interactions, or you can label the shapes in the flow to relate to corresponding documentation.<\/p>\n<p>The following is a flow diagram of a payment confirmation.<\/p>\n<p><a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/11\/ML-3119-img1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29180\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/11\/ML-3119-img1.png\" alt=\"\" width=\"790\" height=\"607\"><\/a><\/p>\n<p>You also want to have a list of all the prompts. Set this up as a key-value pair (here, the key is the prompt label and the value is the wording). You want multiple versions of the prompts for the dynamic reprompting discussed previously. Your label for these prompts should indicate which version of the prompt should be used for each attempt.<\/p>\n<p>If you need outside approval\u2014for example, from copywriting or legal\u2014for some or all of the prompt wording in the application, now is the time to have that conversation. At this point, your application flows are documented, your development team is hard at work, and going back to change the wording won\u2019t significantly impact development time.<\/p>\n<p>Finally, make sure that your documents include a change log. This is a section or a page that documents the changes that were made and how they\u2019re marked in the document. The log can include who made the changes, the date the new document was released, prose description of the changes, possibly internal hyperlinks to those changes, and any highlighting or coloring used to show the changes. If you have multiple people working on a document at the same time, make sure that you have a way to maintain version control, so there\u2019s no chance to overwrite someone else\u2019s changes.<\/p>\n<h2>Conclusion<\/h2>\n<p>As you design your conversational AI application, keep these aspects of conversational design in mind. With these best practices, you\u2019ll be better equipped to design your application in an efficient way that delights your customers. You\u2019ll be able to streamline your development cycle to achieve faster launch times. And you\u2019ll have the entire experience well documented for reference and updates as your application changes over time.<\/p>\n<p>In the final post in our series, we discuss how to take the foundational elements from our first two posts and translate it into Amazon Lex. We specifically discuss the interaction model, and prototyping, testing, and tuning your application.<\/p>\n<p>We at <a href=\"https:\/\/aws.amazon.com\/professional-services\/\" target=\"_blank\" rel=\"noopener noreferrer\">AWS Professional Services<\/a> and our extensive <a href=\"https:\/\/aws.amazon.com\/partners\/\" target=\"_blank\" rel=\"noopener noreferrer\">AWS Partner Network<\/a> are available to help you and your team through the process. Whether you only need consultation and advice, or need full access to a designer, our goal is to help you achieve the best conversational interface for you and your customers.<\/p>\n<p>For more information on Amazon Lex and getting started with AWS for conversational interface experiences, check out our <a href=\"https:\/\/aws.amazon.com\/lex\/resources\/?nc=sn&amp;loc=5&amp;amazon-lex-whats-new.sort-by=item.additionalFields.postDateTime&amp;amazon-lex-whats-new.sort-order=desc\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon Lex resources<\/a>.<\/p>\n<hr>\n<h3>About the Authors<\/h3>\n<p><strong><a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/09\/15\/Rosie-Connolly.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-28198 alignleft\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/09\/15\/Rosie-Connolly.png\" alt=\"\" width=\"100\" height=\"89\"><\/a>Rosie Connolly<\/strong>\u00a0is a Conversation Designer with the AWS Professional Services Natural Language AI team. A linguist by training, she has worked with language in some form for over 15 years. When she\u2019s not working with customers, she enjoys running, reading, and dreaming of her future on American Ninja Warrior<\/p>\n<p><strong><a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/09\/15\/Nancy-Clarke.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-28180 alignleft\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/09\/15\/Nancy-Clarke.jpg\" alt=\"\" width=\"100\" height=\"133\"><\/a>Nancy Clarke<\/strong>\u00a0is a Conversation Designer with the AWS Professional Services Natural Language AI team. When she\u2019s not at her desk, you\u2019ll find her gardening, hiking, or re-reading the Lord of the Rings for the billionth time.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-16190 alignleft\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2020\/09\/23\/ClaireMitchell.jpg\" alt=\"\" width=\"100\" height=\"133\"><strong>Claire Mitchell\u00a0<\/strong>is a Design Strategy Lead with the AWS Professional Services AWS Professional Services Emerging Technologies Intelligence Practice\u2014Solutions team. Occasionally she spends time exploring speculative design practices, textiles, and playing the drums.<\/p>\n<p>       <!-- '\"` -->\n      <\/div>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/aws.amazon.com\/blogs\/machine-learning\/part-2-how-to-approach-conversation-design-getting-started-with-amazon-lex\/<\/p>\n","protected":false},"author":0,"featured_media":1024,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/posts\/1023"}],"collection":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/comments?post=1023"}],"version-history":[{"count":0,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/posts\/1023\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/media\/1024"}],"wp:attachment":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/media?parent=1023"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/categories?post=1023"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/tags?post=1023"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}