You’ve rolled away a conversational software driven by Amazon Lex, with an objective of enhancing the user experience for the clients. Now you desire to monitor how good it is working. Are your prospects finding it helpful? Exactly just How will they be utilizing it? Do they want it sufficient to return? How could you evaluate their interactions to add more functionality? Without having a clear view into your bot’s user interactions, concerns like these could be hard to respond to. The current launch of conversation logs for Amazon Lex makes it simple to have near-real-time presence into just exactly how your Lex bots are doing, predicated on 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 actionable insights for boosting your bot to enhance an individual experience for the clients.
In a previous post, we demonstrated how exactly to allow discussion logs and employ CloudWatch Logs Insights to assess 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 easily produce and publish dashboards that are interactive. You can easily select from a library that is extensive of, maps, and tables, and include interactive features such as for instance drill-downs and filters.
Solution architecture
In this company cleverness dashboard solution, you certainly will make use of 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 with this information, therefore that one may query it with Amazon Athena. A template is roofed below which will produce 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 one of these resources set up, you may then make your dashboard in Amazon QuickSight and hook up to Athena being a databases.
This solution enables you to make use of your Amazon Lex conversation logs information to produce visualizations that are live Amazon QuickSight. As an example, utilizing the AutoLoanBot through the earlier mentioned post, you are able to visualize individual needs by intent, or by intent and individual, to gain an awareness 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 significantly less frequently.
Deploying the answer
To have started, configure an Amazon Lex bot and conversation that is enable in america East (N. Virginia) Area.
For the instance, we’re utilising the AutoLoanBot, but you should use this solution to https://speedyloan.net/installment-loans-pa 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, look at the outstanding balance of the loan, or make that loan re payment. It includes the intents that are following
- Welcome – reacts to a preliminary greeting from the consumer
- ApplyLoan – Elicits information like the user’s name, target, and Social Security Number, and produces a brand new loan demand
- 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 together with final four digits of these Social Security quantity to deliver their outstanding stability
- Fallback – reacts to virtually any needs 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 button that is following introduce an AWS CloudFormation stack in us-east-1:
- For Stack title, enter title for the stack. This post makes use of the true 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, go into the title of this 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:
- Select Then.
- Include any tags you may desire for the CloudFormation stack.
- Select Upcoming.
- Acknowledge that IAM functions should be produced.
- 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 for the Lambda function
- An S3 bucket
- 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 data that are raw 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 also provide effectively subscribed the Firehose delivery flow to your CloudWatch Logs log team. You can view the subscription when you look at the AWS CloudWatch Logs system, as an example:
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 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 operates every minute and channels the information into the S3 bucket. The crawler is configured to perform every 10 minutes(you can also anytime run it manually through the system). Following the crawler has run, you can easily query important computer data via Athena. The screenshot that is following a test query you can test when you look at the Athena Query Editor:
This question implies that some users are operating into dilemmas wanting to check always their loan stability. You are able to create Amazon QuickSight to do more analyses that are in-depth visualizations for this information. To achieve this, finish the following actions:
- Through the system, launch Amazon QuickSight.
If you’re maybe not already making use of QuickSight, you could begin with a free of charge test utilizing Amazon QuickSight Standard Edition. You’ll want to offer a free account notification and name current email address. Along with selecting Amazon Athena as an information source, be sure to are the S3 bucket where your discussion log information is saved (you will get the bucket title in your CloudFormation stack).
It will take a couple of minutes to create up your account.
- Whenever your account is prepared, select New analysis.
- Choose Brand New information set.
- Select Anthena.
- Specify the information supply auto-loan-bot-logs.
- Select Validate connection and confirm connectivity to Athena.
- Select Create repository.
- Find the database that AWS Glue created (which include lexlogsdatabase into the title).
Incorporating visualizations
You can now include visualizations in Amazon QuickSight. To produce the 2 visualizations shown above, finish the following actions:
- Through the + include symbol at the top of the dashboard, select Add visual.
- Drag the intent industry into the Y axis regarding the artistic.
- Include another artistic by repeating the very first two actions.
- In the 2nd visual, drag userid to your Group/Color industry well.
- To sort the visuals, drag requestid to your Value field in each one of these.
You are able to produce some extra visualizations to gain some insights into how good your bot is doing. For instance, you are able 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 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 individual.
The screen that is following shows your term cloud visualization for missed utterances.
This kind of visualization provides a effective view into just how your users are getting together with your bot. In this instance, make use of this understanding to enhance the CheckBalance that is existing intent implement an intent to aid users arranged automatic re re payments, industry general questions regarding your car loan solutions, and also redirect users up to a cousin bot that handles home loan applications.
Summary
Monitoring bot interactions is crucial in building effective conversational interfaces. You are able to 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 makes it simple to generate dashboards by streaming the discussion information via Kinesis information Firehose. You can easily layer this analytics solution together with all of your Amazon Lex bots – give it a go!