Creating business cleverness dashboard for the Amazon Lex bots - Manassehs Children
single,single-post,postid-5105,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-5.7,wpb-js-composer js-comp-ver-4.3.4,vc_responsive

Creating business cleverness dashboard for the Amazon Lex bots

04 Mar Creating business cleverness dashboard for the Amazon Lex bots

You’ve rolled down a conversational user interface driven by Amazon Lex, with a target of enhancing the consumer experience for the clients. Now you wish to track just how well it is working. Are your prospects finding it helpful? Just How will they be utilizing it? Do they want it adequate to keep coming back? How will you evaluate their interactions to add more functionality? Without having a clear view into your bot’s user interactions, concerns like these may be hard to answer. The current launch of conversation logs for Amazon Lex makes it simple to obtain near-real-time exposure into exactly exactly just how your Lex bots are doing, according to real bot interactions. All bot interactions can be stored in Amazon CloudWatch Logs log groups with conversation logs. You can make use of this conversation information to monitor your bot and gain insights that are actionable improving your bot to boost an individual experience for the clients.

In a previous post, we demonstrated how exactly to allow discussion logs and make use of CloudWatch Logs Insights to evaluate your bot interactions. This post goes one action further by showing you how to integrate with an Amazon QuickSight dashboard to gain company insights. Amazon QuickSight allows you to effortlessly create and publish interactive dashboards. You’ll select from a extensive collection of visualizations, maps, and tables, and include interactive features such as for instance drill-downs and filters.

Solution architecture

In this company cleverness dashboard solution, you may utilize an Amazon Kinesis information Firehose to constantly stream discussion log information from Amazon CloudWatch Logs to A amazon s3 bucket. The Firehose delivery flow employs A aws that is serverless lambda to transform the natural information into JSON information documents. Then you’ll usage an AWS Glue crawler to automatically discover and catalog metadata because of this information, therefore that one may query it with Amazon Athena. A template is roofed below which will produce an AWS CloudFormation stack for you personally containing many of these AWS resources, along with the required AWS Identity and Access Management (IAM) roles. With one of these resources in position, after that you can make your dashboard in Amazon QuickSight and connect with Athena as a repository.

This solution lets you make use of your Amazon Lex conversation logs information to produce visualizations that are live Amazon QuickSight. As an example, utilizing the AutoLoanBot from the earlier mentioned post, it is possible to visualize individual demands by intent, or by user and intent, to achieve a knowledge about bot use and individual pages. The after dashboard shows these visualizations:

This dashboard shows that payment task and loan requests are many greatly utilized, but checking loan balances is utilized significantly less often.

Deploying the perfect solution is

To have started, configure an Amazon Lex bot and enable conversation logs in the usa East (N. Virginia) Area.

For the instance, we’re utilizing the AutoLoanBot, but this solution can be used by you to construct an Amazon QuickSight dashboard for just about any of the Amazon Lex bots.

The AutoLoanBot implements a conversational screen to allow users to initiate that loan application, look at the outstanding balance of the loan, or make that loan re payment. It includes the following intents:

  • Welcome – reacts to a preliminary greeting from the consumer
  • ApplyLoan – Elicits information including the user’s title, target, and Social Security Number, and produces a loan request that is new
  • PayInstallment – Captures the user’s account number, the final four digits of the Social Security quantity, and re re payment information, and operations their month-to-month installment
  • CheckBalance – utilizes the user’s account quantity plus the final four digits of these Social Security Number to deliver their outstanding stability
  • Fallback – reacts to your needs that the bot cannot process utilizing the other intents

To deploy this solution, finish the steps that are following

  1. After you have your bot and discussion logs configured, use the following key to introduce an AWS CloudFormation stack in us-east-1:
  2. For Stack name, enter a true title for the stack. This post makes use of the title lex-logs-analysis:
  3. Under Lex Bot, for Bot, enter the name of one’s bot.
  4. For CloudWatch Log Group for Lex discussion Logs, enter the title for the CloudWatch Logs log team where your discussion logs are configured.

