You’ve rolled down a conversational software driven by Amazon Lex, with a target of enhancing the consumer experience for the clients. Now you wish to monitor how good it is working. Are your web visitors finding it helpful? Exactly just How are they utilizing it? Do they enjoy it sufficient to keep coming back? How will you evaluate their interactions to add more functionality? Without having 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 have near-real-time exposure into exactly how your Lex bots are doing, centered on real bot interactions. With discussion logs, all bot interactions may be saved in Amazon CloudWatch Logs log teams. You should use this conversation information to monitor your bot and gain insights that are actionable boosting your bot to boost the consumer experience for the clients.
In a blog that is prior, we demonstrated just how 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 by having an Amazon QuickSight dashboard to get company insights. Amazon QuickSight enables you to effortlessly produce and publish dashboards that are interactive. You are able to select from a substantial collection of visualizations, maps, and tables, and include interactive features such as for instance drill-downs and filters.
In this company cleverness dashboard solution, you are going to make use of an Amazon Kinesis information Firehose to constantly stream conversation log information from Amazon CloudWatch Logs to A amazon s3 bucket. The Firehose delivery flow employs a serverless aws lambda function to transform the natural information into JSON information records. Then you’ll usage an AWS Glue crawler to automatically learn and catalog metadata for this information, so with Amazon Athena that you can query it. A template is roofed below that may 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, 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 generate real time visualizations in Amazon QuickSight. As an example, utilising the AutoLoanBot through the mentioned before article, you’ll visualize individual needs by intent, or by intent and individual, to get a knowledge about bot usage and individual pages. The dashboard that is following these visualizations:
This dashboard shows that payment task and loan requests are many greatly utilized, but checking loan balances is utilized significantly less often.
Deploying the clear answer
To obtain started, configure an Amazon Lex bot and enable conversation logs in america East (N. Virginia) Area.
For the instance, we’re utilising the AutoLoanBot, but this solution can be used by you to create an Amazon QuickSight dashboard for just about any of one’s Amazon Lex bots.
The AutoLoanBot implements an interface that is conversational 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 short greeting from the consumer
- 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 – Uses the user’s account quantity plus the final four digits of the Social Security quantity to supply their outstanding balance
- Fallback – reacts to your needs that the bot cannot process using the other intents
To deploy this solution, finish the following actions:
- After you have your bot and discussion logs configured, use the following key to introduce an AWS CloudFormation stack in us-east-1:
- For Stack name, enter a true title for the stack. This post makes use of the title lex-logs-analysis:
- Under Lex Bot, for Bot, enter the true title of one’s bot.
- For CloudWatch Log Group for Lex discussion Logs, enter the title associated with the CloudWatch Logs log team where your discussion logs are configured.
The bot is used by this post AutoLoanBot additionally the log team car-loan-bot-text-logs:
- Select Upcoming.
- Include any tags you may want for your CloudFormation stack.
- Choose Then.
- Acknowledge that IAM functions should be developed.
- Select Create stack.
After a few momemts, your stack must certanly be complete and support the following resources:
- 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 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 individual JSON information documents grouped into batches. To find out more, see Amazon Kinesis information Firehose Data Transformation.
AWS CloudFormation should also provide effectively subscribed the Firehose delivery flow to your CloudWatch Logs log team. You can observe the membership into the AWS CloudWatch Logs system, as an example:
As of this point, you ought to be in a position to test thoroughly your bot, visit your log data moving from CloudWatch Logs to S3 through the Firehose delivery flow, and query your discussion log information making use of 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 stream operates every minute and channels the information towards the bucket that is s3. The crawler is configured to operate every 10 mins (you may also run it anytime manually through the console). Following the crawler has run, you are able to query your computer data via Athena. The screenshot that is following a test question you can test when you look at the Athena Query Editor:
This question suggests that some users are operating into problems wanting to check always their loan stability. It is possible to put up Amazon QuickSight to do more in-depth analyses and visualizations for this information. To get this done, finish the steps that are following
- 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 title and notification current email address. Along with choosing Amazon Athena as an information source, be sure to range from the S3 bucket where your discussion log information is kept (you will find the bucket title in your CloudFormation stack).
Normally it takes a short while to create your account up.
- As soon as your account is prepared, select New analysis.
- Choose Brand Brand New data set.
- Select Anthena.
- Specify the info source auto-loan-bot-logs.
- Select Validate connection and confirm connectivity to Athena.
- Select Create data source.
- Choose the database that AWS Glue created (which include lexlogsdatabase into the title).
You will include visualizations in Amazon QuickSight. To produce the 2 visualizations shown above, finish the steps that are following
- Through the + include symbol at 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 very first two actions.
- From the second visual, drag userid to your Group/Color industry well.
- To sort the visuals, drag requestid towards the Value field in each one of these.
You can easily produce some additional visualizations to gain some insights into how good your bot is doing. For instance, it is possible to effectively evaluate how your bot is giving an answer to your users by drilling on to the demands that dropped until the fallback intent. To get this done, replicate the visualizations that are preceding 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 user.
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 existing CheckBalance intent, implement an intent to help users put up automatic re payments, industry basic questions regarding your car finance solutions, and also redirect users up to a cousin bot that handles home loan applications.
Monitoring bot interactions is important in building effective conversational interfaces. It is possible to determine what your users are attempting to achieve and just how to streamline their user 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 all of your Amazon Lex bots – give it a go!