Developing a continuing company intelligence dashboard for the Amazon Lex bots


Developing a continuing company intelligence dashboard for the Amazon Lex bots

You’ve rolled away a conversational program driven by Amazon Lex, with a target of enhancing the user experience for the clients. So Now you desire to monitor how good it is working. Are your web visitors finding it helpful? Just just 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? With out a view that is clear your bot’s user interactions, concerns like these may be hard to respond to. The current launch of conversation logs for Amazon Lex makes it easy to obtain near-real-time presence into just exactly exactly how your Lex bots are doing, predicated on real bot interactions. All bot interactions can be stored in Amazon CloudWatch Logs log groups with conversation logs. You should use this conversation information to monitor your bot and gain actionable insights for improving your bot to boost the consumer experience for the clients.

In a prior article, we demonstrated simple tips to enable discussion logs and make use of CloudWatch Logs Insights to evaluate your bot interactions. This post goes one action further by showing you the way to incorporate having an Amazon QuickSight dashboard to get company insights. Amazon QuickSight allows you to effortlessly produce and publish dashboards that are interactive. You can easily pick from a extensive library of visualizations, maps, and tables, and include interactive features such as for example drill-downs and filters.

Solution architecture

In this company cleverness dashboard solution, you certainly will make use of an Amazon Kinesis Data 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 use an AWS Glue crawler to automatically learn and catalog metadata because of this information, therefore that you could 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, as well as the required AWS Identity and Access Management (IAM) roles. By using these resources in position, you may then make your dashboard in Amazon QuickSight and hook up to Athena as a databases.

This solution enables you to make use of your Amazon Lex conversation logs information to generate real time visualizations in Amazon QuickSight. As an example, utilising the AutoLoanBot through the earlier mentioned article, you are able to visualize individual demands by intent, or by intent and user, to get a knowledge about bot use and user pages. The after dashboard shows these visualizations:

This dashboard suggests that re re re payment task and loan requests are many greatly utilized, but checking loan balances is utilized not as usually.

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 example, we’re utilising 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 program to allow users to start a loan application, check out the outstanding stability of these loan, or make that loan re payment. It includes the following intents:

  • Welcome – reacts to a short greeting from an individual
  • ApplyLoan – Elicits information like the user’s title, target, and Social Security quantity, 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 – makes use of the user’s account quantity together with final four digits of these Social Security quantity to give their outstanding stability
  • Fallback – reacts to virtually any demands that the bot cannot process using the other intents

To deploy this solution, complete the steps that are following

  1. Once you’ve your bot and discussion logs configured, use the following key to introduce an AWS CloudFormation stack in us-east-1:
  2. For Stack title, enter a true title for the installment loan default laws in colorado stack. This post utilizes the true title lex-logs-analysis:
  3. Under Lex Bot, for Bot, enter the true title of one’s bot.
  4. For CloudWatch Log Group for Lex discussion Logs, go into the title associated with CloudWatch Logs log team where your discussion logs are configured.

The bot is used by this post AutoLoanBot while the log group car-loan-bot-text-logs:

  1. Select Upcoming.
  2. Add any tags you may wish for the CloudFormation stack.
  3. Select Upcoming.
  4. Acknowledge that IAM functions may be produced.
  5. Select Create stack.

After a few momemts, your stack should always be complete and retain the following resources:

  • A Firehose distribution stream
  • An AWS Lambda transformation function
  • A CloudWatch Logs log team for the Lambda function
  • An bucket that is s3
  • An AWS Glue crawler and database
  • Four IAM functions

This solution utilizes the Lambda blueprint function kinesis-firehose-cloudwatch-logs-processor-python, which converts the data that are raw the Firehose delivery stream into specific JSON information documents grouped into batches. To find out more, see Amazon Kinesis information 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 within the AWS CloudWatch Logs system, for instance:

Only at that point, you need to be in a position to test thoroughly your bot, visit your log information flowing from CloudWatch Logs to S3 through the Firehose delivery flow, and query your discussion log data utilizing Athena. If you use the AutoLoanBot, you can make use of a test script to create log data (conversation logs usually do not log interactions through the AWS Management Console). To download the test script, choose test-bot. Zip.

The Firehose delivery flow operates every minute and channels the information towards the bucket that is s3. The crawler is configured to operate every 10 mins (you may also run it anytime manually through the console). Following the crawler has run, you can easily query important computer data via Athena. The after screenshot shows a test query you can test within the Athena Query Editor:

This question reveals that some users are operating into problems attempting to always check their loan stability. It is possible to put up Amazon QuickSight to do more in-depth analyses and visualizations for this information. To work on this, finish the steps that are following

  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 will need to offer a free account notification and name current email address. Along with selecting Amazon Athena as a data source, be sure to are the S3 bucket where your discussion log information is saved (you will find the bucket title in your CloudFormation stack).

It can take a few momemts to create up your bank account.

  1. If your account is prepared, select New analysis.
  2. Choose Brand Brand 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 databases.
  7. Find the database that AWS Glue created (which include lexlogsdatabase within the title).

Incorporating visualizations

You will include visualizations in Amazon QuickSight. To create the 2 visualizations shown above, finish the steps that are following

  1. From the + include symbol at the top of the dashboard, select Add visual.
  2. Drag the intent industry to your Y axis from the artistic.
  3. Include another visual by saying the initial two steps.
  4. In 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.

It is possible to produce some extra visualizations to gain some insights into how good your bot is doing. As an example, you’ll 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 achieve this, replicate the visualizations that are preceding change the intent dimension 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 after screen shot shows your term cloud visualization for missed utterances.

This kind of visualization provides a view that is powerful just exactly how your users are getting together with your bot. In this instance, you could utilize this understanding to boost the CheckBalance that is existing intent implement an intent to simply help users put up automatic re re payments, industry basic questions regarding your car loan solutions, and also redirect users to a cousin bot that handles home loan applications.


Monitoring bot interactions is crucial in building effective conversational interfaces. You can easily determine what your users are attempting to achieve and exactly how to streamline their consumer experience. Amazon QuickSight in tandem with Amazon Lex conversation logs makes it simple to generate dashboards by streaming the conversation information via Kinesis information Firehose. It is possible to layer this analytics solution along with all of your Amazon Lex bots – give it a go!


Please enter your comment!
Please enter your name here

Website này sử dụng Akismet để hạn chế spam. Tìm hiểu bình luận của bạn được duyệt như thế nào.