DEV Community

Cover image for Build a Star Trek custom bot with Amazon Lex Automated Chatbot Designer (Preview) - Conversational AI - Part 2
Wendy Wong for AWS Community Builders

Posted on • Updated on

Build a Star Trek custom bot with Amazon Lex Automated Chatbot Designer (Preview) - Conversational AI - Part 2

Introduction

In the previous blog, we explored building a chabot with existing data using Amazon Lex Automated Chatbot Designer (Preview) to book a flight recommended for development and not for production workloads.

Where do I find audio transcripts?

The challenge in any data analytic or machine learning project is to find quality data. You may search for possible audio transcripts in JSON file format from the following sources:

AWS Data exchange

Pre-requisite - Create an Amazon S3 bucket

Ensure that you are able to source quality audio transcripts in JSON file format which you can store in an Amazon S3 bucket.

I was able to locate a Star Trek audio transcript from Github but the link is no longer available as at 18 April 2024.

Step 1: Sign in with IAM user role
Step 2: In navigation bar search for Amazon S3
Step 3: In Amazon S3 console click Create Bucket
Step 4: Name your bucket e.g. startrekmovie and change the region to US East (N.Virginia) us-east-1

give bucket name

Step 5: Scroll to the bottom of the screen and click Create Bucket.

Step 6: Click the Startrekmovie bucket and click Upload then click Add file and finally click Upload.

The startrekdialogue_v2.json file will be uploaded into your Amazon S3 bucket

upload

Step 7: The Amazon S3 bucket has successfully been created.

bucket created

Tutorial: Create a StarTrek custom bot with Amazon Lex Automated Chatbot Designer (Preview)

You can access Amazon Lex V2 from the Amazon Lex console and create a bot to analyze thousands of lines of transripts and deep learning will be able to quickly determine the intent.

You may follow the steps in this tutorial to create a custom bot follows the steps outlined in the blog written by Priyanka Tiwari and Harshal Pimpalkhute on 1 December 2021 'Expedite conversation design with automated chatbot designer in Amazon Lex.

Step 1: Sign in to the AWS Management Console and open the Amazon Lex V2 console change your AWS region to US East (N.Virginia) us-east-1 from the drop-down menu.

consoleon

create bot
Click Create bot.

Step 2: Select Start with transcripts as the bot creation method.

start with transcripts

Step 3: Under Bot Configuration, give the bot a name e.g. StarTrekBot

Provide a description of the Bot e.g. Helpdesk to fly to the moon

Step 4: Select Create a role with basic Amazon Lex Permissions and a new IAM role will be created for Amazon Lex V2.

IAM bot

Step 5: Under Children's Privacy Protection Act (COPPA) if the bot will not be accessed by minors under age 18 you may select No.

COPPA

Click Next.

Next

Amazon Automated Chatbot Designer (Preview) is only available in US English as at 1 December 2021.

Step 6: Add language to the custom bot.

You may experiment with the different languages or retain the default settings.

Kimberly

Step 6: Choose the S3 bucket path where the transcript i.e. Star Trek Dialogue was saved

S3 for V2

Step 7: An optional step is to use AWS Key Management Service (AWS KMS) to encrypt output transcripts.

Step 8: You can specify a date range for the bot to read transcripts.

Step 9: Select Done

The bot will take a few hours to analyze the intents and associated phrases of the intent.

Note: Amazon will update your service role with Amazon Lex permissions to access the S3 bucket if you created an Amazon Lex V2 role to read transcripts.

If you created your own Amazon Lex V2 role this will need to be updated and you may read the documentation here.

read transcipts

Step 10: You may review the intents derived from the Automated Chatbot designer.

Happy Learning! 😁

Here is a link to the slides on Github from the AWS User Group Malaysia Meetup on 9 March 2022.

If you are in the Asia Pacific region and Japan, you may join an AWS User Group such as AWS User Group Malaysia Meetup at this link or join an AWS User Group in your city by accessing this link

Resources

References

Top comments (0)