How to build an Amazon Lex conversational Chatbot
Posted By : Ravindra Singh | 30-Apr-2018
What is Amazon Lex :
Amazon Lex is an AWS (Amazon Web Service) service for building quickly voice as well as text conversational chatbot for any application, Amazon Lex provides the deep functionality and flexibility of (NLU stands for natural language understanding) and (ASR stands for automatic speech recognition) so anyone can build highly engaging user experiences conversational interaction chatbot.
Creating an aws Lex chatbot, you just need to specify the basic conversation flow in the aws Lex console. Amazon Lex manages the dialogue flow and dynamically adjusts the responses in the conversation of the chatbot. By using the Lex console, you can build, test, and publish your text or voice chatbot. You can then add the conversational interfaces to bots on mobile devices, web applications, and chat platforms (for e.g, Facebook Messenger).
Benefits of using amazon Lex :
1. Simplicity : Simplicity means AWS Lex instruct you through the console to follow simple steps to create a conversational chatbot to ready to ask questions, get answers within a few minutes.
2. Sophisticated deep learning technologies: AWS Lex provides automatic speech recognition (ASR) and natural language understanding(NLU) technologies to create a Speech-Language Understanding (SLU) system. in present time Speech recognition and natural language understanding are some of the most challenging problems to solve in computer science, requiring sophisticated deep learning algorithms to be trained on massive amounts of data and infrastructure.
3. Easily deployment and Scaling: By using AWS Lex, you can build, test, and deploy your chatbots directly from the Amazon Lex console. Amazon Lex enables you to easily publish your conversational voice or text chatbots for chat services, for example, Facebook Messenger.
4.Lex Native integration with AWS Platform: The Beautiful functionality of AWSLex is, AWS Lex has native integration with other AWS services, such as AWS Lambda, Amazon CloudWatch, and Amazon Cognito. You can take a benefit of AWS platform services like security, monitoring, user authentication, storage etc.
5.Cost effective (pay-as-you-go) : For Using Amazon Lex, Amazon not set any upfront or minimum fees. amazon used the concept of (pay-as-you-go pricing) for the text or speech requests that are made.
Amazon Lex Basic Concepts :
-> Amazon Lex chatbot consist of four types of components:
1. Bot: The Bot basically the main component, we provide a bot name that what type of chatbot we want to create ( example.OrderFlowers, BookTrip etc ).
2. Intents: Intent is basically an action that the bots user wants to achieve, for more clarification we take an example such as chatbot name is BookTrip and it has many intents BookHotel, BookCar etc.
3. Slot Type: The Slot type is just like parameters that take the value from Lex console through user input.(example: Booking Date, quantity etc).
4. Utterances: Utterances is Simply like a number questions fire by users.(Example: I want to book a hotel tomorrow etc).
5. Lambda initialization and validation: It is used to validation of user input with lambda, Here we provide Lambda function Name that we have created on Amazon Lambda Management Console.
6. FulFillment: here also we provide the Lambda function name for amazon Lex talks with lambda function with user input to fulfill the chatbot actions.
-> Amazon Lex basic flow of implementation and execution with java:
Amazon Lex enables you to create conversational chatbot interfaces using speech or text.
1.The first step is to create or Setup an AWS account with IAM Authentication.
2.The second step to create a chatbot and configure it with one or more intents that you want to support or actions. By Configuring the bot it will be ready to understands the user's goal (intent).
3. The third step is to Test the bot. You can use the test window client provided by the Amazon Lex console.
4. The fourth step is to publish a version and create an alias.
5. The Fifth Step is to Simply deploy the chatbot on platforms such as mobile applications or messaging platforms such as Facebook Messenger.
Amazon Lex Architecture :
1. Conversational flow diagram of aws Lex with Lambda in Java:
2.Amazon Lex Detailed Architecture :
3. BluePrints of how to create amazon Lex :
Step 1. Below is the AWS Lex console screen where we can start to create new chatbot by click on create button :
Step 2. Below Screen shows how to add Intents, Utterances and slot type :
Step 3. below screen show how to integrating Lambda function with aws Lex, first it will ask for permission :
Step 4. Below screen shows the AWS Lex Provide own console on the right side for testing with text as well as Voice input :
Step 5. Below screen shows how the conversation is flowing on the Chatbot testing console :
We are a seasoned chatbot development company that builds interactive conversational UIs to enhance user experiences with automated responses. Our chatbot developers use popular AI toolkits and SDKs to build cross-platform chatbot apps that effectively handle multiple communications in parallel.
Thanks
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Ravindra Singh
Ravindra is Sr. Associate Consultant Development- Java (Backend Developer). And Familiar with AWS Cloud Machine Learning Programming (AWS Lex, Lambda, Polly, Elasticsearch ), And also having good experience in Spring Boot Microservice Architecture Applica