Developing a continuing company cleverness dashboard for the Amazon Lex bots

Developing a continuing company cleverness dashboard for the Amazon Lex bots

You’ve rolled down a conversational program driven by Amazon Lex, with an objective of enhancing the consumer experience for the clients. Now you desire to monitor exactly how well it is working. Are your visitors finding it helpful? Exactly exactly How will they be deploying it? Do they enjoy it sufficient to keep coming back? How could you evaluate their interactions to add more functionality? With out a clear view into your bot’s user interactions, concerns such as these could be hard to respond to. The present launch of conversation logs for Amazon Lex makes it simple to obtain visibility that is near-real-time exactly exactly just how your Lex bots are doing, centered on real bot interactions. With discussion logs, all bot interactions could be saved in Amazon CloudWatch Logs log groups. You can make use of this conversation information to monitor your bot and gain actionable insights for improving your bot to boost an individual experience for the clients.

In a previous blog post, we demonstrated how exactly to allow discussion logs and use 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 dashboards that are interactive. It is possible to select from a considerable 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 can expect to make use of an Amazon Kinesis Data Firehose to continuously 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 with Amazon Athena that you can query it. A template is roofed below that may produce an AWS CloudFormation stack for you personally containing a few of these AWS resources, along with the required AWS Identity and Access Management (IAM) roles. With one of these resources in position, after that you can make your dashboard in Amazon QuickSight and hook up to Athena as being a repository.

This solution lets you make use of your Amazon Lex conversation logs information to generate real time visualizations in Amazon QuickSight. For instance, with the AutoLoanBot through the previously mentioned blog post, you are able to visualize user needs by intent, or by intent and individual, to achieve a knowledge about bot use and individual pages. The after dashboard shows these visualizations:

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

Deploying the clear answer

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

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

The AutoLoanBot implements a conversational program to allow users to start that loan application, check out the outstanding stability of the loan, or make that loan re 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 title, target, and Social Security quantity, and produces a brand new loan request
  • PayInstallment – Captures the user’s account number, the final four digits of these Social Security quantity, and payment information, and processes their month-to-month installment
  • CheckBalance – makes use of the user’s account quantity additionally the final four digits of the Social Security quantity to supply their outstanding balance
  • Fallback – reacts to virtually any needs that the bot cannot process utilizing the other intents

To deploy this solution, complete the steps that are following

  1. After you have 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 title for the stack. This post utilizes the title lex-logs-analysis:
  3. Under Lex Bot, for Bot, enter the title 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 while the log team car-loan-bot-text-logs:

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

After a few momemts, your stack ought to be complete and support 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 data 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 stream to your CloudWatch Logs log team. You can observe the registration into the AWS CloudWatch Logs console, as an example:

As of this point, you need to be in a position to examine your bot, visit your log data flowing from CloudWatch Logs to S3 through the Firehose delivery flow, and query your discussion log data utilizing Athena. If you use https://www.speedyloan.net/installment-loans-oh the AutoLoanBot, you can make use of a test script to create log data (discussion logs try not to log interactions through the AWS Management Console). To install the test script, choose test-bot. Zip.

The Firehose delivery flow runs every minute and channels the info to your S3 bucket. The crawler is configured to perform 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 screenshot that is following a test query you can look at within the Athena Query Editor:

This question implies that some users are operating into problems wanting to check always their loan stability. It is possible to arranged Amazon QuickSight to do more in-depth analyses and visualizations for this information. For 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. As well as selecting Amazon Athena as a information source, be sure to range from the bucket that is s3 your discussion log information is kept (you will find the bucket title in your CloudFormation stack).

It will take a short while setting your account up.

  1. Whenever your account is prepared, select New analysis.
  2. Select 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. Choose 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 produce the two visualizations shown above, finish the following actions:

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

It is possible to produce some extra visualizations to gain some insights into just how well your bot is performing. For instance, you are able to assess exactly how effortlessly your bot is answering your users by drilling down into the needs that dropped through to the fallback intent. To work on 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 screen that is following shows your term cloud visualization for missed utterances.

This kind of visualization supplies 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 improve the CheckBalance that is existing intent implement an intent to aid users setup automatic re payments, field basic questions regarding your car finance solutions, and also redirect users to a sis bot that handles home loan applications.

Conclusion

Monitoring bot interactions is important in building effective conversational interfaces. You are able to know very well what your users are attempting to achieve and just 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. You can easily layer this analytics solution along with all of your Amazon Lex bots – give it a go!