404 Creating company cleverness dashboard for the Amazon Lex bots

Creating company cleverness dashboard for the Amazon Lex bots

Creating 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 customers. So Now you wish to monitor just how well it is working. Are your web visitors finding it helpful? Exactly exactly exactly How will they be utilizing it? Do they enjoy it sufficient to keep coming back? How could you evaluate their interactions to add more functionality? With out a view that is clear your bot’s user interactions, concerns like these could be hard to respond to. The current release of conversation logs for Amazon Lex makes it simple to obtain visibility that is near-real-time exactly just how your Lex bots are performing, centered on real bot interactions. All bot interactions can be stored in Amazon CloudWatch Logs log groups with conversation logs. You need to use this conversation information to monitor your bot and gain actionable insights for boosting your bot to boost the consumer experience for the customers.

In a previous blog post, 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 with an Amazon QuickSight dashboard to get company insights. Amazon QuickSight allows you to effortlessly produce and publish interactive dashboards. You are able to select from a library that is extensive of, maps, and tables, and include interactive features such as for example drill-downs and filters.

Solution architecture

In this business cleverness dashboard solution, you are going to make use of an Amazon Kinesis information Firehose to continuously stream discussion log information from Amazon CloudWatch Logs to A amazon s3 bucket. The Firehose delivery flow employs A aws that is serverless lambda to change the raw information into JSON information records. 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 which will produce an AWS CloudFormation stack for you personally containing many 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 hook up to Athena as being a repository.

This solution enables you to make use of your Amazon Lex conversation logs information to produce live visualizations in Amazon QuickSight. As an example, utilising the AutoLoanBot through the mentioned before post, you are able 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 payment task and loan requests are many greatly utilized, but checking loan balances is utilized a lot less frequently.

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 making use of the AutoLoanBot, but you should use this solution to create 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, look at the outstanding stability of these loan, or make that loan re payment. It includes the intents that are following

  • Welcome – reacts to a preliminary greeting from an individual
  • ApplyLoan – Elicits information like the user’s title, target, and Social Security quantity, and produces a brand new loan demand
  • PayInstallment – Captures the user’s account number, the final four digits of the Social Security quantity, and payment information, and operations their month-to-month installment
  • CheckBalance – makes use of the user’s account number therefore the final four digits of these Social Security quantity to offer their outstanding stability
  • Fallback – Responds to virtually any demands that the bot cannot process with all the other intents

To deploy this solution, finish the following actions:

  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 title, enter title for the stack. This post utilizes the true 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, go into the true title associated with the CloudWatch Logs log team where your discussion logs are configured.

This post makes use of the bot AutoLoanBot as well as the log team car-loan-bot-text-logs:

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

After a couple of minutes, your stack ought to be complete and support 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 database and crawler
  • Four IAM functions

This solution utilizes the Lambda blueprint function kinesis-firehose-cloudwatch-logs-processor-python, which converts the natural information from the Firehose delivery flow into specific JSON information documents grouped into batches. https://www.speedyloan.net/installment-loans-oh/ To find out more, see Amazon Kinesis information Firehose Data Transformation.

AWS CloudFormation should likewise have effectively subscribed the Firehose delivery flow to your CloudWatch Logs log team. You can observe the registration within the AWS CloudWatch Logs system, for instance:

As of this point, you ought 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 utilizing Athena. If you use the AutoLoanBot, you can make use of a test script to build log data (conversation 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 towards the S3 bucket. The crawler is configured to operate every 10 minutes(you can also anytime run it manually through the system). Following the crawler has run, you can easily query important computer data via Athena. The screenshot that is following a test question you can test within the Athena Query Editor:

This query implies that some users are operating into dilemmas attempting to always check their loan stability. You can easily setup Amazon QuickSight to do more in-depth analyses and visualizations with this information. For this, finish 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 totally free test utilizing Amazon QuickSight Standard Edition. You will need to offer a merchant account title and notification email. As well as selecting Amazon Athena as a data source, remember to range from the S3 bucket where your discussion log information is saved (you will get the bucket title in your CloudFormation stack).

It will take a short while setting up your account.

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

Incorporating visualizations

You can now include visualizations in Amazon QuickSight. To produce 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 industry to the Y axis from the artistic.
  3. Include another artistic by saying the very first two actions.
  4. In the second 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 visualizations that are additional gain some insights into how good your bot is doing. For instance, it is possible to effectively evaluate how your bot is answering your users by drilling on to the needs that fell until the fallback intent. To achieve this, duplicate the preceding visualizations but replace 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 particular visualization supplies a view that is powerful how your users are reaching your bot. In this example, you could utilize this understanding to boost the current CheckBalance intent, implement an intent to simply help users setup automatic payments, industry basic questions regarding your car finance solutions, and also redirect users to a sis bot that handles home loan applications.

Summary

Monitoring bot interactions is important in building effective conversational interfaces. It is possible to know very well 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. You’ll layer this analytics solution together with all of your Amazon Lex bots – give it an attempt!