Creating a continuing company cleverness dashboard for the Amazon Lex bots

Creating a continuing company cleverness dashboard for the Amazon Lex bots

You’ve rolled away an interface that is conversational by Amazon Lex, with an objective of enhancing the consumer experience for the clients. Now you wish to monitor how good it is working. Are your visitors finding it helpful? Exactly just just How will they be utilizing it? Do they want it sufficient 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, questions such as these could be hard to respond to. The present launch of conversation logs for Amazon Lex makes it simple to have near-real-time presence into just just just how your Lex bots are doing, considering real bot interactions. With discussion logs, all bot interactions may be saved in Amazon CloudWatch Logs log groups. You need to use this conversation information to monitor your bot and gain actionable insights for improving your bot to enhance the consumer experience for the clients.

In a blog that is prior, we demonstrated just how 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 incorporate having an Amazon QuickSight dashboard to get company insights. Amazon QuickSight enables you to easily produce and publish interactive dashboards. You can easily select from a substantial collection of visualizations, maps, and tables, and include interactive features such as for instance drill-downs and filters.

Solution architecture

In this business cleverness dashboard solution, you may make use of an Amazon Kinesis information Firehose to constantly stream discussion log information from Amazon CloudWatch Logs to an amazon bucket that is s3. 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 learn and catalog metadata with this information, therefore that one can query it with Amazon Athena. A template is roofed below which will produce an AWS CloudFormation stack for you personally containing most of these AWS resources, along with the required AWS Identity and Access Management (IAM) roles. By using these resources in position, then you’re able to make your dashboard in Amazon QuickSight and hook up to Athena being a databases.

This solution enables you to make use of your Amazon Lex conversation logs data to produce visualizations that are live Amazon QuickSight. As an example, making use of the installment loan consolidation in new jersey AutoLoanBot through the mentioned before article, you’ll visualize user needs by intent, or by intent and individual, to achieve an awareness about bot use and individual pages. The dashboard that is following these visualizations:

This dashboard suggests that payment task and applications are many greatly utilized, but checking loan balances is utilized notably less usually.

Deploying the answer

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

For the instance, 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 user interface to allow users to start that loan application, check out the outstanding stability of these loan, or make that loan re payment. It includes the intents that are following

  • Welcome – reacts to a greeting that is initial the consumer
  • 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 – utilizes the user’s account quantity therefore the final four digits of these Social Security quantity to present their outstanding balance
  • Fallback – reacts to your needs that the bot cannot process utilizing the other intents

To deploy this solution, finish the following actions:

  1. After you have your bot and discussion logs configured, use the button that is following 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 the bot.
  4. For CloudWatch Log Group for Lex discussion Logs, enter the title regarding the CloudWatch Logs log team where your discussion logs are configured.

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

  1. Select Upcoming.
  2. Include any tags you may desire for the CloudFormation stack.
  3. Select Then.
  4. Acknowledge that IAM functions will likely 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 change function
  • A CloudWatch Logs log team when it comes to Lambda function
  • An S3 bucket
  • 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 flow into specific JSON information documents grouped into batches. To learn more, see Amazon Kinesis information Firehose Data Transformation.

AWS CloudFormation should also provide effectively subscribed the Firehose delivery flow to your CloudWatch Logs log team. The subscription can be seen by you into the AWS CloudWatch Logs system, as an example:

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

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

This question indicates that some users are operating into dilemmas wanting to check always their loan stability. It is possible to setup Amazon QuickSight to do more in-depth analyses and visualizations with this information. To get this done, finish the following steps:

  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 email. As well as choosing Amazon Athena being an information source, be sure to range from the bucket that is s3 your discussion log information is kept (you can find the bucket title in your CloudFormation stack).

Normally it takes a couple of minutes to create your account up.

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

Including visualizations

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

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

You can easily produce some extra visualizations to gain some insights into how good 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 get this done, duplicate the preceding visualizations but 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 after screen shot shows your term cloud visualization for missed utterances.

This particular visualization supplies a view that is powerful exactly how your users are getting together with your bot. In this instance, you could utilize this understanding to enhance the CheckBalance that is existing intent implement an intent to greatly help users put up automatic re re payments, field basic questions regarding your car loan solutions, and also redirect users up to a sis bot that handles home loan applications.


Monitoring bot interactions is crucial in building effective conversational interfaces. You are able to know very well what your users are making an effort to achieve and just how to streamline their consumer experience. Amazon QuickSight in tandem with Amazon Lex conversation logs makes it simple to produce dashboards by streaming the discussion information via Kinesis information Firehose. It is possible to layer this analytics solution along with any of your Amazon Lex bots – give it a go!

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *