Connect with us


Increase your machine learning success with AWS ML services and AWS Machine Learning Embark

This is a guest post from Mikael Graindorge, Sales Operations Leader at Thermo Fisher Scientific. In the life sciences industry, data is growing in abundance and is getting increasingly complex, which makes it challenging to use traditional analytics methodologies. At Thermo Fisher Scientific, our mission is to make the world healthier, cleaner, and safer, and…



This is a guest post from Mikael Graindorge, Sales Operations Leader at Thermo Fisher Scientific.

In the life sciences industry, data is growing in abundance and is getting increasingly complex, which makes it challenging to use traditional analytics methodologies. At Thermo Fisher Scientific, our mission is to make the world healthier, cleaner, and safer, and to realize this vision, we need to make optimal decisions by extracting insights from the large volume and variety of data available to us. To do this effectively, we need to empower team members with machine learning (ML) skills so we can achieve our vision as an organization.

ML, as a capability, has the transformative power to enable people from all backgrounds to effectively use data in their decision-making processes. However, using ML isn’t the same thing as using ML effectively. To share an analogy, having access to a kitchen doesn’t necessarily mean you can cook well. There is a big difference between making food and cooking a tasty meal. It takes training and experience to concoct something that most people would agree tastes amazing. And ML isn’t that different. With training and experience, we can build the necessary skills to apply ML to various businesses and operational needs within an organization.

In this post, we start by looking at the prerequisites necessary for ML novices to undertake the journey, and the steps necessary to build confidence and proficiency. To start the journey, you don’t need experience in ML nor have advanced statistical background. If you have an open mind, and an appetite and willingness to learn new ways to process information, you’re ready to start.

To begin the journey at Thermo Fisher Scientific, we got help from the AWS Machine Learning Embark program, which provides a structured pathway to learn ML. The program includes a discovery workshop, business leader training, technical training, and a hands-on proof of concept solution that our team developed alongside ML experts from AWS. AWS ML Embark provides the training necessary to build your foundational knowledge, establish processes for success, and launch your very first ML solution.

What does it take to use machine learning?

You should know two important things before getting started with building ML solutions. First, developing an ML solution isn’t just limited to software engineers and scientists with years of experience in the field. Second, the ML solution development process consists of several steps, requiring people from many backgrounds to jump in and contribute at various points along the way. Depending on your individual background, you may need to level-set on certain skills more than others.

Many professions are involved with data processing, from business analysts to data engineers or even data scientists. Building comprehensive AI/ML solutions often requires a multi-functional team that consists of business leaders, scientists, and engineers. Typical roles required to support the full lifecycle of AI/ML solutions are shown in the following diagram. However, these roles all share something in common: data. As long as you build and use your technical skills around your subject matter expertise, possess in-depth knowledge of your input data, and have a good understanding of the required business output, developing ML solutions simply becomes a process, with steps to follow, just like a recipe.

Craftsmanship over passion

AWS offers a variety of tools and recommendations necessary to become a successful ML professional. However, the ones that truly succeed are those who come with a craftsman’s mindset, so you can develop and continue to refine a valuable skillset. In other words, although it’s easy to start and get short-term wins, success comes to those who invest time and effort to truly hone their skills.

As an ML professional, you can accomplish many tasks by using the datasets available to you within your organization. Solutions that you develop may empower the organization to save money, drive productivity gains, improve customer experience, or simply expand the boundaries of your knowledge. You need to determine which of these reasons will be your drivers to succeed with AI/ML.

Increase your chance of success with the AWS ML Embark program

To hit the ground running, you need to know where to start and get a perspective about the journey ahead. Teams struggle to launch ML initiatives and get meaningful adoption because they don’t have well-understood and proven patterns to follow. Challenges include identifying the most impactful projects to tackle, and developing the right skills to solve these problems. Without a blueprint for success and data science know-how, projects can stall. Even if you somehow deliver these projects into production, they often fail to catalyze the change you expected because they don’t necessarily align to the right business goals.

