Building company intelligence dashboard for the Amazon Lex bots
You’ve rolled away a conversational program driven by Amazon Lex, with an objective of enhancing the consumer experience for the clients. So Now you desire to monitor how good it is working. Are your prospects finding it helpful? Just exactly How will they be deploying it? Do they want it sufficient to keep coming back? How will you evaluate their interactions to add more functionality? With out a clear view into your bot’s user interactions, concerns like these could be tough to respond to. The present launch of conversation logs for Amazon Lex makes it simple to obtain near-real-time exposure into just exactly exactly how your Lex bots are doing, centered on real bot interactions. With conversation logs, all bot interactions may be saved in Amazon CloudWatch Logs log teams. 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 your clients.
In a blog that is prior, we demonstrated how exactly to allow discussion 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 by having an Amazon QuickSight dashboard to gain company insights. Amazon QuickSight enables you to effortlessly produce and publish dashboards that are interactive. You are able to pick from a library that is extensive of, maps, and tables, and include interactive features such as for instance drill-downs and filters.
In this company cleverness dashboard solution, you will definitely utilize an Amazon Kinesis information Firehose to continuously stream conversation log information from Amazon CloudWatch Logs to an amazon bucket that is s3. The Firehose delivery flow employs a serverless aws lambda function to transform the natural information into JSON information documents. Then you’ll usage an AWS Glue crawler to automatically learn and catalog metadata for this information, therefore as you are able to query it with Amazon Athena. A template is roofed below which will 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 set up, you may then make your dashboard in Amazon QuickSight and hook up to Athena being a databases.
This solution lets you make use of your Amazon Lex conversation logs information to produce real time visualizations in Amazon QuickSight. For instance, utilising the AutoLoanBot through the earlier mentioned article, you are able to visualize individual demands by intent, or by user and intent, to get a knowledge about bot use and individual pages. The after dashboard shows these visualizations:
This dashboard suggests that re re payment task and loan requests are many greatly utilized, but checking loan balances is utilized a lot less usually.
Deploying the perfect solution is
To obtain started, configure an Amazon Lex bot and conversation that is enable in the usa East (N. Virginia) Area.
For the instance, we’re utilising the AutoLoanBot, but you can make use of this solution to create an Amazon QuickSight dashboard for almost any of one’s Amazon Lex bots.
The AutoLoanBot implements an interface that is conversational allow users to start that loan application, check the outstanding stability of these loan, or make that loan re payment. It includes the following intents:
- Welcome – reacts to a greeting that is initial the consumer
- 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 these Social Security quantity, and re re re payment information, and operations their month-to-month installment
- CheckBalance – utilizes the user’s account number additionally the final four digits of these Social Security Number to offer their outstanding stability
- Fallback – Responds to virtually any requests that the bot cannot process aided by the other intents
To deploy this solution, finish the steps that are following
- Once you’ve your bot and discussion logs configured, use the following key to introduce an AWS CloudFormation stack in us-east-1:
- For Stack title, enter title for the stack. This post makes use of the title lex-logs-analysis:
- Under hummingbird loans Lex Bot, for Bot, enter the title of the bot.
- For CloudWatch Log Group for Lex discussion Logs, enter the title regarding the CloudWatch Logs log group where your discussion logs are configured.
This post makes use of the bot AutoLoanBot additionally the log team car-loan-bot-text-logs:
- Select Then.
- Include any tags you may desire for the CloudFormation stack.
- Select Then.
- Acknowledge that IAM roles may be developed.
- Select Create stack.
After a couple of minutes, your stack should really be complete and retain the resources that are following
- A Firehose distribution stream
- An AWS Lambda change function
- A CloudWatch Logs log team when it comes to Lambda function
- An bucket that is s3
- An AWS Glue database and crawler
- 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 stream into specific JSON information documents grouped into batches. To learn more, see Amazon Kinesis information Firehose Data Transformation.
AWS CloudFormation should also provide effectively subscribed the Firehose delivery stream to your CloudWatch Logs log team. The subscription can be seen by you within the AWS CloudWatch Logs system, as an example:
As of this true point, you need to be in a position to test thoroughly your bot, see your log information moving from CloudWatch Logs to S3 through the Firehose delivery stream, and query your discussion log information utilizing Athena. You can use a test script to generate log data (conversation logs do not log interactions through the AWS Management Console) if you are using the AutoLoanBot,. To install the test script, choose test-bot. Zip.
The Firehose delivery flow runs every minute and channels the information into the S3 bucket. The crawler is configured to perform every 10 moments (you may also run it anytime manually via the system). Following the crawler has run, you can easily query your computer data via Athena. The after screenshot shows a test question you can look at within the Athena Query Editor:
This question reveals that some users are running into dilemmas wanting to always check their loan stability. It is possible to create Amazon QuickSight to do more analyses that are in-depth visualizations with this information. To achieve this, finish the steps that are following
- Through the console, 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 free account title and notification current email address. As well as selecting Amazon Athena as being a data source, remember to through the S3 bucket where your discussion log information is kept (you will find the bucket title in your CloudFormation stack).
It will take a couple of minutes to create your account up.
- As soon as your account is prepared, select New analysis.
- Select Brand Brand New data set.
- Select Anthena.
- Specify the information supply auto-loan-bot-logs.
- Select Validate connection and confirm connectivity to Athena.
- Select Create repository.
- Choose the database that AWS Glue created (which include lexlogsdatabase when you look at the true title).
You will add visualizations in Amazon QuickSight. To produce the 2 visualizations shown above, finish the steps that are following
- Through the + include symbol near the top of the dashboard, select Add visual.
- Drag the intent industry to your Y axis regarding the artistic.
- Include another artistic by saying the initial two actions.
- In the second visual, drag userid to your Group/Color industry well.
- 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 exactly how well your bot is doing. For instance, it is possible to assess exactly how effortlessly 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 show summaries of missed utterances, and missed utterances by individual.
The screen that is following shows your term cloud visualization for missed utterances.
This sort of visualization provides a effective view into just exactly how your users are getting together with your bot. In this instance, make use of this understanding to boost the CheckBalance that is existing intent implement an intent to assist users arranged automatic re payments, industry basic questions regarding your car loan solutions, and also redirect users up to a sibling bot that handles mortgage applications.
Monitoring bot interactions is crucial in building effective conversational interfaces. You can easily 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 data via Kinesis Data Firehose. It is possible to layer this analytics solution along with any of your Amazon Lex bots – give it a go!