pio3 - Fotolia


Amazon Lex flexes Alexa's machine learning muscles

Alexa's skills are limited for developers who wanted to add voice recognition capabilities to certain apps. Amazon Lex extends the technology for savvy enterprise IT teams.

Amazon Echo is equipped with Alexa, an always-on microphone designed specifically for voice recognition. While...

the ability to build Alexa skills and custom commands into enterprise apps is intriguing, teams are often constrained to simple commands. One AWS tool furthers the conversation.

Amazon Lex, which was introduced at AWS re:Invent 2016, uses automatic speech recognition and natural language understanding to process speech and respond accordingly to a request. The service, which is the core system that powers Alexa, can expand voice recognition capabilities for developers who want full-fledged conversational interfaces built into an application. Amazon Lex aims to open up Alexa's technology for broader developmental use.

With Alexa, users need a keyword and the application name to trigger a response. And while AWS provides application programming interfaces (APIs) to run Alexa on devices, they are mostly limited to listening to audio, converting to text, and running a command; users must know about a particular skill that enables it.

The brains behind Lex

Alexa skills and Amazon Lex bots are nearly identical in terms of terminology and overall structure. At time of publication, Lex is restricted as a developer preview but is accessible through the AWS Management Console.

The top level of Lex is a bot; developers can have multiple bots -- each with its own set of skills -- and populate them with Intents, or requests to an application. A user triggers an Intent with one or more spoken words or phrases called Utterances. Developers program Utterances to accept any range of inputs, like a state name, generic location or time. This enables them to specify a template of a sentence to respond to, such as, "Play {song} at {time}." That phrase would match a string, such as, "Play Bruno Mars at 5 p.m. tonight." It also allows a developer to prompt for specific parameters if they're not specified. If the user doesn't specify what time to play the song, Lex would ask, "When would you like me to play Bruno Mars?" The user then responds and completes the Intent.

Lex can also return enriched responses, known as Cards, in addition to plain text. This enables developers to show images, videos or chosen responses instead of requiring users to respond with text. Not all platforms support Cards, so it's important to ensure all applications can function without them.

Amazon Lex connects to different platforms via Channels. Facebook is currently the only supported channel; AWS plans to add more in the future, including Slack, Skype and Twilio. These Channels allow developers to provide one singular chat bot application that connects to users on different platforms.

Developers also can use an API to submit text or audio to the platform to build custom artificial intelligence (AI) logic directly into any web or mobile application. This could enable enterprise IT to build Lex into any standard search system to provide answers to common questions. The API can also help developers integrate custom help systems into their platforms.

But not all bots work with Amazon Lex because the tool is designed to use text input, not links. The Claudia Bot Builder might be a better option in such cases -- where bots perform simple searches or other non-interactive requests. Claudia uses AWS Lambda and Amazon API Gateway, and it automatically sets up the bot to just take any generic text input. It even has a script to help developers get started.

Lex is an expert system platform

Amazon Lex helps developers build an expert system for an application. The core of an expert system is the same regardless of the application, so it makes sense to use a platform like Lex to speed up development time and reduce costs that might be prohibitive for smaller companies.

Lex requires actual development work and skill. But non-developers can assist with training the system and building new ways to access the same Intent.

Next Steps

Amazon Lex, Polly and others find a home in call centers

Alexa will find a spot in the enterprise

Amazon Alexa goes beyond Echo for IT use

Dig Deeper on AWS natural language processing