With Amazon Lex, the same deep learning technologies that power Amazon Alexa are now available to any developer. With Amazon Lex you can build bots to increase contact center productivity, automate simple tasks and drive operational efficiencies across the enterprise. For an introduction to Amazon Lex, read Introduction to chatbots using Amazon Lex.
Components of Lex
The components of Lex are:
- Intent: The action that we would like to perform. For example, booking a hotel or car rental.
- Utterances: Phrases that invoke your intent. For example, “I’d like to book a hotel,” or “I’d like to reserve a car” invokes your intent.
- Slots: The user input data required to fulfill intent.
- Fulfillment: The end goal of your intent.

Figure 1 displays the different components of Amazon Lex using a sample conversation for the intent to book a hotel. [1]

Figure 2 displays how you can set up utterances and slots.
Example
Below is an example of how a Lex chatbot works. The intent below is to book a car. The slots are the input that the user enters. In this example there are five inputs/slots. The five slots here are PickupCity, PickupDate, ReturnDate, DriverAge and CarType. The slots can be defined in the Lex console and the intent can also be defined.
The fulfillment here is the confirmation message that the bot gives you after the intent is fulfilled. We can even integrate our bot with Lambda function to perform further actions. For example, sending an email after the fulfillment of the intent.








