Latest Industry News

Developing business cleverness dashboard for the Amazon Lex bots

Developing business cleverness dashboard for the Amazon Lex bots

You’ve rolled away an interface that is conversational by Amazon Lex, with an objective of improving the consumer experience for the clients. Now you like to monitor how good it is working. Are your web visitors finding it helpful? Just How will they be utilizing it? Do they enjoy it sufficient to keep coming back? How will you evaluate their interactions to add more functionality? With out a view that is clear your bot’s user interactions, concerns like these could be tough to respond to. The current launch of conversation logs for Amazon Lex makes it simple to obtain visibility that is near-real-time just how your Lex bots are performing, centered on real bot interactions. With conversation logs, all bot interactions may be kept 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 boost an individual experience for the clients.

In a blog that is prior, we demonstrated just how 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 integrate 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 add interactive features such as for example drill-downs and filters.

Solution architecture

In this company intelligence dashboard solution, you can expect to make use of an Amazon Kinesis information Firehose to constantly stream discussion log data from Amazon CloudWatch Logs to A amazon s3 bucket. The Firehose delivery flow employs a serverless aws lambda function to change the natural information into JSON information documents. Then you’ll use an AWS Glue crawler to automatically learn and catalog metadata because of 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 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 databases.

This solution lets you make use of your Amazon Lex conversation logs information to produce visualizations that are live Amazon QuickSight. For instance, utilising the AutoLoanBot through the mentioned before article, you are able to visualize individual needs by intent, or by intent and user, to achieve an awareness about bot use and individual pages. The after dashboard shows these visualizations:

This dashboard suggests that re payment task and applications are many greatly used, but checking loan balances is utilized a lot less often.

Deploying the perfect solution is

To have started, configure an Amazon Lex bot and conversation that is enable in america East (N. Virginia) Area.

For the instance, we’re utilizing the AutoLoanBot, but you can make use of this solution to construct an Amazon QuickSight dashboard for just about any of one’s Amazon Lex bots.

The AutoLoanBot implements a conversational user interface to allow users to start that loan application, check out the outstanding stability of the loan, or make that loan payment. It includes the intents that are following

  • Welcome – Responds to a short greeting from the consumer
  • ApplyLoan – Elicits information including the user’s title, target, and Social Security quantity, and creates a brand new loan demand
  • PayInstallment – Captures the user’s account number, the final four digits of the Social Security quantity, and re payment information, and operations their month-to-month installment
  • CheckBalance – utilizes the user’s account quantity and also the final four digits of the Social Security quantity to produce their outstanding stability
  • Fallback – Responds to virtually any needs that the bot cannot process using the other intents

To deploy this solution, finish the following actions:

  1. After you have your bot and conversation logs configured, use the button that is following introduce an AWS CloudFormation stack in us-east-1:
  2. For Stack title, enter name for the stack. This post makes use of the title lex-logs-analysis:
  3. Under Lex Bot, for Bot, enter the true title of one’s bot.
  4. For CloudWatch Log Group for Lex discussion Logs, go into the name associated with CloudWatch Logs log team where your discussion logs are configured.

This post utilizes the bot AutoLoanBot plus the log team car-loan-bot-text-logs:

  1. Choose online installment loan north dakota Upcoming.
  2. Include any tags you may desire for the CloudFormation stack.
  3. Select Upcoming.
  4. Acknowledge that IAM functions will soon be created.
  5. Select Create stack.

After a couple of minutes, your stack ought to be complete and retain 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 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 specific JSON information documents grouped into batches. To find out more, see Amazon Kinesis Data Firehose Data Transformation.

AWS CloudFormation should have successfully subscribed also the Firehose delivery flow to your CloudWatch Logs log team. You can view the membership when you look at 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, visit your log information 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 flow operates every minute and streams the info to your S3 bucket. The crawler is configured to run every 10 moments (you may also run it anytime manually through the system). Following the crawler has run, it is possible to query your computer data via Athena. The screenshot that is following a test question you can test into the Athena Query Editor:

This question demonstrates that some users are operating into dilemmas attempting to always check their loan stability. You’ll put up Amazon QuickSight to do more analyses that are in-depth visualizations for this information. To work on this, finish the steps that are following

  1. Through the system, launch Amazon QuickSight.

If you’re maybe not already making use of QuickSight, you can begin with a free of charge test making use of Amazon QuickSight Standard Edition. You will need to offer a merchant account notification and name email. As well as selecting Amazon Athena being a information source, remember to range from the bucket that is s3 your discussion log information is kept (you will find the bucket name in your CloudFormation stack).

Normally it takes a short while to create up your bank account.

  1. As soon as your account is prepared, select New analysis.
  2. Select 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 (including lexlogsdatabase within the true title).

Including visualizations

You can now add visualizations in Amazon QuickSight. To produce the 2 visualizations shown above, finish the following actions:

  1. Through the + Add symbol towards the top of the dashboard, select Add visual.
  2. Drag the intent industry to your Y axis in the artistic.
  3. Include another artistic by saying the very first two actions.
  4. Regarding 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 are able to create some extra visualizations to gain some insights into how good your bot is doing. For instance, you’ll assess just how efficiently your bot is giving an answer to your users by drilling on to the demands that fell until the fallback intent. To get this done, replicate the visualizations that are preceding change the intent measurement with inputTranscript, and include a filter for missedUtterance = 1 ) The after graphs show summaries of missed utterances, and missed utterances by individual.

The after screen shot shows your term cloud visualization for missed utterances.

This kind of visualization offers a view that is powerful exactly just exactly how your users are getting together with your bot. In this instance, you could utilize this understanding to boost the current CheckBalance intent, implement an intent to aid users put up automatic payments, industry basic questions regarding your car loan services, and also redirect users to a sis bot that handles mortgage applications.


Monitoring bot interactions is important in building effective conversational interfaces. It is possible to know very well what your users are making an effort 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 information via Kinesis information Firehose. It is possible to layer this analytics solution in addition to all of your Amazon Lex bots – give it a go!

Leave comments

Your email address will not be published.*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Back to top