From the course: Developing Modern Applications with AWS AI and Generative AI Services

Amazon Lex

- [Instructor] Let's learn how to build chatbots and voice assistance using AWS AI services, and let's start with Amazon Lex. Amazon Lex is a fully-managed AI service that enables developers to build, test, and deploy conversational interfaces like chatbots and voice assistance into applications. It uses automatic speech recognition and natural language understanding to build a highly engaging, lifelike experience. Before proceeding, let's understand Amazon Lex's core concepts and terminologies. The first one is bot. You can think of bot as an agent that executes tasks like booking a hotel or a flight ticket. They are powered by automatic speech recognition and natural language understanding capabilities. Next is intent. Intents are the actions performed by the bot. A bot can support one or more intents. Next is the utterances, which are different ways the intent is expressed. For example, booking a flight intent can be expressed as, "I want to book a flight," or "Can you help me schedule a flight?" Next, the slots, which are the placeholders for key pieces of information that a bot requires to fulfill the intent. For example, the bot needs information like day, departure city, and destination city to book a flight. Next is prompts, which are the questions the bot asks when a required slot is missing data. Finally, fulfillment, which indicates how a bot takes action once all the required data is gathered, like calling an API to book a flight. Let's turn our attention and understand Amazon Lex's key feature. Its supports multi-turn conversations, supporting back and forth questions and answers. It can process both text and speech. Amazon Lex is tightly integrated with AWS Lambda and Amazon Connect, which is an omnichannel cloud contact center. You can add custom vocabulary to create chatbots that understands industry-specific terminologies. Finally, the bots can be integrated into mobile apps, websites, social media, and messaging apps. Now that you learned the features, let's understand how Amazon Lex works. It all starts with a user feeding the data, either in a text or speech format. Amazon Lex converts a voice input to text, and analyzes the intent of the message, ensure all the slots are filled, and prompt the user for any missing slots. Once all the required data is gathered, the bot invokes downstream services like AWS Lambda or other third-party applications to fulfill the intent. The response is then returned back to the user in text or speech format. Let's wrap up this lesson by exploring the use cases. Creating customer support chat chatbots to answer common questions in industries like banking, retail, and healthcare, and creating smart, voice-enabled apps for home automation, answering single employee queries, HR-related questions, leave requests and policy queries, and order processing and booking bots that can automate flight and hotel booking in the travel and hospitality industry.

Contents