The AWS ML Embark program is designed to help teams (and organizations) overcome these common challenges and start on the journey to ML success. By working backwards through an interactive workshop, business and technical leaders in the organization come together to jointly identify business opportunities and specific use cases in which ML can have meaningful impact. Then, led by expert instructors from AWS, the technical training sessions ramp up attendee’s ML skills through introducing practical applications, and business enablement sessions, designed specifically for business leaders, dive into strategic topics on how to successfully lead ML initiatives and build an AI-powered organization. Lastly, to add some fun to the practical learning, the program also includes an optional corporate AWS DeepRacer event to excite the broader technical staff to embrace ML through hands-on training and racing fully autonomous 1/18th scale race cars.

The AWS ML Embark program’s technical training, developed by Amazon’s own Machine Learning University, covers major topics in ML that you need to get started. Over the course of the training, you gain hands-on experience and learn from the basic to complex neural networks. Through an interactive classroom setting, you have the unique opportunity to learn (or relearn) different ML approaches with a multitude of applicable use cases. The AWS ML Embark program offers a safe environment to practice, fail, and gain experience that will pave your ML journey. The training helps individuals and teams to build a culture of learning and collaboration.

Adopt a framework for success

Looking back, it’s clear to me that it would have taken us a lot longer to get started without the perspectives brought by instructors of the AWS ML Embark program. The program offered helpful information and inspired our new ML professionals to take on AI/ML projects, advance their careers, and discover new horizons. But don’t just take it from me; here is a quote from one of the engineers who took the training:

I really liked the ML Embark training and I benefited greatly from it. I was able to directly apply the methodology and even the exact ML Python code from the training to my forecasting project at work. For example, I used the code for KNN, linear regression, logistic regression, and decision tree from the training class. By doing so, I have a deeper understanding about ML. This training has saved me hours and even days of time by demonstrating the most cutting-edge tools and options for ML. The trainers are very proficient and patient to help us and they are top notch in their fields. I deeply appreciate that our organization gave us the opportunity to participate in the training, thanks for organizing the event!!!

As a manager and mentor, I took an additional step to combine AWS ML Embark learnings with my adaptation of the CRoss Industry Standard Process for Data Mining (CRISP-DM) framework. This approach helped us break down ML projects into the following manageable steps and speed up project delivery:

  • Understanding the “why” – Gathering the motivation behind the initiative and the outcomes and benefits expected to be achieved at the end of the project
  • Data preparation – Identifying and collecting data, including any data cleansing, enrichment, and preparation necessary to efficiently and accurately train and validate ML models
  • Modeling – Training, testing, and tuning ML models
  • Measuring success – Evaluating model outputs against original business goals, and depending on the results, productionizing the solution or going back to refine the approach and try again
  • Documentation and production – Developing the process necessary to summarize the project to share with technical leadership and non-technical business stakeholders, including technical documentation and storytelling for the outputs

Although the exact process depends on your specific requirements, this process should fit most scenarios. The key is having the right data and understanding it—this will likely be the main reason for why your own ML project succeeds or fails.

Flying on your own as an ML professional

After you complete the AWS ML Embark training, you can begin building your ML solution. With AWS, you can take advantage of the broadest and deepest set of AI/ML services, and the supporting cloud infrastructure:

  • Amazon Simple Storage Service (Amazon S3) provides scalable storage for your data lake and training data, running with AWS data analytics services such as AWS Glue and Amazon Athena.
  • Services such as AWS Lambda and AWS Step Functions provide tools to move data in and out of your ML workflow and orchestrate model training and deployment processes.
  • Depending on the use case, for many AI-powered applications such as forecasting and personalization, you can use the fully managed and easy-to-use AI services from AWS such as Amazon Forecast and Amazon Personalize.
  • For use cases that require custom ML model development, you can use Amazon SageMaker to build, train, and deploy ML models at scale. SageMaker removes the complexity of many steps in the ML workflow; for example, you can use SageMaker Data Wrangler for preprocessing, and SageMaker Pipelines for automation. The SageMaker ecosystem allows developers, engineers, and scientists to accelerate ML development and adoption.

The AWS ML Embark program introduces you to these services and gets you started with the AWS AI/ML landscape.