The bot is used by this post AutoLoanBot as well as the log team car-loan-bot-text-logs:

  1. Choose Then.
  2. Include any tags you might wish for the CloudFormation stack.
  3. Select Upcoming.
  4. Acknowledge that IAM functions will likely be produced.
  5. Select Create stack.

After a couple of minutes, your stack must certanly be complete and retain the following resources:

  • A delivery stream that is firehose
  • An AWS Lambda change function
  • A CloudWatch Logs log group when it comes to Lambda function
  • An S3 bucket
  • An AWS Glue crawler and database
  • Four IAM functions

This solution makes use of the Lambda blueprint function kinesis-firehose-cloudwatch-logs-processor-python, which converts the natural information from the Firehose delivery flow into specific JSON information documents grouped into batches. To learn more, see Amazon Kinesis Data Firehose Data Transformation.

AWS CloudFormation should have successfully subscribed also the Firehose delivery flow to your CloudWatch Logs log team. The subscription can be seen by you when you look at the AWS CloudWatch Logs system, for instance:

Only at that point, you need to be in a position to test thoroughly your bot, see your log information moving from CloudWatch Logs to S3 through the Firehose delivery flow, and query your discussion log data making use of Athena. If you use the AutoLoanBot, you can make use of a test script to create log data (discussion logs don’t log interactions through the AWS Management Console). To install the test script, choose test-bot. Zip.

The Firehose delivery flow operates every minute and channels the info to your bucket that is s3. The crawler is configured to perform every 10 mins (you may also run it anytime manually through the system). Following the crawler has run, it is possible to query important computer data via Athena. The screenshot that is following a test query you can look at within the Athena Query Editor:

This question suggests that some users are operating into dilemmas attempting to check always their loan balance. It is possible to create Amazon QuickSight to do more in-depth analyses and visualizations with this information. To work on this, finish the following actions:

  1. Through the system, launch Amazon QuickSight.

You can start with a free trial using Amazon QuickSight Standard Edition if you’re not already using QuickSight. You’ll want to offer a merchant account title and notification current email address. Along with selecting Amazon Athena as being a information source, be sure to range from the bucket that is s3 your discussion log information is saved (you are able to find the bucket title in your CloudFormation stack).

Normally it takes a few momemts setting up your bank account.

  1. Whenever your account is prepared, select New analysis.
  2. Select New information set.
  3. Select Anthena.
  4. Specify the info supply auto-loan-bot-logs.
  5. Select Validate connection and confirm connectivity to Athena.
  6. Select Create repository.
  7. Find the database that AWS Glue created (which include lexlogsdatabase within the true title).

Incorporating visualizations

You can now add visualizations in Amazon QuickSight. To produce the 2 visualizations shown above, finish the steps that are following

  1. Through the + include symbol at the top of the dashboard, select Add visual.
  2. Drag the intent field to your Y axis from the artistic.
  3. Include another artistic by saying the initial two actions.
  4. From the 2nd visual, drag userid to your Group/Color industry well.
  5. To sort the visuals, drag requestid towards the Value field in each one of these.

You are able to create some visualizations that are additional gain some insights into just how well your bot is doing. As an example, it is possible to effectively evaluate how your bot is giving an answer to your users by drilling on to the demands that dropped until the fallback intent. To work on this, replicate the visualizations that are preceding change the intent measurement with inputTranscript, and put in a filter for missedUtterance = 1. The graphs that are following summaries of missed utterances, and missed utterances by individual.

The screen that is following shows your term cloud visualization for missed utterances.

This sort of visualization offers a view that is powerful exactly how your users are getting together with your bot. In this instance, make use of this insight to enhance the current CheckBalance intent, implement an intent to aid users put up automatic payments, industry basic questions regarding your car finance solutions, and also redirect users up to a sis bot that handles home loan applications.


Monitoring bot interactions is important in building effective interfaces that are conversational. It is possible to determine what your users are making an effort to achieve and just how to streamline their user experience. Amazon QuickSight in tandem with Amazon Lex conversation logs allows you to produce dashboards by streaming the discussion information via Kinesis information Firehose. You can easily layer this analytics solution together with any of your Amazon Lex bots – give it an attempt!

No Comments

Sorry, the comment form is closed at this time.