I automated chatbot designer in Amazon Lex
Tags: amazonlex, aws, ai, chatbot
Published: 2024-02-19 03:23:25

Chatbots are being increasingly used by businesses to promote self-service and improve the customer experience at scale. Contact center chatbots automate basic consumer inquiries, allowing human agents to focus on more difficult problems. Amazon Lex may be used to create chatbots that provide interesting user experiences and lifelike discussions.

### Introduction

Amazon Lex offers automatic voice recognition and language comprehension technologies that may be used to create excellent chatbots via an easy-to-use console. However, before you can construct a chatbot, you must first design it. The design step of the chatbot development process remains manual, time-consuming, and needs conversational design skills.

The automated chatbot designer extends Amazon Lex's simplicity and convenience of use by automatically surfacing a first bot design. It uses machine learning to evaluate caller-agent conversation transcripts and semantically organizes them around the most prevalent intents and related information. Instead of beginning from scratch, you may utilize the chatbot designer's intent to iterate on the design and reach your desired experience faster.

The automated chatbot designer can evaluate thousands of lines of transcripts in a few hours, saving time and effort. This helps to ensure that the intentions are adequately defined and separated by eliminating any overlaps between them. This allows the bot to better comprehend the user.

The automated chatbot designer aids in the creation of bots that comprehend user requests without confusion, therefore increasing the end-user experience by minimizing manual work and human mistakes at every stage of chatbot design.

### Create a bot
Proceed to the AWS console and search for Amazon Lex in the search bar

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c0kkyu84p71kphjlo4kw.png)

- Choose create bot

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g8al2zapm62hojnwy2yd.png)

Select the **start with transcript** option as the creation method Give a bot name Give a description that is optional.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cb35885ewhbk5mnxo6jj.png)

- Select Create a role with basic Amazon Lex permissions and use this as your runtime role.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sas7kn6e4l6bce7ukp73.png)

- Click Next to advance to the language configuration.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qp82znjk5qf0jwbznsf5.png)

- Select the S3 bucket and path where the transcripts are stored. Or create a new S3 bucket and upload your folder.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q39mmoi6m8f4v15ns4ta.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v9eejnbdov3apykgyt6y.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rodoq76lakeegyvf5dkp.png)

- Choose Done after selecting the S3 bucket

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b51bop9jfo7bd0f1wpyo.png)

The Intents page displays all intents as well as example phrases and slots, while the Slot types tab displays all slot types as well as slot type values.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q41zjxsgvmf3msv3gr5b.png)

You can choose any of the intents to review the sample utterances and slots. For example, I **chose ChangeSecurityQuestion**.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/666rv4272n6mj4i7nu12.png)

- Click on the associated transcripts to review the conversations used to identify the intents.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dnup0anvlbyazr4wki5z.png)

After reviewing the results, choose the intents and slot types that apply to your use case and click Add to English.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dccyjznlu2st1thg11qq.png)

This adds the selected intents and slot types to the bot. You may now improve on this design by adding prompts, combining intents or slot kinds, and renaming slots.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eskpcj1df97wxzu3xvv5.png)

- Build and test the bot

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xdv0dapere04m7smzqfe.png)

### Conclusion

The chatbot designer evaluates a conversation transcript for common intentions, connected words, and information that the chatbot needs to resolve issues (such as customer policy number, claim type, and so on). You must still iterate on the design to meet the needs of your business, add chatbot prompts and replies, connect business logic to satisfy user requests, and finally build, test, and deploy the chatbot in Amazon Lex.