Before you get started with AWS services, the key to unlocking the potential of ML is to understand the business problem and available data, and then formulate the business problem into an appropriate ML problem. Each ML problem formulation is unique and requires an understanding of what the output of the ML model will be, and how it will be evaluated. AWS ML Embark gives you the training to translate your business problem into an ML problem, and assess the cost of errors from your ML model in order to set clear and quantifiable measures of success.

The last factor to consider when building your solution is how to determine whether your model achieves the right value for your business. ML model inputs, loss functions, and optimization parameters are covered during the AWS ML Embark training, but result interpretation and measure of success is unique to your specific use case. Therefore, my recommendation is to take the time at the beginning of the project to understand your input data, while setting clear and quantifiable measures of success. This will eliminate personal bias and opinions from project implementation, enable you to experiment quickly with different ML approaches, and find the right solution for your business.

Getting aspiring ML professionals started with AWS AI/ML

When you’re ready to get started, you can pick from several options. For beginners, we recommended two paths: AWS AI services such as Forecast and Amazon Personalize for ease of use, and SageMaker as a sandbox environment to learn how to develop custom ML models.

In our case, business intelligence specialists chose the Forecast-based forecasting solution, mainly for its simplicity in implementation. Although the technology was straightforward, the entire architecture had to be very robust because the solution must forecast weekly revenue performance for the upcoming quarters, across hundreds of thousands of customers and product categories, with a relatively high accuracy. Beyond the prediction itself, the process would save hundreds of hours for the sales representatives and their analysts, who could rely on a highly efficient and automated Forecast service.

The team’s expertise with the data and the understanding of implications of the predictions that the ML solution will generate allowed them to quickly focus on setting up the technical environment for the solution. The following diagram is a visual representation of their first project. The team spent a few weeks’ worth of effort and used multiple AWS services. Although the diagram contains multiple steps, it essentially achieves their goal by using five managed AWS services: Step Functions, Lambda, Amazon S3, Forecast, and Amazon Redshift.


The second project, using SageMaker, was assigned to an individual with foundational knowledge of ML and AWS services. Their prior experience enabled them to quickly combine AWS services and develop a custom ML solution. The project had two focus areas: data processing with Step Functions, and behavior predictions with SageMaker.

Step Functions is a serverless function orchestrator that makes it easy to sequence Lambda functions and create event-driven workflows defined by business logic. In our case, we used Step Functions to centralize, orchestrate, and enrich over 20 data sources, thereby eliminating the need for manual data preparation. We set up SageMaker ML batch inference to start making predictions after data is preprocessed with Step Functions and placed by Lambda functions into S3 buckets. Currently, this simple process generates hundreds of thousands of predictions used within our organization.

Although the details and the use case of this custom ML solution are proprietary to our business, we believe that this AWS architecture (as shown in the following diagram) is simple and can be easily adopted for different types of ML applications. Unlike the Forecast-based project, this approach centralized the level of effort around the data, where rigorous measures of success must be put in place in order to ensure the validity of the solutions.


AWS ML Embark and AWS services offer a comprehensive suite of enablement services and tools to help you develop your career, learn new skills, and develop your craftsmanship. As a business leader, it empowers me with a wide range of solutions to advance my team’s careers while driving innovative solutions for the organization. The path to becoming an ML professional is open to anyone, regardless of your background. For organizations like Thermo Fisher Scientific, it’s the game changer necessary to help our customers continue advancing science.

What about you? Have you been wondering about developing the ML career path at your organization? If so, check out the AWS Machine Learning Embark program. Only then will you know if this can open as many doors for you and your organization as it did for our Thermo Fisher Scientific ML engineers.

About the Author

Mikael Graindorge is a Sales Operations Leader at Thermo Fisher Scientific. His passion is to combine his craftsmanship with modern technology by developing new global solutions to drive sales conversion rates, advance life science research, and enable others to reach their full potential. He is also known for his cooking and carpentry skills, and is committed to lifelong learning. Mikael holds a master’s and a doctorate specialized in digital commerce growth by utilizing cognitive psychology stimulation.


Continue Reading
Click to comment

Leave a Reply

Your email address will not be published.


