Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Chatbot Development with Alexa Skills and Amazon Lex

You're reading from   Hands-On Chatbot Development with Alexa Skills and Amazon Lex Create custom conversational and voice interfaces for your Amazon Echo devices and web platforms

Arrow left icon
Product type Paperback
Published in Sep 2018
Publisher Packt
ISBN-13 9781788993487
Length 266 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
Sam Williams Sam Williams
Author Profile Icon Sam Williams
Sam Williams
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Understanding Chatbots FREE CHAPTER 2. Getting Started with AWS and Amazon CLI 3. Creating Your First Alexa Skill 4. Connecting Your Alexa Skills to External APIs 5. Building Your First Amazon Lex Chatbot 6. Connecting a Lex Bot to DynamoDB 7. Publishing Your Chatbot to Facebook, Slack, Twilio, and HTTP 8. Improving the User Experience for Your Bots 9. Review and Continued Development 10. Other Books You May Enjoy Appendix A 1. Appendix B

What this book covers

Chapter 1, Understanding Chatbots, starts by explaining the concepts involved in building a conversational interface. We will learn how to start with an example user conversation and build flow diagrams to visualize the path that the user takes with the chatbot. The chapter will then discuss the types of chatbots and will introduce us to voice skills for Amazon Alexa and text-based chatbots for Amazon Lex.

Chapter 2, Getting Started with AWS and Amazon CLI, teaches us about AWS Lambdas and how these serverless functions can be built and tested in the browser. After building our first Lambda, we discuss three different ways to build and deploy them, comparing the merits and limits of each. To create the most powerful development environment possible, we use aws-cli to build a script that allows us to deploy Lambdas from our local development environment.

Chapter 3, Creating Your First Alexa Skill, introduces us to the Alexa Skills Kit and has us build our first Alexa Skill. We learn about how to build a Lambda to handle our users' requests and return the response that we want to send to the user. To create a more realistic situation, we create a skill that suggests a car for the user, based on a series of questions. We use the flow design process discussed in Chapter 1, Understanding Chatbots, to map out our users' interactions with our skill before creating the intents. The Lambdas that we use also increase in complexity with slot eliciting and with the inclusion of data that is stored in S3.

Chapter 4, Connecting Your Alexa Skills to External APIs, takes our Alexa skills to a new level of functionality by accessing external APIs. API access can provide massive amounts of functionality to your chatbots, but it needs to be done correctly. We'll learn about two of the best ways to handle errors and use them to build a weather skill.

Chapter 5, Building Your First Amazon Lex Chatbot, moves the focus onto Amazon Lex chatbots. The concepts and components are similar to those we used to build our Alexa skills, so we only need a quick refresher before building our first Lex chatbot. While Lex and Alexa are similar, we quickly see how there are some key differences in the way that the intents are handled. To create a more realistic project, we build an FAQ chatbot. This Lex chatbot takes advantage of the intent handling by triggering one of three Lambdas, based on the intent that was hit. These Lambdas access the responses from S3 and reply using a LexResponses class, which we will build.

Chapter 6, Connecting a Lex Bot to DynamoDB, introduces us to DynamoDB databases and how we can use them to store information about the users' interactions. We use this to build ourselves a shopping chatbot that stores a user's cart, even allowing them to save their cart for later. The complexity of the flows for this chatbot is a lot closer to what you would expect from a real project, and that is reflected in the amount of code.

Chapter 7, Publishing Your Chatbot to Facebook, Slack, Twilio, and HTTP, teaches us how we can publish our chatbots and integrate them into platforms, including Facebook and Slack. We use Amazon Lex's built-in integration tools to make this process as easy as possible. Next, we build an API endpoint, using API Gateway and Lambdas, so that we can develop integrations for other services. We use this API ourselves to create our own front-end interface, which we could integrate into other websites.

Chapter 8, Improving User Experience for Your Bots, discusses a few ways to make the experiences of your users more enjoyable. This covers creating and sending cards in Lex conversations and using search query slot types in Alexa skills. Cards provide the user with a much more visual interaction, while search query slots allow a user to search for a much wider range of values that we could allow with a custom or built-in slot type.

Chapter 9, Review and Continued Development, gives us a few pointers on the directions we can go to continue developing our chatbot skills. There are separate pieces of advice for people who prefer Alexa, and those who want to pursue more Lex skills, as well as a set of skills that will improve your abilities with both chatbot platforms. After this, we discuss the future of chatbots, where they are going, and what needs to happen before they become truly integrated into our daily lives.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime