Building a continuing company cleverness dashboard for the Amazon Lex bots

You’ve rolled down a conversational program driven by Amazon Lex, with a target of enhancing the consumer experience for the clients. So Now you like to track just how well it is working. Are your prospects finding it helpful? Exactly How will they be deploying it? Do they enjoy it sufficient to keep coming back? How will you evaluate their interactions to add more functionality? With no clear view into your bot’s user interactions, concerns like these could be hard to answer. The present launch of conversation logs for Amazon Lex makes it easy to have near-real-time presence into how your Lex bots are doing, considering 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 insights that are actionable improving your bot to enhance the consumer experience for the clients.

In a previous article, we demonstrated just how to allow discussion logs online installment loans direct lenders california 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 allows you to effortlessly produce and publish interactive dashboards. It is possible to pick from a substantial collection of visualizations, maps, and tables, and include interactive features such as for instance drill-downs and filters.

Solution architecture

In this company cleverness dashboard solution, you will definitely make use of an Amazon Kinesis information Firehose to constantly stream discussion log information from Amazon CloudWatch Logs to an amazon bucket that is s3. The Firehose delivery stream employs a serverless aws lambda function to change the natural data into JSON information documents. Then you’ll usage an AWS Glue crawler to automatically discover and catalog metadata because of this data, so with Amazon Athena that you can query it. A template is included below which will create 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 your resources in position, after that you can make your dashboard in Amazon QuickSight and connect with Athena as being a repository.

This solution enables you to make use of your Amazon Lex conversation logs information to produce visualizations that are live Amazon QuickSight. For instance, using the AutoLoanBot through the mentioned before post, you’ll visualize individual demands by intent, or by user and intent, to get an awareness about bot use and individual pages. The dashboard that is following these visualizations:

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

Deploying the perfect solution is

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 this solution can be used by you to create an Amazon QuickSight dashboard for almost any of one’s Amazon Lex bots.

The AutoLoanBot implements a conversational software to allow users to start that loan application, look at the outstanding stability of the loan, or make that loan re re 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 produces a loan request that is new
  • PayInstallment – Captures the user’s account number, the very last four digits of these Social Security quantity, and re payment information, and operations their month-to-month installment
  • CheckBalance – makes use of the user’s account quantity as well as the last four digits of the Social Security quantity to deliver their outstanding stability
  • Fallback – reacts to virtually any needs that the bot cannot process utilizing the other intents

To deploy this solution, finish the following actions:

  1. Once you’ve 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 title for the stack. This post makes use of 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, enter the title associated with 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 Upcoming.
  2. Include any tags you might desire for the CloudFormation stack.
  3. Select Then.
  4. Acknowledge that IAM functions should be produced.
  5. Select Create stack.

After a couple of minutes, your stack should really 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 when it comes to 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 natural information from the Firehose delivery flow into specific JSON information documents grouped into batches. 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. The subscription can be seen by you within the AWS CloudWatch Logs console, for instance:

Only at that true point, you need 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 making use of Athena. If you use the AutoLoanBot, you need to use a test script to build 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 stream operates every minute and channels the info towards the S3 bucket. The crawler is configured to perform every 10 moments (you may also run it anytime manually through the console). Following the crawler has run, you’ll query your computer data via Athena. The following screenshot shows a test question you can look at when you look at the Athena Query Editor:

This question suggests that some users are operating into dilemmas attempting to check always their loan stability. It is possible to put up Amazon QuickSight to do more in-depth analyses and visualizations with this information. To get this done, complete the following actions:

  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 ought to offer a merchant account notification and name current email address. As well as choosing Amazon Athena as being an information source, be sure to through the S3 bucket where your discussion log information is kept (you will find 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 prepared, choose New analysis.
  2. Select Brand New information set.
  3. Select Anthena.
  4. Specify the information supply auto-loan-bot-logs.
  5. Choose Validate connection and confirm connectivity to Athena.
  6. Choose Create repository.
  7. Find the database that AWS Glue created (including lexlogsdatabase into the true title).

Incorporating visualizations

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

  1. From the + include symbol at 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 actions.
  4. Regarding the 2nd visual, drag userid to your Group/Color industry well.
  5. To sort the visuals, drag requestid to your Value field in every one.

You are able to produce some extra visualizations to gain some insights into how well your bot is doing. As an example, it is possible to effectively evaluate how your bot is giving an answer to your users by drilling on to the needs that dropped until the fallback intent. To work on this, replicate the visualizations that are preceding change the intent measurement with inputTranscript, and include a filter for missedUtterance = 1. The graphs that are following summaries of missed utterances, and missed utterances by individual.

The following screen shot shows your word cloud visualization for missed utterances.

This sort of visualization provides a view that is powerful just exactly 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 greatly help users create automatic re re payments, industry general questions regarding your car finance solutions, and also redirect users to a sibling bot that handles home loan applications.

Summary

Monitoring bot interactions is important in building effective conversational interfaces. You’ll determine what your users are attempting 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 are able to layer this analytics solution together with any of your Amazon Lex bots – give it an attempt!

Comments are closed.