AWS Week in Review – May 16, 2022

This post is part of our Week in Review series. Check back each week for a quick roundup of interesting news and announcements from AWS! I had been on the road for the last five weeks and attended many of the AWS Summits in Europe. It was great to talk to so many of you…




This post is part of our Week in Review series. Check back each week for a quick roundup of interesting news and announcements from AWS!

I had been on the road for the last five weeks and attended many of the AWS Summits in Europe. It was great to talk to so many of you in person. The Serverless Developer Advocates are going around many of the AWS Summits with the Serverlesspresso booth. If you attend an event that has the booth, say “Hi ” to my colleagues, and have a coffee while asking all your serverless questions. You can find all the upcoming AWS Summits in the events section at the end of this post.

Last week’s launches
Here are some launches that got my attention during the previous week.

AWS Step Functions announced a new console experience to debug your state machine executions – Now you can opt-in to the new console experience of Step Functions, which makes it easier to analyze, debug, and optimize Standard Workflows. The new page allows you to inspect executions using three different views: graph, table, and event view, and add many new features to enhance the navigation and analysis of the executions. To learn about all the features and how to use them, read Ben’s blog post.

Example on how the Graph View looks

Example on how the Graph View looks

AWS Lambda now supports Node.js 16.x runtime – Now you can start using the Node.js 16 runtime when you create a new function or update your existing functions to use it. You can also use the new container image base that supports this runtime. To learn more about this launch, check Dan’s blog post.

AWS Amplify announces its Android library designed for Kotlin – The Amplify Android library has been rewritten for Kotlin, and now it is available in preview. This new library provides better debugging capacities and visibility into underlying state management. And it is also using the new AWS SDK for Kotlin that was released last year in preview. Read the What’s New post for more information.

Three new APIs for batch data retrieval in AWS IoT SiteWise – With this new launch AWS IoT SiteWise now supports batch data retrieval from multiple asset properties. The new APIs allow you to retrieve current values, historical values, and aggregated values. Read the What’s New post to learn how you can start using the new APIs.

AWS Secrets Manager now publishes secret usage metrics to Amazon CloudWatch – This launch is very useful to see the number of secrets in your account and set alarms for any unexpected increase or decrease in the number of secrets. Read the documentation on Monitoring Secrets Manager with Amazon CloudWatch for more information.

For a full list of AWS announcements, be sure to keep an eye on the What’s New at AWS page.

Other AWS News
Some other launches and news that you may have missed:

IBM signed a deal with AWS to offer its software portfolio as a service on AWS. This allows customers using AWS to access IBM software for automation, data and artificial intelligence, and security that is built on Red Hat OpenShift Service on AWS.

Podcast Charlas Técnicas de AWS – If you understand Spanish, this podcast is for you. Podcast Charlas Técnicas is one of the official AWS podcasts in Spanish. This week’s episode introduces you to Amazon DynamoDB and shares stories on how different customers use this database service. You can listen to all the episodes directly from your favorite podcast app or the podcast web page.

AWS Open Source News and Updates – Ricardo Sueiras, my colleague from the AWS Developer Relation team, runs this newsletter. It brings you all the latest open-source projects, posts, and more. Read edition #112 here.

Upcoming AWS Events
It’s AWS Summits season and here are some virtual and in-person events that might be close to you:

You can register for re:MARS to get fresh ideas on topics such as machine learning, automation, robotics, and space. The conference will be in person in Las Vegas, June 21–24.

That’s all for this week. Check back next Monday for another Week in Review!

— Marcia


Continue Reading


Personalize your machine translation results by using fuzzy matching with Amazon Translate

A person’s vernacular is part of the characteristics that make them unique. There are often countless different ways to express one specific idea. When a firm communicates with their customers, it’s critical that the message is delivered in a way that best represents the information they’re trying to convey. This becomes even more important when…




