Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Building Conversational and Text Interfaces Using Amazon Lex

Building Conversational and Text Interfaces Using Amazon Lex

This item in japanese

At the recent AWS re:Invent conference, Amazon introduced a preview of their deep learning technology called Amazon Lex. Amazon Lex is powered on the same deep learning technology as Alexa, which is used in the portable Bluetooth and Wi-Fi enabled Amazon Echo speaker.

While the Amazon Echo is a consumer-based product, Vikram Anbazhagan, senior manager at AWS, positions Amazon Lex as:

A new service for building conversational interfaces using voice and text.

Within Amazon Lex, Natural Language Understanding (NLU) & Automatic Speech Recognition (ASR) provide developers with the ability to submit text or audio and receive a contextual response from the service. These conversational applications, also known as Bots, allow for chat-based applications, like Facebook Messenger or Slack, to interact with intelligent backend data services. For example, a developer can build a chat-based application that allows users to ask what the weather forecast is. Amazon Lex, using Natural Language Understanding, will interpret this request, formulate a structured request to a Weather Forecast service, such as a Lambda Function, and return the result to the calling application.

Image Source: (screenshot)

Amazon has provided this service to help developers overcome common challenges when building Bot applications by addressing:

  • Speech Recognition
  • Language Understanding
  • Scale
  • Security
  • Business Logic
  • Mobile
  • Testing
  • Messaging Platforms
  • Disparate Systems

By linking different AWS and other SaaS-based services together, developers can build applications that plug into other ecosystems including:

  • Salesforce
  • Microsoft Dynamics
  • Zendesk
  • Marketo
  • HubSpot
  • Quickbooks

This integration can take place through the Amazon API Gateway, AWS Lambda or the Mobile Hub SaaS Connector. Developers can also connect into on-premises applications using an Amazon Virtual Private Cloud (VPC) connection.

Image Source: (screenshot)

Amazon has introduced some key Amazon Lex concepts that explain the underlying mechanics of the service. These concepts include:

Bot – A bot contains all of the components of a conversation.

Intent – An intent represents a goal that the bot’s user wants to achieve (buying a plane ticket, scheduling an appointment, or getting a weather forecast, and so forth).

Utterance – An utterance is a spoken or typed phrase that invokes an intent. “I want to book a hotel” or “I want to order flowers” are two simple utterances.

Slots – Each slot is a piece of data that the user must supply in order to fulfill the intent. Slots are typed; a travel bot could have slots for cities, states or airports.

Prompt – A prompt is a question that asks the user to supply some data (for a slot) that is needed to fulfill an intent.

Fulfillment – Fulfillment is the business logic that carries out the user’s intent. Lex supports the use of Lambda functions for fulfillment.

Using these concepts, developers can build interactive Bot applications that allow for many different intents to be execute. Some examples of how bots are used to address user intent include news and weather updates, booking hotels and flights, managing bank accounts and connecting wearable devices to backend IoT platforms.

Image Source: (screenshot)

Bot Frameworks and Deep Learning are gaining significant attention within in the industry. Facebook has more than 11,000 bots on its platform alone. Microsoft, in November 2016, announced their Cloud Bot-as-a-Service offering that can be plugged into many chat platforms like Slack, Skype, Microsoft Teams and Twilio. At I/O, Google announced Allo, a smart messaging app with embedded machine learning and more recently announced Google Home, a consumer-based assistant which is similar to the Amazon Echo.

Amazon Lex is available as a preview service in the US East (Northern Virginia) region. Amazon is providing a free trial for the first year with usage caps and consumption-based fees for additional usage.

Rate this Article