Developing company cleverness dashboard for the Amazon Lex bots

You’ve rolled down an interface that is conversational by Amazon Lex, with an objective of enhancing the consumer experience for the clients. Now you desire to monitor how good it is working. Are your prospects finding it helpful? Exactly How will they be deploying it? Do they enjoy it sufficient to return? How could you evaluate their interactions to add more functionality? With no clear view into your bot’s user interactions, concerns such as these are tough to respond to. The present launch of conversation logs for Amazon Lex makes it simple to have near-real-time presence into just how your Lex bots are doing, predicated 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 boosting your bot to boost the consumer experience for the clients.

In a previous post, we demonstrated simple tips to allow discussion logs and make use of CloudWatch Logs Insights to assess your bot interactions. This post goes one action further by showing you the way to incorporate by having an Amazon QuickSight dashboard to get company insights. Amazon QuickSight allows you to effortlessly create and publish interactive dashboards. It is possible to select from a library that is extensive of, 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 serverless aws lambda function to transform the raw data into JSON information documents. Then you’ll usage an AWS Glue crawler to automatically learn and catalog metadata because of this data, therefore with Amazon Athena that you can query it. A template is roofed below that may 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. With one of these resources in position, then you can make your dashboard in Amazon QuickSight and hook up to Athena as being a databases.

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

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

Deploying the clear answer

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

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

The AutoLoanBot implements an interface that is conversational enable users to start that loan application, check out the outstanding stability of the loan, or make that loan payment. It includes the following intents:

  • Welcome – reacts to a short greeting from an individual
  • ApplyLoan – Elicits information including the user’s title, target, and Social Security quantity, and creates a brand new loan request
  • PayInstallment – Captures the user’s account number, the very last 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 number additionally the final four digits of the Social Security quantity to produce their outstanding stability
  • Fallback – reacts to your needs that the bot cannot process using the other intents

To deploy this solution, finish the following actions:

  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 name, enter a true title for the stack. This post utilizes the title lex-logs-analysis:
  3. Under Lex Bot, for Bot, enter the true name of the bot.
  4. For CloudWatch Log Group for Lex discussion Logs, go into the title of this CloudWatch Logs log team where your discussion logs are configured.

This post makes use of the bot AutoLoanBot and also the log group car-loan-bot-text-logs:

  1. Select Then.
  2. Include any tags you may wish for the CloudFormation stack.
  3. Choose Then.
  4. Acknowledge that IAM functions are going to be developed.
  5. Choose Create stack.

After a few momemts, your stack must 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 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 flow into specific JSON information documents grouped into batches. To learn 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 registration into the AWS CloudWatch Logs system, as an example:

Only at that point, you need to be in a position to examine your bot, see your log information moving from CloudWatch Logs to S3 through the Firehose delivery flow, and query your discussion log information making use of Athena. If you work with the AutoLoanBot, you need to use a test script to come up with log data (discussion logs usually do not log interactions through the AWS Management Console). To download the test script, http://www.speedyloan.net/installment-loans-md/ choose test-bot. Zip.

The Firehose delivery flow runs every minute and channels the information to your S3 bucket. The crawler is configured to perform every 10 minutes(you can also anytime run it manually through the system). Following the crawler has run, it is possible to query your computer data via Athena. The screenshot that is following a test query you can test into the Athena Query Editor:

This question implies that some users are operating into dilemmas wanting to check always their loan stability. It is possible to put up Amazon QuickSight to do more analyses that are in-depth visualizations with this data. To work on this, complete the steps that are following

  1. Through the system, launch Amazon QuickSight.

If you’re maybe not already using QuickSight, you could start with a free of charge test utilizing Amazon QuickSight Standard Edition. You ought to offer a free account notification and name current email address. As well as selecting Amazon Athena as being an information source, be sure to range from the bucket that is s3 your discussion log information is kept (you will get the bucket title in your CloudFormation stack).

Normally it takes a short while setting up your account.

  1. As soon as your account is ready, 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 (including lexlogsdatabase into the title).

Including visualizations

You will include visualizations in Amazon QuickSight. To generate the 2 visualizations shown above, complete the following actions:

  1. Through the + include symbol near 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. From the 2nd visual, drag userid to your Group/Color industry well.
  5. To sort the visuals, drag requestid to your Value field in each one of these.

You are able to produce some extra visualizations to gain some insights into exactly how well your bot is doing. For instance, 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. For this, replicate 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 user.

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

This particular visualization offers a view that is powerful just how your users are getting together with your bot. In this instance, make use of this understanding to enhance the current CheckBalance intent, implement an intent to greatly help users put up automatic re re re payments, industry 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 conversational interfaces. You are able to know very well what your users want to achieve and just how to streamline their consumer experience. Amazon QuickSight in tandem with Amazon Lex conversation logs makes it simple to generate dashboards by streaming the discussion information via Kinesis Data Firehose. It is possible to layer this analytics solution along with all of your Amazon Lex bots – give it an attempt!

RELATED ARTICLES

Recipients