A person’s vernacular is part of the characteristics that make them unique. There are often countless different ways to express one specific idea. When a firm communicates with their customers, it’s critical that the message is delivered in a way that best represents the information they’re trying to convey. This becomes even more important when it comes to professional language translation. Customers of translation systems and services expect accurate and highly customized outputs. To achieve this, they often reuse previous translation outputs—called translation memory (TM)—and compare them to new input text. In computer-assisted translation, this technique is known as fuzzy matching. The primary function of fuzzy matching is to assist the translator by speeding up the translation process. When an exact match can’t be found in the TM database for the text being translated, translation management systems (TMSs) often have the option to search for a match that is less than exact. Potential matches are provided to the translator as additional input for final translation. Translators who enhance their workflow with machine translation capabilities such as Amazon Translate often expect fuzzy matching data to be used as part of the automated translation solution.

In this post, you learn how to customize output from Amazon Translate according to translation memory fuzzy match quality scores.

Translation Quality Match

The XML Localization Interchange File Format (XLIFF) standard is often used as a data exchange format between TMSs and Amazon Translate. XLIFF files produced by TMSs include source and target text data along with match quality scores based on the available TM. These scores—usually expressed as a percentage—indicate how close the translation memory is to the text being translated.

Some customers with very strict requirements only want machine translation to be used when match quality scores are below a certain threshold. Beyond this threshold, they expect their own translation memory to take precedence. Translators often need to apply these preferences manually either within their TMS or by altering the text data. This flow is illustrated in the following diagram. The machine translation system processes the translation data—text and fuzzy match scores— which is then reviewed and manually edited by translators, based on their desired quality thresholds. Applying thresholds as part of the machine translation step allows you to remove these manual steps, which improves efficiency and optimizes cost.

Machine Translation Review Flow

Figure 1: Machine Translation Review Flow

The solution presented in this post allows you to enforce rules based on match quality score thresholds to drive whether a given input text should be machine translated by Amazon Translate or not. When not machine translated, the resulting text is left to the discretion of the translators reviewing the final output.

Solution Architecture

The solution architecture illustrated in Figure 2 leverages the following services:

  • Amazon Simple Storage Service – Amazon S3 buckets contain the following content:
    • Fuzzy match threshold configuration files
    • Source text to be translated
    • Amazon Translate input and output data locations
  • AWS Systems Manager – We use Parameter Store parameters to store match quality threshold configuration values
  • AWS Lambda – We use two Lambda functions:
    • One function preprocesses the quality match threshold configuration files and persists the data into Parameter Store
    • One function automatically creates the asynchronous translation jobs
  • Amazon Simple Queue Service – An Amazon SQS queue triggers the translation flow as a result of new files coming into the source bucket

Solution Architecture Diagram

Figure 2: Solution Architecture

You first set up quality thresholds for your translation jobs by editing a configuration file and uploading it into the fuzzy match threshold configuration S3 bucket. The following is a sample configuration in CSV format. We chose CSV for simplicity, although you can use any format. Each line represents a threshold to be applied to either a specific translation job or as a default value to any job.

default, 75 SourceMT-Test, 80

The specifications of the configuration file are as follows:

  • Column 1 should be populated with the name of the XLIFF file—without extension—provided to the Amazon Translate job as input data.
  • Column 2 should be populated with the quality match percentage threshold. For any score below this value, machine translation is used.
  • For all XLIFF files whose name doesn’t match any name listed in the configuration file, the default threshold is used—the line with the keyword default set in Column 1.

Auto-generated parameter in Systems Manager Parameter Store

Figure 3: Auto-generated parameter in Systems Manager Parameter Store

When a new file is uploaded, Amazon S3 triggers the Lambda function in charge of processing the parameters. This function reads and stores the threshold parameters into Parameter Store for future usage. Using Parameter Store avoids performing redundant Amazon S3 GET requests each time a new translation job is initiated. The sample configuration file produces the parameter tags shown in the following screenshot.

The job initialization Lambda function uses these parameters to preprocess the data prior to invoking Amazon Translate. We use an English-to-Spanish translation XLIFF input file, as shown in the following code. It contains the initial text to be translated, broken down into what is referred to as segments, represented in the source tags.

Consent Form CONSENT FORM FORMULARIO DE CONSENTIMIENTO Screening Visit: Screening Visit Selección

