Subtitles section Play video Print subtitles [MUSIC PLAYING] DAN AHARON: Hi, everyone. I'm pleased to be here with you. I hope you're having an awesome Google Cloud Next. I'm here to talk to you about something that I'm personally very excited about, and we at Google are very excited about, which is conversational applications, which includes Bots, and I hope you're as excited as me at the beginning of the session, or if not, by the end of it. Here we're going to introduce API.AI to you guys, which is a tool probably many of you are familiar with. It's our Bot application development platform that we acquired last year. And we're also going to go beyond the basics and show you guys a little bit more tips and tricks. So you're going to hear from a couple people, Cornelius and Petr, that have been using API.AI, and they're going to share some of the lessons that they've learned while building conversational Bots. So, this is one of three different sessions we have on this topic of conversational applications. We had one yesterday which focused on cloud functions and surveillance and architecture to serve conversational applications. We're now doing the middle session that you see on the slide. And then, following after me, Brad and Guilliame are going to show you how to extend Google assistant with actions on Google. So, what is a conversational agent platform? We'll just go through this quickly, probably a lot of you already know, but, basically what it does is it takes natural language and it turns it into structured data that you can then use in your applications. So, for example, if a user orders a pizza and says what ingredients it has, the software will turn that into structured data which says what's exactly inside the pizza, what type it is, and then you can actually act on it. What it doesn't do is, it doesn't really understand your domain and your vertical until you actually teach it and train it. You can give training examples that explain exactly what to do. And, it also doesn't do any fulfillment. It's not actually going to bake a pizza and deliver it for you, unfortunately. That would be nice. But, the good thing is you're here at Google Cloud Next, you've probably been to a bunch of sessions. Most of this conference is about how to fulfill the back-end of your application, and we think Google Cloud Platform is a great way to do that. So, it's a very good complement to API.AI And then, specifically, we're very proud of API.AI, we think it's pretty distinctive in the space. A few of the important benefits that API.AI has that it is an end-to-end suite, it really combines a bunch of different elements that you need for building compositional applications. It doesn't just do natural language understanding, or just one component. It can get pretty smart very quickly. You're going to see that later on. I'm going to attempt to do something that's probably very risky, and not very wise of me. I'm going to try and build in front of you, from scratch, a whole new conversational application, in less than 20 minutes, that handles an imaginary scenario. Hopefully, it will work, we'll see. But, you can see the power of API.AI with a very small data set, what it's able to do. It's multi-lingual, it already supports 40 languages, and we're investing in growing that. We want it to be as global as Google is. There was a lot of speculation last year when we bought API.AI that we will turn it into sort of a closed system that only works with Google software. The truth is, it's far from it. API.AI works with all of the different messaging platforms that are out there. And we're very proud of that. We're a very open company at Google, we actually want you to build the best conversational applications that work across all the platforms that you're interested in. And we want to keep making API.AI the best cross-platform tool. So we're going to continue to support all of the platforms that are out there. I'm just going to go through this very quickly, but this is just an example architecture of how you can build a conversational application. So, on the left-hand side, you can see all of the different channels where conversations can come in. So, it starts from owned and operated websites or web apps or mobile apps. And you could have Google Assistant properties like Pixel, Aloe, and Home, or you could have integrations with the different applications that I just showed you, all of the different messaging applications. The other thing is you could have voice calls come in and be transcribed with Cloud Speech API, and flown in. All of those can get processed by API.AI, which handles the conversational aspect, including context, natural language understanding, and figures out how to involve the back-end. And then, through web hook integration, you can connect it to Google Cloud Platform to handle all of your back-end needs, or any other platform that you want. You can connect to other external systems like ERP, like CRM, or whatever you need on the back-end. You can get there through cloud functions or any other Google top-form application cloud service. OK, so now to the demo. So what I'm going to do now, we're going to look at an imaginary Google hardware store. And we're going to try and create a conversational app that processes requests for that imaginary store, including service requests and commerce requests. So we're going to just quickly go through defining an entity, defining the intent, adding an ability to buy other items through a WebHook, and then we're going to connect it to a messaging platform. OK, so let's switch to the demo now. OK, can everyone see my screen? How's the font size? Is it OK? Yes. People are saying yes. OK, great. OK, so let's start by defining an entity. And we'll list all of the products that we want to sell in this store. So let's say we want to sell a Pixel. And sometimes that is called Google Pixel. And it could also be in plural, so let's say Pixels and Google Pixels. And let's say you also want to sell a home, which could also be Google Home. And let's add the plural. And let's add a Chromecast to that. Chromecasts. And what else? Let's add a Chromebook. OK, and that's enough. Let's save our entity. And now let's define our first intent. So let's make the first intent about service. And let's just add examples of how users would ask for service. So maybe one guy will say, I'd like to fix my Pixel. And you can see that API.AI automatically identified that Pixel is one of the products that I identified earlier and it labeled it as a parameter name called Products. I'm just going to change it to Product, because you just want one product. I'm going to save this. And let's add a few more examples. Let's say, can I please buy a Chromecast? I'd like to get a Chrome. Can I please-- oh, sorry. I'm mixing commerce and service. Let me redo this. I'd like to fix my Pixel. Can I please fix my Chromecast? My Chromebook is not working. And let's start with that.