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 down a conversational software driven by Amazon Lex, with an objective of enhancing the consumer experience for the clients. So Now you desire to monitor just how well it is working. Are your prospects finding it helpful? Exactly exactly How will they be deploying it? Do they want it sufficient to keep coming back? How could you evaluate their interactions to add more functionality? With no clear view into your bot’s user interactions, concerns like these may be tough to respond to. The current launch of conversation logs for Amazon Lex makes it simple to obtain near-real-time presence into just just how your Lex bots are doing, according to real bot interactions. With discussion logs, all bot interactions may be kept in Amazon CloudWatch Logs log teams. You should use this conversation data 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 just how to allow conversation logs and make use of 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 enables you to effortlessly create and publish interactive dashboards. It is possible to 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 are going to 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 aws that is serverless lambda to change the natural information into JSON information documents. Then you’ll usage an AWS Glue crawler to automatically learn and catalog metadata because of this information, therefore with Amazon Athena that you can query it. A template is roofed below that may produce an AWS CloudFormation stack for your needs containing most of these AWS resources, along with the required AWS Identity and Access Management (IAM) roles. By using these resources in position, then you’re able to create 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 real time visualizations in Amazon QuickSight. For instance, making use of the AutoLoanBot through the earlier mentioned article, you are able to visualize individual needs by intent, or by intent and individual, to get an awareness about bot use and individual pages. The dashboard that is following these visualizations:

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

Deploying the answer

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

For our instance, we’re utilising the AutoLoanBot, but you need to use this solution 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 these loan, or make that loan re 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 name, target, and Social Security quantity, and produces a loan request that is new
  • PayInstallment – Captures the user’s account number, the past four digits of the Social Security quantity, and re re payment information, and operations their monthly installment
  • CheckBalance – utilizes the user’s account number therefore the final four digits of the Social Security Number to produce 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 following actions:

  1. After you have your bot and discussion logs configured, use the button that is following introduce an AWS CloudFormation stack in us-east-1:
  2. For Stack title, enter title for your stack. This post makes use of 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 Conversation Logs, enter the title associated with CloudWatch Logs log team where your discussion logs are configured.

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

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

After a couple of minutes, your stack ought to be complete and support the resources that are following

  • A Firehose distribution stream
  • 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 makes use of 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 learn more, see Amazon Kinesis information Firehose Data Transformation.

AWS CloudFormation should have successfully subscribed also the Firehose delivery flow to your CloudWatch Logs log team. You can view the membership into the AWS CloudWatch Logs system, as an example:

Only at that point, you need to be in a position to examine your bot, visit your log information flowing from CloudWatch Logs to S3 through the Firehose delivery flow, and query your discussion log information utilizing Athena. If you work with the AutoLoanBot, you can make use of a test script to come up with log data (discussion 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 into the bucket that is s3. The crawler is configured to perform every 10 moments (you may also run it anytime manually through the system). Following the crawler has run, you can easily query important computer data via Athena. The after 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 problems wanting to check always their loan balance. You can easily put up Amazon QuickSight to https://speedyloan.net/installment-loans-oh/ do more in-depth analyses and visualizations for this information. For this, finish 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 title and notification current email address. As well as selecting Amazon Athena as an information source, be sure to through the S3 bucket where your discussion log information is saved (you are able to find the bucket name in your CloudFormation stack).

It will take a couple of minutes to create up your account.

  1. Whenever your account is prepared, select New analysis.
  2. Select Brand Brand New information set.
  3. Select Anthena.
  4. Specify the information 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 (which include lexlogsdatabase when you look at the true title).

Including visualizations

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

  1. Through the + Add symbol near 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 towards the Value field in every one.

You can easily produce some extra visualizations to gain some insights into how good your bot is doing. As an example, you can easily assess just how efficiently 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 put in a filter for missedUtterance = 1 ) The after graphs reveal 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 effective view into how your users are getting together with your bot. In this instance, you could utilize this understanding to boost the current CheckBalance intent, implement an intent to greatly help users put up automatic re re payments, industry general questions regarding your car finance solutions, and also redirect users to a sibling bot that handles mortgage applications.

Conclusion

Monitoring bot interactions is crucial in building effective interfaces that are conversational. You can easily know very well what your users are making an effort to achieve and exactly how to streamline their consumer experience. Amazon QuickSight in tandem with Amazon Lex conversation logs allows you to produce dashboards by streaming the conversation information via Kinesis information Firehose. You can easily layer this analytics solution together with all of your Amazon Lex bots – give it a go!