The source text has been pre-matched with the translation memory beforehand. The data contains potential translation alternatives—represented as tags—alongside a match quality attribute, expressed as a percentage. The business rule is as follows:

  • Segments received with alternative translations and a match quality below the threshold are untouched or empty. This signals to Amazon Translate that they must be translated.
  • Segments received with alternative translations with a match quality above the threshold are pre-populated with the suggested target text. Amazon Translate skips those segments.

Let’s assume the quality match threshold configured for this job is 80%. The first segment with 99% match quality isn’t machine translated, whereas the second segment is, because its match quality is below the defined threshold. In this configuration, Amazon Translate produces the following output:

Consent Form FORMULARIO DE CONSENTIMIENTO CONSENT FORM FORMULARIO DE CONSENTIMIENTO Screening Visit: Visita de selección Screening Visit Selección

In the second segment, Amazon Translate overwrites the target text initially suggested (Selección) with a higher quality translation: Visita de selección.

One possible extension to this use case could be to reuse the translated output and create our own translation memory. Amazon Translate supports customization of machine translation using translation memory thanks to the parallel data feature. Text segments previously machine translated due to their initial low-quality score could then be reused in new translation projects.

In the following sections, we walk you through the process of deploying and testing this solution. You use AWS CloudFormation scripts and data samples to launch an asynchronous translation job personalized with a configurable quality match threshold.


For this walkthrough, you must have an AWS account. If you don’t have an account yet, you can create and activate one.

Launch AWS CloudFormation stack

  1. Choose Launch Stack:
  2. For Stack name, enter a name.
  3. For ConfigBucketName, enter the S3 bucket containing the threshold configuration files.
  4. For ParameterStoreRoot, enter the root path of the parameters created by the parameters processing Lambda function.
  5. For QueueName, enter the SQS queue that you create to post new file notifications from the source bucket to the job initialization Lambda function. This is the function that reads the configuration file.
  6. For SourceBucketName, enter the S3 bucket containing the XLIFF files to be translated. If you prefer to use a preexisting bucket, you need to change the value of the CreateSourceBucket parameter to No.
  7. For WorkingBucketName, enter the S3 bucket Amazon Translate uses for input and output data.
  8. Choose Next.

    Figure 4: CloudFormation stack details

  9. Optionally on the Stack Options page, add key names and values for the tags you may want to assign to the resources about to be created.
  10. Choose Next.
  11. On the Review page, select I acknowledge that this template might cause AWS CloudFormation to create IAM resources.
  12. Review the other settings, then choose Create stack.

AWS CloudFormation takes several minutes to create the resources on your behalf. You can watch the progress on the Events tab on the AWS CloudFormation console. When the stack has been created, you can see a CREATE_COMPLETE message in the Status column on the Overview tab.

Test the solution

Let’s go through a simple example.

  1. Download the following sample data.
  2. Unzip the content.

There should be two files: an .xlf file in XLIFF format, and a threshold configuration file with .cfg as the extension. The following is an excerpt of the XLIFF file.

English to French sample file extract

Figure 5: English to French sample file extract

  1. On the Amazon S3 console, upload the quality threshold configuration file into the configuration bucket you specified earlier.

The value set for test_En_to_Fr is 75%. You should be able to see the parameters on the Systems Manager console in the Parameter Store section.

  1. Still on the Amazon S3 console, upload the .xlf file into the S3 bucket you configured as source. Make sure the file is under a folder named translate (for example, /translate/test_En_to_Fr.xlf).

This starts the translation flow.

  1. Open the Amazon Translate console.

A new job should appear with a status of In Progress.

Auto-generated parameter in Systems Manager Parameter Store

Figure 6: In progress translation jobs on Amazon Translate console

  1. Once the job is complete, click into the job’s link and consult the output. All segments should have been translated.

All segments should have been translated. In the translated XLIFF file, look for segments with additional attributes named lscustom:match-quality, as shown in the following screenshot. These custom attributes identify segments where suggested translation was retained based on score.

Custom attributes identifying segments where suggested translation was retained based on score

Figure 7: Custom attributes identifying segments where suggested translation was retained based on score

