You’ve rolled away an interface that is conversational by Amazon Lex, with a target of enhancing the consumer experience for the clients. So Now you wish to monitor how good it is working. Are your web visitors finding it helpful? Exactly exactly How will they be deploying it? Do they enjoy it sufficient to keep coming back? How can you analyze their interactions to add more functionality? Without having a clear view into your bot’s user interactions, concerns such as these may be tough to respond to. The present launch of conversation logs for Amazon Lex makes it simple to obtain visibility that is near-real-time just exactly just how your Lex bots are doing, according to real bot interactions. With discussion logs, all bot interactions may be saved in Amazon CloudWatch Logs log teams. You need to use this conversation information to monitor your bot and gain insights that are actionable boosting your bot to enhance the consumer experience for the clients.
In a previous article, we demonstrated just how to allow conversation logs and make use of CloudWatch Logs Insights to evaluate your bot interactions. This post goes one step 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 interactive dashboards. You can easily pick from a considerable collection of visualizations, maps, and tables, and include interactive features such as for instance drill-downs and filters.
Solution architecture
In this business cleverness dashboard solution, you can expect to 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 flow employs a serverless aws lambda function to transform the raw information into JSON information documents. Then you’ll usage an AWS Glue crawler to automatically learn and catalog metadata because of this information, so with Amazon Athena that you can query it. A template is roofed below which will produce an AWS CloudFormation stack for your needs containing a few of these AWS resources, along with the required AWS Identity and Access Management (IAM) roles. By using these resources in position, then you can make your dashboard in Amazon QuickSight and connect with Athena as being a databases.
This solution enables you to make use of your Amazon Lex conversation logs information to produce real time 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 intent and individual, to achieve a knowledge about bot use and individual profiles. The dashboard that is following these visualizations:
This dashboard suggests that re payment task and applications are many greatly utilized, but checking loan balances is utilized notably less usually.
Deploying the answer
To obtain started, configure an Amazon Lex bot and conversation that is enable in america East (N. Virginia) Region.
For the instance, we’re utilising the AutoLoanBot, but you can make use of this solution to create an Amazon QuickSight dashboard for just about any of the Amazon Lex bots.
The AutoLoanBot implements an interface that is conversational enable users to start a loan application, look at the outstanding stability of these loan, or make that loan re re payment. It includes the following intents:
- Welcome – Responds to a preliminary greeting from the consumer
- ApplyLoan – Elicits information including 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 final four digits of the Social Security quantity, and re re payment information, and operations their month-to-month installment
- CheckBalance – makes use of the user’s account quantity additionally the final four digits of these Social Security quantity to deliver their outstanding stability
- Fallback – reacts to your needs that the bot cannot process with all the other intents
To deploy this solution, finish the steps that are following
- Once you’ve your bot and conversation logs configured, use the button that is following introduce an AWS CloudFormation stack in us-east-1:
- For Stack name, enter title for the stack. This post utilizes the title lex-logs-analysis:
- Under Lex Bot, for Bot, enter the true title of the 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.
This post utilizes the bot AutoLoanBot while the log team car-loan-bot-text-logs:
- Select Upcoming.
- Include any tags you might desire for the CloudFormation stack.
- Select Then.
- Acknowledge that IAM functions are going to be developed.
- Choose 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 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 find out 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 observe the membership when you look at the AWS CloudWatch Logs console, as an example:
Only at that true point, you need to be in a position to examine your bot, see your log information moving from CloudWatch Logs to S3 through the Firehose delivery stream, and query your discussion log data 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 download the test script, choose test-bot. Zip.
The Firehose delivery flow operates every minute and channels the info to your 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 are able to query important computer data via Athena. The screenshot that is following a test question you can test into the Athena Query Editor:
This question reveals that some users are operating into dilemmas wanting to check always their loan stability. You can easily put up Amazon QuickSight to do more in-depth analyses and visualizations with 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 merchant account notification and name current email address. Along with choosing Amazon Athena being a data source, remember to range from the S3 bucket where your discussion log information is saved (you are able to find the bucket title in your CloudFormation stack).
Normally it takes a few momemts to create your account up.
- As soon as your account is prepared, select New analysis.
- Select Brand New information set.
- Select Anthena.
- Specify the info source 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 in the title).
Incorporating visualizations
You can now include visualizations in Amazon QuickSight. To generate the 2 visualizations shown above, finish the following steps:
- Through the + include icon at the top of the dashboard, select Add visual.
- Drag the intent industry to your Y axis from the artistic.
- Include another artistic by saying the initial two actions.
- Regarding installment loans new jersey the second visual, drag userid to the Group/Color industry well.
- To sort the visuals, drag requestid towards the Value field in each one of these.
It is possible to create some extra visualizations to gain some insights into just how well 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 requests that fell until the fallback intent. To achieve this, replicate the preceding visualizations but change the intent dimension 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 sort of visualization supplies a view that is powerful exactly just just how your users are getting together with your bot. In this instance, you could utilize this understanding to enhance the CheckBalance that is existing intent implement an intent to simply help users put up automatic re re payments, industry basic questions regarding your car finance solutions, and also redirect users up to a sis bot that handles home loan applications.
Summary
Monitoring bot interactions is crucial in building effective conversational interfaces. It is possible to determine what your users are trying to achieve and exactly how to streamline their consumer experience. Amazon QuickSight in tandem with Amazon Lex conversation logs makes it simple 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 a go!