Creating a continuing company cleverness dashboard for the Amazon Lex bots

You’ve rolled away a conversational screen driven by Amazon Lex, with an objective of enhancing the consumer experience for the clients. So Now you wish to monitor how good it is working. Are your visitors finding it helpful? Just exactly How will they be utilizing it? Do they want it sufficient to keep coming back? How could you analyze their interactions to add more functionality? Without having a view that is clear your bot’s user interactions, concerns like these could be tough to respond to. The current launch of conversation logs for Amazon Lex makes it simple to have near-real-time presence into just just how your Lex bots are doing, centered on 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 actionable insights for improving your bot to enhance the consumer experience for the clients.

In a blog that is prior, we demonstrated simple tips to allow discussion logs and employ 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 enables you to effortlessly produce and publish interactive dashboards. You can easily pick from a substantial collection 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 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 stream employs A aws that is serverless lambda to change the natural information into JSON data documents. Then you’ll usage 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 that may produce an AWS CloudFormation stack for your needs containing many of these AWS resources, along with the required AWS Identity and Access Management (IAM) roles. By using these resources set up, then you can 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 generate real time visualizations in Amazon QuickSight. For instance, utilising the AutoLoanBot through the mentioned before article, you are able to visualize individual demands by intent, or by user and intent, to achieve an awareness about bot use and individual pages. The dashboard that is following these visualizations:

This dashboard suggests that re payment task and loan requests are many heavily utilized, but checking loan balances is utilized a lot less usually.

Deploying the answer

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

For the instance, we’re utilising the AutoLoanBot, but this solution can be used by you to create an Amazon QuickSight dashboard for almost any of the Amazon Lex bots.

The AutoLoanBot implements a conversational screen to allow users to start a loan application, check out the outstanding stability of the loan, or make that loan payment. It includes the following intents:

  • Welcome – reacts to a preliminary greeting from the consumer
  • ApplyLoan – Elicits information like the user’s title, target, and Social Security Number, and produces a brand new loan demand
  • PayInstallment – Captures the user’s account number, the past four digits of these Social Security quantity, and re re payment information, and operations their month-to-month installment
  • CheckBalance – makes use of the user’s account quantity and also the final four digits of the Social Security quantity to give you their outstanding stability
  • Fallback – reacts to virtually any needs that the bot cannot process utilizing the other intents

To deploy this solution, finish the steps that are following

  1. Once 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 utilizes the name 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, enter the true name for the CloudWatch Logs log team where your conversation logs are configured.

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

  1. Select Then.
  2. Include any tags you may desire for your CloudFormation stack.
  3. Choose Upcoming.
  4. Acknowledge that IAM functions is going to be produced.
  5. Select Create stack.

After a few momemts, your stack must certanly be complete and support the resources that are following

  • A Firehose delivery stream
  • An AWS Lambda change function
  • A CloudWatch Logs log team when it comes to Lambda function
  • An S3 bucket
  • An AWS Glue database and crawler
  • Four IAM roles

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 likewise have successfully subscribed the Firehose delivery flow to your CloudWatch Logs log team. You can view the membership into the AWS CloudWatch Logs system, as an example:

As of this true point, you need to be able to test thoroughly your bot, see your log information moving from CloudWatch Logs to S3 through the Firehose delivery stream, and query your discussion log information utilizing Athena. If you work with the AutoLoanBot, you need to use 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 flow operates every minute and channels the info to your bucket that is s3. The crawler is configured to operate every 10 minutes (you may also run it anytime manually through the system). Following the crawler has run, it is possible to query your computer data via Athena. The after screenshot shows a test question you can test into the Athena Query Editor:

This question demonstrates that some users are operating into issues wanting to check always their loan stability. You can easily put up Amazon QuickSight to do more analyses that are in-depth visualizations with this information. To achieve this, complete the steps that are following

  1. Through the system, launch Amazon QuickSight.

If you’re perhaps not already making use of QuickSight, you could start with a totally free test utilizing Amazon QuickSight Standard Edition. You will need to provide a merchant account notification and name email address. Along with selecting Amazon Athena as a information source, remember to are the S3 bucket where your discussion log information is saved (you will find the bucket title in your CloudFormation stack).

It will take a couple of minutes to create your account up.

  1. If your account is prepared, select New analysis.
  2. Choose Brand New information set.
  3. Select Anthena.
  4. Specify the information 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 when you look at the true title).

Including visualizations

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

  1. Through the + include icon near https://speedyloan.net/installment-loans-tx the top of the dashboard, select Add visual.
  2. Drag the intent industry into the Y axis regarding the artistic.
  3. Include another artistic by saying the initial two actions.
  4. In the 2nd visual, drag userid to your Group/Color industry well.
  5. To sort the visuals, drag requestid into the Value field in each one of these.

You are able to produce some visualizations that are additional gain some insights into just how well your bot is doing. For instance, it is possible to assess just how effortlessly your bot is giving an answer to your users by drilling on to the demands that dropped until the fallback intent. For 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 after screen shot shows your term cloud visualization for missed utterances.

This sort of visualization offers a view that is powerful just just just 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 assist users put up automatic re re payments, field basic questions regarding your car loan solutions, and also redirect users to a sibling bot that handles home loan applications.

Summary

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

Post Author:

Leave a Reply

Your email address will not be published. Required fields are marked *