These were derived from the translation memory according to the quality threshold. All other segments were machine translated.

You have now deployed and tested an automated asynchronous translation job assistant that enforces configurable translation memory match quality thresholds. Great job!


If you deployed the solution into your account, don’t forget to delete the CloudFormation stack to avoid any unexpected cost. You need to empty the S3 buckets manually beforehand.


In this post, you learned how to customize your Amazon Translate translation jobs based on standard XLIFF fuzzy matching quality metrics. With this solution, you can greatly reduce the manual labor involved in reviewing machine translated text while also optimizing your usage of Amazon Translate. You can also extend the solution with data ingestion automation and workflow orchestration capabilities, as described in Speed Up Translation Jobs with a Fully Automated Translation System Assistant.

About the Authors

Narcisse Zekpa is a Solutions Architect based in Boston. He helps customers in the Northeast U.S. accelerate their adoption of the AWS Cloud, by providing architectural guidelines, design innovative, and scalable solutions. When Narcisse is not building, he enjoys spending time with his family, traveling, cooking, and playing basketball.

Dimitri Restaino is a Solutions Architect at AWS, based out of Brooklyn, New York. He works primarily with Healthcare and Financial Services companies in the North East, helping to design innovative and creative solutions to best serve their customers. Coming from a software development background, he is excited by the new possibilities that serverless technology can bring to the world. Outside of work, he loves to hike and explore the NYC food scene.


Continue Reading


Enhance the caller experience with hints in Amazon Lex

We understand speech input better if we have some background on the topic of conversation. Consider a customer service agent at an auto parts wholesaler helping with orders. If the agent knows that the customer is looking for tires, they’re more likely to recognize responses (for example, “Michelin”) on the phone. Agents often pick up…




We understand speech input better if we have some background on the topic of conversation. Consider a customer service agent at an auto parts wholesaler helping with orders. If the agent knows that the customer is looking for tires, they’re more likely to recognize responses (for example, “Michelin”) on the phone. Agents often pick up such clues or hints based on their domain knowledge and access to business intelligence dashboards. Amazon Lex now supports a hints capability to enhance the recognition of relevant phrases in a conversation. You can programmatically provide phrases as hints during a live interaction to influence the transcription of spoken input. Better recognition drives efficient conversations, reduces agent handling time, and ultimately increases customer satisfaction.

In this post, we review the runtime hints capability and use it to implement verification of callers based on their mother’s maiden name.

Overview of the runtime hints capability

You can provide a list of phrases or words to help your bot with the transcription of speech input. You can use these hints with built-in slot types such as first and last names, street names, city, state, and country. You can also configure these for your custom slot types.

You can use the capability to transcribe names that may be difficult to pronounce or understand. For example, in the following sample conversation, we use it to transcribe the name “Loreck.”

Conversation 1

IVR: Welcome to ACME bank. How can I help you today?

Caller: I want to check my account balance.

IVR: Sure. Which account should I pull up?

Caller: Checking

IVR: What is the account number?

Caller: 1111 2222 3333 4444

IVR: For verification purposes, what is your mother’s maiden name?

Caller: Loreck

IVR: Thank you. The balance on your checking account is 123 dollars.

Words provided as hints are preferred over other similar words. For example, in the second sample conversation, the runtime hint (“Smythe”) is selected over a more common transcription (“Smith”).

Conversation 2

IVR: Welcome to ACME bank. How can I help you today?

Caller: I want to check my account balance.

IVR: Sure. Which account should I pull up?

Caller: Checking

IVR: What is the account number?

Caller: 5555 6666 7777 8888

IVR: For verification purposes, what is your mother’s maiden name?

Caller: Smythe

IVR: Thank you. The balance on your checking account is 456 dollars.

If the name doesn’t match the runtime hint, you can fail the verification and route the call to an agent.

Conversation 3

IVR: Welcome to ACME bank. How can I help you today?

Caller: I want to check my account balance.

IVR: Sure. Which account should I pull up?

Caller: Savings

IVR: What is the account number?

Caller: 5555 6666 7777 8888

IVR: For verification purposes, what is your mother’s maiden name?

Caller: Jane

