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 a target of enhancing the consumer experience for your customers. Now you wish to monitor how well it is working. Are your web visitors finding it helpful? Exactly exactly How will they be utilizing it? Do they enjoy it adequate to keep coming back? How will you evaluate their interactions to add more functionality? With no view that is clear your bot’s user interactions, concerns such as these are hard to respond to. The current launch of conversation logs for Amazon Lex makes it simple to have visibility that is near-real-time just just how your Lex bots are doing, centered on real bot interactions. With discussion logs, all bot interactions could be kept in Amazon CloudWatch Logs log teams. You should use this conversation information to monitor your bot and gain actionable insights for improving your bot to enhance an individual experience for the clients.

In a blog that is prior, we demonstrated how exactly to allow discussion logs and make use of CloudWatch Logs Insights to analyze your bot interactions. This post goes one action further by showing you the way to incorporate with an Amazon QuickSight dashboard to get company insights. Amazon QuickSight enables you to effortlessly produce and publish interactive dashboards. You can easily select from a library that is extensive of, charts, and tables, and include interactive features such as for instance drill-downs and filters.

Solution architecture

In this company cleverness dashboard solution, you can expect to make use of 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 serverless aws lambda function to transform the natural information into JSON data documents. Then you’ll usage an AWS Glue crawler to automatically learn and catalog metadata with this information, therefore as you are able to query it with Amazon Athena. A template is roofed below which will produce an AWS CloudFormation stack for your needs containing a few of these AWS resources, along with the required AWS Identity and Access Management (IAM) roles. With your resources set up, then you're able to make your dashboard in Amazon QuickSight and connect with Athena as a databases.

This solution enables you to make use of your Amazon Lex conversation logs data to produce real time visualizations in Amazon QuickSight. For instance, utilizing the AutoLoanBot through the earlier mentioned post, it is possible to visualize individual needs 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 shows that re re re payment task and loan requests are most greatly utilized, but checking loan balances is utilized a lot less often.

Deploying the perfect solution is

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

For the instance, we’re making use of the AutoLoanBot, but you need to use this solution to create an Amazon QuickSight dashboard for almost any of the Amazon Lex bots.

The AutoLoanBot implements a conversational software to enable users to start a loan application, look at the outstanding stability of these loan, or make that loan re re payment. It includes the intents that are following

  • Welcome – reacts to a short greeting from an individual
  • ApplyLoan – Elicits information like the user’s name, 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 these Social Security quantity, and re re payment information, and operations their month-to-month installment
  • CheckBalance – utilizes the user’s account quantity together with final four digits of the Social Security quantity to present their outstanding stability
  • Fallback – reacts to virtually any demands that the bot cannot process with all 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 button to introduce an AWS CloudFormation stack in us-east-1:
  2. For Stack name, enter title for the stack. This post utilizes the title lex-logs-analysis:
  3. Under Lex Bot, for Bot, enter the true title of the bot.
  4. For CloudWatch Log Group for Lex discussion Logs, enter the title of this CloudWatch Logs log team where your discussion logs are configured.

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

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

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

  • A delivery stream that is firehose
  • 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 makes use of the Lambda blueprint function kinesis-firehose-cloudwatch-logs-processor-python, which converts the raw information from 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 have successfully subscribed also the Firehose delivery stream 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 ought to be in a position to test thoroughly your bot, visit your log information moving from CloudWatch Logs to S3 through the Firehose delivery flow, and query your discussion log information utilizing Athena. You can use a test script to generate log data (conversation logs do not log interactions through the AWS Management Console) if you are using the AutoLoanBot,. To download the test script, choose test-bot. Zip.

The Firehose delivery stream operates every minute and channels the information to your S3 bucket. The crawler is configured to operate every 10 moments (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 after screenshot shows a test question you can test into the Athena Query Editor:

This question implies that some users are operating into dilemmas attempting to always check their loan stability. You are able to arranged Amazon QuickSight to do more in-depth analyses and visualizations with this information. To get this done, finish the following actions:

  1. Through the system, launch Amazon QuickSight.

If you’re maybe not already using QuickSight, you can begin with a totally free test using Amazon QuickSight Standard Edition. You'll want to provide a free account title and notification current email address. As well as selecting Amazon Athena as a data source, be sure to are the S3 bucket where your conversation log information is saved (you will get the bucket title in your CloudFormation stack).

Normally it takes a few momemts to create your account up.

  1. As soon as your account is ready, select New analysis.
  2. Choose Brand New information set.
  3. Select Anthena.
  4. Specify the info supply auto-loan-bot-logs.
  5. Select Validate https://speedyloan.net/installment-loans-wy connection and confirm connectivity to Athena.
  6. Select Create databases.
  7. Find the database that AWS Glue created (which include lexlogsdatabase when you look at the 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 symbol towards the top of the dashboard, select Add visual.
  2. Drag the intent industry to your Y axis in the artistic.
  3. Include another artistic by saying the very first two actions.
  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.

You can easily produce some visualizations that are additional gain some insights into how good your bot is doing. As an example, it is possible to assess exactly how effortlessly your bot is giving an answer to your users by drilling on to the needs that dropped until the fallback intent. To achieve this, replicate the preceding visualizations but change the intent measurement with inputTranscript, and include a filter for missedUtterance = 1. The after graphs reveal summaries of missed utterances, and missed utterances by individual.

The after screen shot shows your term cloud visualization for missed utterances.

This particular visualization offers a effective view into how your users are getting together with your bot. In this instance, make use of this understanding to boost the current CheckBalance intent, implement an intent to simply help users arranged automatic re payments, industry basic questions regarding your car loan solutions, and also redirect users up to a sis bot that handles home loan applications.

Summary

Monitoring bot interactions is crucial in building effective interfaces that are conversational. It is possible to determine what your users are making an effort to achieve and how to streamline their consumer experience. Amazon QuickSight in conjunction 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 in addition to all of your Amazon Lex bots – give it an attempt!