


Lex provides a test window where you can test your bot and see how the bot replies to the user’s queries. Build test and publish the botĪfter finishing all the configurations, you need to build your bot before you start testing. Let’s now jump into testing your bot and integrating it in a website. This was all about learning the basic functioning of the Amazon Lex platform. Further, Lex forwards this response to the end-user. Then it returns the result to Lex in the aforementioned format. In our flight booking scenario, our Lambda function calls the flight search APIs to get the result for the user’s query. The Lambda function thus performs the business logic. Lex sends data to the lambda function in a specific format mentioned here. When a user provides all of the slot data required to fulfill the intent, your Lambda function will be invoked, if enabled. Configuring Lambda functions as fulfillment You can configure fulfillment after finishing the slot configuration.

Here is how your Amazon Lex console looks with this configuration. Now, let’s identify the other possible slots in the above conversation. You can configure a slot so that your bot can detect the parameter “DestinationCity” and populate it with the value “New York” or whichever city presents in the user’s query. Lex provides some inbuilt intents and slot types to extract the basic information i.e city names, dates, some measurement units, etc. Slots contain structured data that can easily be used to perform some logic or generate responses.Įach slot has a type that dictates the type of value slot would contain. The value of a slot is extracted dynamically at runtime from the user’s query. Slots are the parameters that are defined as part of the intent configuration. Lex returns the information(intent detail and slots) back to the client application to do the necessary fulfillment.Lex will send all details (intent detail and slots) and the Lambda function will perform the action and decide which response to be sent to the user. Create a Lambda function to fulfill the intent: Amazon recommends to create a Lambda function which will be called when the intent is triggered.There are two ways to define fulfillment: Fulfilling the intentįulfillments are the responses that the bot sends when an intent is triggered.
#Amazon chatbot how to
If an intent is matched, Lex will check how to fulfill the intent. Suppose, if none of the intents are matched you can set a message in the Error Handling section to handle such scenarios. If multiple intents are matched the best match is triggered. When a user uses any of these sentences then this model identifies the intent. You can use these expressions to build a model to categorize the user’s queries. You can provide these expressions while configuring the intent. There are multiple ways to ask a bot to book your flight: These are basically phrases that mean the same as our defined intent. This is the collection of possible expressions that an end-user might say. These combined intents can handle a complete conversation. You can configure a bot to support multiple intents. You can use the Sample utterance to match the user’s query with an intent. Every intent has a set of Sample utterances. When an end-user interacts with the bot, the user’s query is matched to the best intent available in the bot.
#Amazon chatbot free
To create this conversation flow using Lex lets first discuss the terminology and concepts used in Lex console. You can create a free account in Amazon Lex to build your chatbot.Īn intent represents an action that the user wants to perform. Here, the bot collects the basic information from the user, processes it and displays the search results to the user. Searching for a flight for 10th of October and return for 15th october. Do you want me to book a return ticket as well?īot: Please help me with the date of your return.īot – Alright. User: I am planning to fly on 10th of October.īot: Ok. User: Book me a flight to New York from Boston. To understand the Lex platform, let’s consider the below conversation between a flight booking chatbot and a user: In this blog, I will help you to understand the basic concepts of Lex and explain how to create a bot and integrate it into your website.īonus: Don’t know to code? Try our codeless bot builder. Notably, popular Amazon products such as Alexa are powered by the same technology as that of Amazon Lex. Lex has quickly become popular among chatbots enthusiasts. Amazon Lex is a service by AWS for building conversational interfaces into any application using voice and text.