IVR: There is an issue with your account. For support, you will be forwarded to an agent.

Solution overview

Let’s review the overall architecture for the solution (see the following diagram):

  • We use an Amazon Lex bot integrated with an Amazon Connect contact flow to deliver the conversational experience.
  • We use a dialog codehook in the Amazon Lex bot to invoke an AWS Lambda function that provides the runtime hint at the previous turn of the conversation.
  • For the purposes of this post, the mother’s maiden name data used for authentication is stored in an Amazon DynamoDB table.
  • After the caller is authenticated, the control is passed to the bot to perform transactions (for example, check balance)

In addition to the Lambda function, you can also send runtime hints to Amazon Lex V2 using the PutSession, RecognizeText, RecognizeUtterance, or StartConversation operations. The runtime hints can be set at any point in the conversation and are persisted at every turn until cleared.

Deploy the sample Amazon Lex bot

To create the sample bot and configure the runtime phrase hints, perform the following steps. This creates an Amazon Lex bot called BankingBot, and one slot type (accountNumber).

  1. Download the Amazon Lex bot.
  2. On the Amazon Lex console, choose Actions, Import.
  3. Choose the file that you downloaded, and choose Import.
  4. Choose the bot BankingBot on the Amazon Lex console.
  5. Choose the language English (GB).
  6. Choose Build.
  7. Download the supporting Lambda code.
  8. On the Lambda console, create a new function and select Author from scratch.
  9. For Function name, enter BankingBotEnglish.
  10. For Runtime, choose Python 3.8.
  11. Choose Create function.
  12. In the Code source section, open and delete the existing code.
  13. Download the function code and open it in a text editor.
  14. Copy the code and enter it into the empty function code field.
  15. Choose deploy.
  16. On the Amazon Lex console, select the bot BankingBot.
  17. Choose Deployment and then Aliases, then choose the alias TestBotAlias.
  18. On the Aliases page, choose Languages and choose English (GB).
  19. For Source, select the bot BankingBotEnglish.
  20. For Lambda version or alias, enter $LATEST.
  21. On the DynamoDB console, choose Create table.
  22. Provide the name as customerDatabase.
  23. Provide the partition key as accountNumber.
  24. Add an item with accountNumber: “1111222233334444” and mothersMaidenName “Loreck”.
  25. Add item with accountNumber: “5555666677778888” and mothersMaidenName “Smythe”.
  26. Make sure the Lambda function has permissions to read from the DynamoDB table customerDatabase.
  27. On the Amazon Connect console, choose Contact flows.
  28. In the Amazon Lex section, select your Amazon Lex bot and make it available for use in the Amazon Connect contact flow.
  29. Download the contact flow to integrate with the Amazon Lex bot.
  30. Choose the contact flow to load it into the application.
  31. Make sure the right bot is configured in the “Get Customer Input” block.
  32. Choose a queue in the “Set working queue” block.
  33. Add a phone number to the contact flow.
  34. Test the IVR flow by calling in to the phone number.

Test the solution

You can now call in to the Amazon Connect phone number and interact with the bot.


Runtime hints allow you to influence the transcription of words or phrases dynamically in the conversation. You can use business logic to identify the hints as the conversation evolves. Better recognition of the user input allows you to deliver an enhanced experience. You can configure runtime hints via the Lex V2 SDK. The capability is available in all AWS Regions where Amazon Lex operates in the English (Australia), English (UK), and English (US) locales.

To learn more, refer to runtime hints.

About the Authors

Kai Loreck is a professional services Amazon Connect consultant. He works on designing and implementing scalable customer experience solutions. In his spare time, he can be found playing sports, snowboarding, or hiking in the mountains.

Anubhav Mishra is a Product Manager with AWS. He spends his time understanding customers and designing product experiences to address their business challenges.

Sravan Bodapati is an Applied Science Manager at AWS Lex. He focuses on building cutting edge Artificial Intelligence and Machine Learning solutions for AWS customers in ASR and NLP space. In his spare time, he enjoys hiking, learning economics, watching TV shows and spending time with his family.


Continue Reading


Copyright © 2021 Today's Digital.