Creating business cleverness dashboard for the Amazon Lex bots

You’ve rolled down an interface that is conversational by Amazon Lex, with an objective of enhancing the consumer experience for your clients. So Now you wish to monitor how good it is working. Are your prospects finding it helpful? Exactly How will they be deploying it? Do they enjoy it sufficient to keep coming back? How can you evaluate their interactions to add more functionality? With no clear view into your bot’s user interactions, questions like these could be hard to respond to. The current release of conversation logs for Amazon Lex makes it simple to obtain visibility that is near-real-time exactly how your Lex bots are doing, centered on real bot interactions. All bot interactions can be stored in Amazon CloudWatch Logs log groups with conversation logs. You need to use this conversation information to monitor your bot and gain insights that are actionable improving your bot to boost an individual experience for the clients.

In a blog that is prior, we demonstrated how to allow discussion logs and make use of CloudWatch Logs Insights to analyze your bot interactions. This post goes one action further by showing you the way to incorporate having an Amazon QuickSight dashboard to get business insights. Amazon QuickSight allows you to easily create and publish dashboards that are interactive. It is possible to pick from a considerable collection of visualizations, charts, and tables, and include interactive features such as for example drill-downs and filters.

Solution architecture

In this company cleverness dashboard solution, you are going to use an Amazon Kinesis information Firehose to continuously stream discussion log information from Amazon CloudWatch Logs to an amazon bucket that is s3. The Firehose delivery flow employs A aws that is serverless lambda to transform 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 which will create an AWS CloudFormation stack for you personally containing each one of these AWS resources, along with the required AWS Identity and Access Management (IAM) roles. By using these resources set up, after that you can make your dashboard in Amazon QuickSight and hook up to Athena as 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, utilizing the AutoLoanBot from the earlier mentioned post, it is possible to visualize individual needs by intent, or by intent and user, to get an awareness about bot use and individual pages. The dashboard that is following these visualizations:

This dashboard shows that re re payment task and applications are many greatly utilized, but checking loan balances is utilized a lot 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 our instance, we’re making use of the AutoLoanBot, but this solution can be used by you to construct an Amazon QuickSight dashboard for almost any of the Amazon Lex bots.

The AutoLoanBot implements an interface that is conversational enable users to start that loan application, check out the outstanding stability of these loan, or make that loan re re payment. It includes the following intents:

  • Welcome – reacts to a greeting that is initial 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 final four digits of these Social Security quantity, and re payment information, and processes their month-to-month installment
  • CheckBalance – makes use of the user’s account quantity plus the final four digits of these Social Security quantity to present their outstanding balance
  • Fallback – reacts to virtually any demands that the bot cannot process aided by the other intents

To deploy this solution, finish the steps that are following

  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 name, enter a true name for the stack. This post utilizes the true title lex-logs-analysis:
  3. Under Lex Bot, for Bot, enter the title of one’s bot.
  4. 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 utilizes the bot AutoLoanBot additionally the log team car-loan-bot-text-logs:

  1. Select Then.
  2. Add any tags you might wish for your CloudFormation stack.
  3. Select Upcoming.
  4. Acknowledge that IAM functions may be produced.
  5. Select Create stack.

After a couple of minutes, your stack must certanly 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 S3 bucket
  • 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 raw 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 stream to your CloudWatch Logs log team. The subscription can be seen by you into the AWS CloudWatch Logs system, for instance:

As of this 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 conversation 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 flow runs every minute and channels the info to your bucket that is s3. The crawler is configured to operate every 10 moments (you can also run it anytime manually through the system). Following the crawler has run, it is possible to query important computer data via Athena. The screenshot that is following a test question you can look at when you look at the Athena Query Editor:

This question reveals that some users are operating into problems wanting to check always their loan balance. You are able to put up Amazon QuickSight to do more analyses that are in-depth visualizations with this information. To achieve this, finish the following actions:

  1. Through the system, launch Amazon QuickSight.

If you’re perhaps not already making use of QuickSight, you could start with a free of charge test utilizing Amazon QuickSight Standard Edition. You ought to offer a free account title and notification email. As well as choosing Amazon Athena as a information source, remember to range from the bucket that is s3 your discussion log information is stored (you will get the bucket title in your CloudFormation stack).

Normally it takes a couple of minutes to create up your account.

  1. As soon as your account is prepared, select New analysis.
  2. Choose 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. Choose the database that AWS Glue created (which include lexlogsdatabase into the true title).

Incorporating visualizations

You can now include visualizations in Amazon QuickSight. To generate the 2 visualizations shown above, finish the steps that are following

  1. Through the + Add symbol towards the top of the dashboard, select Add visual.
  2. Drag the intent industry into the Y axis regarding the artistic.
  3. Include another artistic by saying 1st two actions.
  4. In the 2nd visual, drag userid to your Group/Color industry well.
  5. To sort the visuals, drag requestid to your Value field in every one.

You can easily produce some additional visualizations to gain some insights into exactly how well your bot is doing. As an example, 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. For this, replicate the visualizations that are preceding change the intent measurement with inputTranscript, and include 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 word cloud visualization for missed utterances.

This sort 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 boost 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 sibling bot that handles mortgage applications.

Summary

Monitoring bot interactions is crucial in building effective interfaces that are conversational. It is possible to know very well what your installment loans online alaska no credit check users want to accomplish and just how to streamline their consumer 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 an attempt!