Creating ChatBot: Microsoft BOT Framework & DialogFlow | Qasim Shah | Skillshare

Creating ChatBot: Microsoft BOT Framework & DialogFlow

Qasim Shah, Digitization and marketing expert

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
22 Lessons (3h 7m)
    • 1. Course Agenda

      6:24
    • 2. Lesson 1 What is a BOT

      9:35
    • 3. Lesson 2 BOT Designs

      14:44
    • 4. Building a full BOT from scratch

      21:05
    • 5. Contexts Demo

      3:04
    • 6. Contexts

      6:36
    • 7. Creating Agents

      6:52
    • 8. Creating Entities

      4:40
    • 9. Creating Intents

      4:56
    • 10. Events

      5:25
    • 11. Fulfillment

      3:17
    • 12. Lesson 3 DialogFlow Agents

      8:03
    • 13. Lesson 4 Intents

      10:13
    • 14. Training and Analytics

      3:42
    • 15. BOT Integration into Skype and FB

      10:57
    • 16. Building a FormFlow

      14:00
    • 17. Creating a BOT in Azure

      10:51
    • 18. Creating BOT Visual Studio

      11:43
    • 19. Enhancing Greeting Visual Studio

      8:14
    • 20. How MSFT BOTs work

      10:32
    • 21. MSFT FormFlows

      6:48
    • 22. MSFT LUIS

      5:24

About This Class

Are you a company or a Web developer, IT administrator, data center architectconsultant, enterprise architect, data protection officer, programmer, data security specialist, or big data analyst and want to gain fundamental and intermediate level skills and enjoy a fascinating high paying career?

Or maybe you just want to learn additional tips and techniques taking to a whole new level?

Welcome to Creating Chatbot with Dialogflow and Microsoft course For Beginners - A one of its kind course!

The flipped classroom model with hand-on learning will help you experience direct  into the course as your begin your learning journey. Be sure to watch the preview lectures that set course expectations!

In this course, you'll learn and practice:

  1. Building BOTs in Dialogflow

  2. Building BOTs in Microsoft Azure and Visual Studio

  3. Deploying BOTS in Skype and Facebook Messenger

  4. Learn the basic concepts of BOTs

  5. Understand  best practices, and much more....  

You will also get complete resources, toolkit, and code where applicable with this course! We've built this course with our Team ClayDesk of industry recognized developers and consultants to bring you the best of everything!

So, if you would like to:

- start your freelancing career and consult companies, this course is for you

- gain marketable skills as an IT expert and professional, this course is for you

- This course is not designed for advanced level students

...this Chatbot course is exactly what you need, and more. (You’ll even get a certification of completion)

See what our students say “It is such a solid course that covers all important areas of machine learning, and I now know hoe to predict future products based on their features. Simply awesome!.” - Alex Neuman

“This is such an awesome course. I loved every bit of it – Wonderful learning experience!”  Ankit Goring.

Join thousands of other students and share valuable experience

Why take this course?

As an enterprise architect consulting with global companies, technology evangelist, and brand innovator, I have designed, created, and implemented enterprise level projects, I am excited to share my knowledge and transfer skills to my students. 

Enroll now in Creating Chatbot with DialogFlow and Microsoft  today and revolutionize your learning. Stay at the cutting edge of Machine Learning and Artificial Intelligence —and enjoy bigger, brighter opportunities with Microsoft Azure and Dialogflow.

Qasim Shah

Transcripts

1. Course Agenda: Hi, everybody. And welcome to this course on getting started with building box using the Microsoft bought framework and Google's dialogue flow framework. So, in terms of what you can expect and what we will be going through in this course, first we'll look at essentially what is about What do I mean when I say But I mean a robot . So what? What is it? And how are bots defined in today's technology world? Then look at what different bought designs are out there and available for us to use and utilize, and in terms of the design, the way that they dragged and how we want them to interact, what different ways we are able to interact with bots and how we can use different designs in different business cases, depending on what our goal is in terms of implementing it within our organization. After we get familiarized with bots in terms of what they are and how they operate first, we'll look at dialogue flow on dialogue. Floyd's basically and or is basically a bodybuilding framework that Google acquired a few years ago. The very used easy to use online interface very simple, very easy to deploy but in terms of if I compare with Microsoft bought framework, it is limited in terms of the scalability and the amount off configuration and an easy to use interface. If you're not familiar with coating and see sharp or no GS, I would definitely recommend doubtful as your way to go. And in terms of Dalek full, I have broken it up into both lectures and tutorials. So I will go through a concept and I will go ahead and show it to you. Live on dialogue flows interface. So firstly will look at what agents are, what intense are what entities are. And those are three main components that make a baht within dialogue, fools framework. So I'll go ahead and talk about what those are. In the next lesson, I will go online and dialogue flow and show you how to create all three of these and how to configure all three of these. Next will get event and contexts and those air just couple of ways that we can configure and customize are bought to do things. Depending on our business case, we'll look at fulfillment, and fulfillment is when we're ready to go ahead and deploy our but into the real world how we can call different AP eyes, and I'll give you a live demonstration off how we can configure fulfillment and a Web in a simple but that will generate a calendar request. So basically, what what will demonstrate is configuring about that schedules appointments automatically for your customers and how we can use fulfillment and why books within dialogue flows framework to go ahead and implement that. Then we'll look at training and analytics in terms of what L. Afful provides for your BART or measuring the metrics for training it. Because again bots are essentially machine learning. They are constantly learning in terms of bettering themselves and understanding human language. So we'll look at Howard dialogue flow continuously, trains it and how we can help train our bots. This is something if you're in a production environment that needs to be done on a daily basis, and then lastly, I'll take you out. I will put everything together, and we will build a bought from scratch from a to Z. So whereas after each one of those sessions, I take you through what they are. So when I after the lesson on agent. I'll give you a quick tutorial on what agents are and how to configure them in the last lesson. I'll go ahead and bring it all together, and we will start from scratch and building you bought to see how everything comes together After dialogue, Floor will look at the same thing in the Microsoft bought framework. So in the body framework I've broken it up into, ah, a couple of their for ways that Microsoft has provided us with in terms of configuring our box were able to do it in visual studio and then also they've made our lives a lot easier by providing the same service in Azure, but before, But But firstly, I'll begin off with how Microsoft bots were, because there are a little bit different than how dialogue flow treats bots. Because the baht frame were by Microsoft is a little bit more comprehensive than what dialogue full provides us with. So look at that. Men look at a couple of specific items within the BART framework. It is a very, very comprehensive framework, and I am not able to take you through every might know details within this course because this is just a beginner's course what I've done. I've picked a couple of main ones that were able to use and demonstrate within this course , which is formed Flows and Lewis Lewis is basically the Microsoft's natural language processor, and we'll look at what lawyers says and how we can configure Louis, which when you look at the interface for Lewis, it is very, very familiar to what is provided by a dialogue. Flow. Then, after getting familiarized with some of the concepts, will go ahead and look at how we can create a baht in visual studio and then enhanced that body to do some customization Z in terms, off form flow and customized readings. And again, that's all within visual studio after we go ahead and figure out how we can code simple but in visual studio will look at doing the same thing in Azure. I'll give you a good comparison in terms off what you're able to do in visual studio and what Microsoft has provided for us and as your and then finally will look at how we can integrate are bought, so I will do a live integration within Skype and Facebook and show you how it's actually implemented, how simple it is and what it actually looks like in the live integration. So we'll go ahead and actually interrogated within a life Skype and Facebook session. I hope they give you a good or view in terms off what you can expect out of this course. Developing bots is a very, very in depth course that we can get into a lot more details on how we can customize bots based on our business case. But this course is just to give you a good flavor off. We can get started with configuring bots using dialogue full and the Microsoft bought framework. And hopefully in the in the future courses, I'll be going more in depth in customizing the bots for specific business cases. So thank you again for taking this course. I hope you guys enjoy the lessons, and I hope you get out of it. What you are expecting. Thank you again 2. Lesson 1 What is a BOT: everybody and hi everybody. And welcome to the first lesson on understanding what is a lot. So in this lesson, we're going to look at a few topics so good I will go through in explain to you what is about. Then we'll talk about why are they important and why we need to know about them. Next, we'll look again. It will look at home. Microsoft deals with bought creation in terms of the Microsoft bought framework, and then we'll also get. What we're going to learn in this course is about Google's version off the Microsoft spot framework, which they call dialogue flow. So a lot of people think about about, and they probably pictures something like this if you guys remember the movie Rogue Robocop or some futuristic machines. But what I'm referring to when I term bought is an application that performs an automated task. Now, according to Marine, even register, the definition of a body is a computer program that performs automatic repetitive tasks to expand on this definition. Bots also act as a primary tool for automating interactions and engagement with website content on a large scale. The simplest use case for this is a chatterbox. Let me give an example. You guys probably have used this in the past, where you tech something toe a number and you get added to their mailing list or yet get added to their promotions. The technology behind that feature is about technology, and the example is Siri or Microsoft's Cortana, which is really just chat bots and the voice form instead of text form. When you ask Siri what the weather's like today, it takes you to our request. Does some back and processing to figure out what you want and then spits out reply all without intervention off human being. That's essentially what about is so why your boss important and why should we care about them? Well, there's been a great evolution of communication over time. Back in the eighties and nineties, email was a big thing Land. In the early two thousands came the evolution off the mobile phone and mobile applications where in the world to find as an i. O. T. Equal system, where everything is interconnected. When I started assembling my first pot, I was kind of confused. Is it really the kind of software desired by customers to organizations really need about. Then I realized I'm asking the same question. I asked about Web applications many years ago. Since then, a lot of desktop and on premise systems were migrated to the Cloud. Web applications became a crucial part of this process. Maybe it's also a good idea to give bots a chance bought framework is a cloud technology that allows building bots in the streamlined, ready to use way. There also some qualities and features characteristic off cloud based software that are inherent in bots. For example, there's cloud efficiency of azure cloud allows selecting fitting application service plan depending on your needs. For applications generating small traffic, the cost is very small or even free. Then we have scalability and reliability where we don't need to bother with what will happen if the traffic rapidly increases. Applications hosted in the cloud can scale up to handle higher traffic, and scale down runs over availability of cloud services is also typically much higher compared to in house I t. Infrastructure. Then we have convenience by hosting an application on the cloud. Don't need to care about the infrastructure. This is also a significant cost producer ruling over the necessity of purchasing, managing and administrating a local server room. Then we have easy provisioning and deployment. There are many tools that allow us to define the details. Off application services and other resource is needed. Tossed it. For example, you can use a RM templates with cake. Build script to build your coat provisioned resource is on target as your subscription with correct settings and deployed. Compile application from your local command line or build sir. Finally, we have integration with other systems or cloud computing makes it easy to connect where about applications with various systems sharing the data or events among amongst each other . That also allows building well integrate applications with relatively small effort. Now, one off the main players in the field off by technology is Microsoft. And in order to facilitate the development of pots, they have developed a their own framework, which makes it very easy for us to start developing Boss that will work in our business now that we know the technical definition of about, let's look at what they look like from a software developer standpoint in terms of the Microsoft Bach framework. So on the one side we have our user and the other side. We have our bought, and they need to somehow communicate with each other the way they do that is to a channel, and the channel is just a medium in which your bought communicates. Now they're a ton of different channels for bots, As you can see on the right hand side, there's several channels that are shown to just Facebook Messenger's lack Skype and also SMS, just to name a few. Now that we have a channel now, it's obvious how user interacts through the channel. For example, if you're on Facebook Messenger on your mobile or on your PC year, you're interacting through the keyboard. But what we care about is how the bought interacts with the channel. The channel exposes an A P I that will send messages out when the user type something in and receive messages in whenever it gets a reply. This allows it to communicate with our bought that also exposes an API I through this, a p I. The bodies able to receive messages from the user funneled through the channel and in turn , send messages back into the user through the channel. Now this is a very high level architectural breakdown of how bots communicate. And there are many different ways to build the bought portion of this equation. And over the years, the technologies and methods of Walt Now the beginning we had her about it. It's more simplistic form, which are, you know, what can refer to as a text form and this formal apology to send a keyword toe a medium to execute an AK action, for example, texting the word add to a company in order to be put on their mailing lists. This form is based on one medium Onley. In the example, I gave you his SMS and can only accept a limited amount of keywords so that those keywords need to be defined in terms of what should, what message should be received and what action should be performed. It has no concept of natural language beyond the words that are pre programmed. Second, more complex, one allows for multiple mediums, often utilizing customized messaging, which includes things like buttons and hyperlinks, and is still keyword based. Now this level is proportionally harder because now you have to come from more than one medium. That means you have to be able to interpret multiple A pdf formats, one for each medium. In addition, you have dot com for multiple custom messaging types because each medium has a different way, they want the data to be structure. One thing that remains the same is that it's still keyword based on your logic is pretty straightforward. Third and Final form gets the best of everything with the most amount of costs, which are referred to as natural language. Not only do you have to account for multiple mediums and return message types, but now you have to con for understanding natural language as well, which, in and of itself is rather difficult. Know what's imagine having toe right all of these types from scratch. It'll be a very, very daunting task. This is where Microsoft has come up with a solution. They called it the Microsoft mark framework. The marks off back from Rick is an STK for building bots that was that was introduced a few years ago. It helps achieve all those tasks just described with minimal amount of effort, and the coolest part about this framework is that it supports building bots across multiple channels using the same court base. What this means is that the message comes in from Facebook looks the exact same is when it comes from Skype. That way you don't have to worry about accounting for so many different variations of data , which make lives very easy. Along with making the data coming in easier to read. It also makes the data going out easier to create would support from rich attachments. That means that if you want to send image care, Soul to Slack with the exact same core doesn't as an image care. So Facebook. Quietly, the framework has ability to tap into Microsoft's natural language processing Famer All Surfer to as Louis, which means that creating a but that can understand natural language This became a whole lot easier Overall, Microsoft has done a great job in creating a framework that allows you to get up and running with the new bought very quickly and Google's version of Marco Saw spot for Americans refer to as dot dialogue flow. Mandela Ploy used to be a separate organization that Google took over a few years ago, and they have evolved that into their ecosystem, and it does the same thing that Microsoft bought framework does in terms of providing a framework that helps the user communicate to the channel. And they're bod creation and creation of about service with Do Good, Google's Della ploys. Also very simple, very straightforward. So thank you for watching our I hope you guys got a little over you in terms of what bots are, why they are important, why we should care about them. And then the two main bart framers that we will be looking out that will be looking at the markets are bought framework and Google's dialogue flow. Thank you for watching. 3. Lesson 2 BOT Designs: Welcome to the second listen and getting started with building bots certain this less we're gonna look at bought designs, different topics that will recover. First, we look at principles off pot design, how to make them successful. Men will look at different components off about. Look at first interaction, how conversation flows and then navigation in terms off the but and the user. If you're building about, it's safe to assume that you're expecting users to use it. It's also safe to assume that you're you're hoping that users will prefer the body experience over any alternative experiences like APS, websites, phone calls and any other means. So, in other words, you're bought is competing for users. Time against things like APS and Web sites are going to maximize the eyes that your body will achieve this ultimate goal of attracting and keeping users. It's simply a matter of prioritizing the right factors when designing your but there's come . There's key success factors and failures that you need to keep in mind when designing your butt. So in terms off factors that you to be aware off, they don't necessarily guarantee about success urgently, and which might be surprising to a lot of you is how smart about this. In most cases, it's unlikely that making your bots martyr will guarantee happy users or adoption of your platform. In reality, many bots have little advanced machine learning or natural language capabilities. About may include those capabilities. If they're necessary to solve the problem to status designed to address, however, you should not assume any correlation between the bots intelligence, and they uses adoption off that box. Next is how much natural language the bots supports now. You're but can be great at conversations. It can have a vast vocabulary and even make great jokes. But unless it addresses of problems that your users need to solve, these capabilities may contribute very little to making it successful. In fact, some butts have no conversation capitally at all, but they are very successful. Last leaves voice Now it's not always the case that enabling bots for speech will lead to great user experiences. Often forcing users to use voice can result in a frustrating user experience. Some, if you might have noticed this when you're calling your banks a lot of from a switch to voice spots and a lot of times. It's very confusing. It's very irritating where you just want to speak to a customer in tow, an actual human being rather than go to a. But that's voice activated. On the other hand, factors that do influence a bought success, more successful absolute size have at least one thing in common of great user experience, and our bots are no different in that regard. Therefore, ensuring a great user experience should be your number one priority when designing about some key considerations include asking your questions. Ask questions like Does the Bader easily solve the users problem in the minimum number of steps? Does the but solve the users problem better, easier, faster than any of the alternative experiences, like an app or a website? Or does the bought run on devices and platforms that the user cares about? Is the baht discoverable? Or do you have it hidden in some form or part of your website or your organization? None of these questions directly relates to factors such as how smart the body is or how much natural language capability has or what machine learning a lager them. It uses their very simple factors that focus on user experience because again, the main focus of bots should be user experience. They need to solve problems that the users have no first impressions. I'm sure you guys have all heard this. They matter when you meet somebody for the first time. The first impression of that person will carry on with you for a lifetime. Now bots are no different in that matter. The very first interaction between the user of the body is very critical, so we're designing your body. You have to keep in mind that there is more to that first message than this saying hi. When you build an APP, you designed the first screen to provide important navigation cues. Users should intuitively understand things that is where the menu is or how it works, or or what any privacy policies are. And when you design your bought the users first interaction with that body should provide that same type of interface and information. I consider the following two designs I started with the starting the box with an open ended questions that says How can help you is generally not recommended. If your body has 100 different things that can do chances are users won't be able to guess most of them your but didn't tell them what it can do. So how can it possibly know? Menus provide simple solution to that problem. First, by listing the available options, your body is conveying its capabilities to the user. Second menu. Spare the user from having the type too much. Finally, the use of menu skins significantly simplify your natural language. Models know what's a dialogue in a traditional application? The U I is a Siris of screens. A single apple upset can use one or more screens as needed to exchange information with the user. Most applications start with the main screen, where users initially land and provide navigation that leads to other screens for various functions, like starting a new warder or browsing products like absent up sites bought heavy Y. But it's made up of dialogues rather than screens, dialogues help preserve your place within a conversation, prompt users when needed and execute input validations. They're very useful. They're very useful for managing multi turned conversations and simple forms based collections of information to accomplish activities such as booking a flight. Dialogues also enable the bought developer toe logically separate various areas of bought functionality and guy conversation flow. For example, you may designed one dialogue to contain the logic there hope that helps the user browse for products and a separate dialogue to contain the logic that hops the user to create a new order. Dialogues may or may not have graphical interfaces. They may contain buttons, text and other elements, or be entirely speech based on dialogues. Also contain actions to perform tasks such as invoking other dialogues or processing user input. Now humans are complex beings, and it being it may be tempting to assume that users will navigate across dialogues, creating a dialogue stack and at some point will never get back in the direction that came from on stacking the dialogues one by one in that same orderly fashion, for example, the user will start a real dialogue, invoke the new order dialogue from there and then invoked a product search dialog and the user will select a product and confirm exiting the products. There's dialogue, complete the order exiting the new dialogue and arrived back at the road dollar. Although it would be great if users traveled such linear logical path that seldom happens, humans do not communicate in stacks. They tended frequently change their minds. For example, while your bottom have logically constructed a stack of dialog, the user may decide to do something entirely different or ask a question that may be unrelated to the current topic. So this example, the user asks a question. Rather than providing the yes or no response, the dialogue expects the body asking. The body is expecting a yes or no answer, whereas visit where the user act asks. Actually, what was the time off that movie again? Harder the but operate in terms off the dialogue. Should it insist that they use your answers? The question. First, disregard everything that the user has done previously. Reset the whole dialogue stack and start from the beginning by attempting answer users question attempt to answer the users question and then return that Yes, no question and try to resume from there. Now there's no one right answer to his question on the best solution will depend upon specifics off your scenario and how the user would reasonably expect the but to respond. However, as your conversation complexity increases, dialogues become harder to manage complex branching situations it may be easier to create your own flow off control logic. Keep track of users conversations. Next. Let's look at bought navigation. Users can navigate website using breadcrumbs, perhaps using menus and Web browsers using buttons like forward and back. How are no? None of these well established navigation techniques entirely addressed navigation requirements within a baht, as we just discussed, users often attract with bots in a non linear fashion, making it very challenging to design bought navigation. Consider the following dilemmas Hardy. Ensure that a user doesn't get lost in the conversation of the baht. Can user navigate back in a conversation of the baht? How does he use a Navigator the mean menu during a conversation? So the specifics of your bots navigation design will depend largely upon the features and functionality that you're bought supports. Regardless of the type of bought here developing, you'll want to avoid the common pitfalls off poorly designed conversational interfaces. So let's look at some common pitfalls. 1st 1 is for two hours. A stubborn body of this insist upon maintaining the current course or conversation, even when the user attempts to steer things in a different direction. Now, users often change their minds, decide to cancel, or sometimes they want to start over all together. There many methods of avoiding this pitfall, but perhaps easies way to prevent a bought from asking the same question endlessly to simply specify a maximum number of retry attempts for each question. If designed in this manner, the baht is not doing anything smart to understand the user's input and respond appropriately appropriately. But well, at least avoid asking the same question over and over again. Excellent is referred to as a clue, a spot which responds in a nonsensical manner. When it doesn't understand users attempt to access certain functionality. User may try a common keyword command like help or cancel with reasonable expectations that the body will respond appropriately. For example, although you may be tempted to design every dialogue within your body to listen for and respond appropriately to certain keywords, the support is not recommended by defunding logic in your middle, where you're making it accessible to every exchange with the user. Using this approach, individual dialogues on promise can be made can be made to safely ignore the keywords if necessary. Then we come across the mysterious box which fails to immediately acknowledge the user's input in any way. In some cases, the situation might be an indication that the body is having an outage. However, it could just be that the body is busy processing the user's input and hasn't yet finished compiling its response. But immediately acknowledging the user's input. You eliminate any potential for confusion as to the state off the box. If your response takes a long time to compile, consider sending a typing muscles to indicate your body is working, then follow up with a proactive message. Then we have the Captain Obvious spot, which provides unsolicited information that is completely obvious and therefore useless to the user. By designing your bought to provide useful information, you are increasing the eyes that the user will engage your blocked. Now, as we discuss user experience should be the main focus off your box. You can create bots with a variety of features that as texts, buttons, images, rich cars displaying a carousel and much, much more. However, each channel such as Skype and Facebook, ultimately controls how its messaging client renders features. Even when multiple channels supported feature, each channel may render the feature in a slightly different way. In cases where message contains features that a town does not immediately support. Channel may attempt to down render Mrs Contents as text or a static image, which can significantly impact the messages appearance on the client. In some cases, Channel may not support a particular feature at all. For example, Group Me clients cannot display a typing indicated. Rich user controls are common. You I control, such as buttons, images and Carol and Carol sells jet. I just describe Ah, but can use a collection off you I controls to mimic an app or even run embedded within an app and about is embedded within an app or website. It can represent virtually any. You are controlled by leveraging the capabilities off the app that's hosting it. Next, we have cards which allow you to present your users with a variety of visual, audio and selectable messages and help to assist conversation flow. If user needs a select from within a fixed set of items, you can display a care so of cars, each containing an image text description in a single selection button for user has a set of choices for a single item, you can present a smaller single image and a collection of buttons with various options to choose between. Did they ask for more information on a subject? Cards can provide in depth information using audio or video art put, or a receipt that details a shopping experience. There's an incredibly wide range uses for cars to help guide the conversation between your user and you're baht. The type of car you used will be determined by the needs of your application and your use case. Next, we have text and natural language understanding now about can accept text input from users and attempt to parse that input using regular expression. Imagine or natural or natural language. Understanding AP Eyes such as Louis, Depending on the type of input that the user provides, natural language understanding may or may not be a good solution. In some cases, a user may be answering a specific question, for example, for about asks, what is your name? The user may answer with text that specifies only the name John, where the sentence my name is John. Asking specific questions reduces the scope of potential responses that the but might reasonably receive, which decreases the complexity off the logic necessary to parse and understand the response . And lastly, we have speech about canoes, speech input or output to communicate with users. In cases where a body is designed to support devices that have no keyboard or monitor, speech is the only means of communicating with the use. Siri and Cortana and Amazon Alexa are good examples off speech. How can you choose between Richard's or controls text, natural language or speech, just like people communicate with each other? Using combination of gestures, voice and symbols, bots can communicate with users using a combination of these controls the communication. But that could be used together. You don't need to choose one or the other. Thank you for watching this lesson. That guy's got a good understanding of How about operate, how we can design them and how to avoid common designing pitfalls to make sure bots are successful in our business use case 4. Building a full BOT from scratch: Hi, everybody. And welcome to this tutorial on building a chatbots from scratch. So now that we've gotten a good idea in terms of whole dialogue, flow works, what ages are, what intense are what entities are and so on. Let's put all of that to use and build a chat Mott from scratch. So we're going to do is build a sample chatbots for a bicycle shop that will tell the user the hours of operation. And if there's air, wants to to schedule an appointment for service. So you guys see on the right hand side just a sample dialogue off what we want to accomplish. So if the user says hello, we want to have a response asking them if they would like to set up an appointment on all the shop our. So there's Air B that want to do and then so on. If the user says to make an appointment, the chat, but will help out in terms of making an appointment and scheduling it for that. So let's get started. If I logged into the console, I'm going to go and create a new agent. Call it Qassam bike shop, then I will leave the default language to English and the four time zones where I'm located and I want to create a new Google project. After that's done, let's go ahead and start with customizing the welcome intended because we want to give the user a customized response when they log in and initiate the chat. According to Google's best practices, there are three main goals with your greeting. First is welcoming the user. Second is setting the expectations, and third is let let the user take control. So based on this practice, we can compose our ages greeting. I'm gonna go ahead and scroll on down the responses. I'm going to delete all off the standard responses, and I want to enter in a simple response that will be given to everybody as soon as they log in. No, since we are building a simple chatbots just to take you guys through the entire process, we want to make sure that the user knows the expectation that this spot is really able to do two things. Either tell them the hours off the shop or to set an appointment. So after that stunt, I'm going to click it, go and click on safe so soon? That's done. Let's give it a try. Let's see if I type in Hello. As you guys can see, a future says hello. The response they will get is welcome. I can tell you the shop our score I can set up an appointment with would you like? And that's the exact same thing that I just typed in the response. Every time a user logs in and type something, they will get this same exact response throught building chatbots. I'll be going back and forth and showing you where we are in terms of flow off the conversation. So right now we've done is we've initiated it in terms of the welcome event. So if somebody says hi, they automatically get a welcome response. So we have an intent and we have user utterance and we have a response. So it's also best practice to have some variations off the text response, because if you have regularly, if a business has regular customers that would get very monotonous toe have the same text response every time they checked with a. But it's always Goto have variations off the response. In one way or another, I will just type of another variation off this same response. Now, when we supply multiple responses for an intent, dialogue flow randomly select response very in from the list. If you guys remember, however, keep in mind that there are more sophisticated ways to handle variations in responses. And once I get into fulfillment towards the end of this tutorial, we can see how, though, how we conduce more complex responses. So what's destined? I'm going to go ahead and click on Save Now. We want the bike shop agent to perform two tasks, as I mentioned in from the Customer of the Hours and schedule an appointment. So let's go ahead and create some custom intends to accomplish those. So let's first create an intent that conform users about the hours of operation for the bike. I'm going to name the intent hours in the training phrases section of the hours I'm going to enter in. When are you open in the responses section? I'm going to type out the hours of operation. After that's done, I'm going to simply save this intent. So going back to the floor chart that initially started did you guys conceive from the top . The top section is where we did the customized welcome intent. And now the full track chose the new custom Intend that we just created for hours once you there initiates and utterance to get a default broken response and then future asks When are you open? That will initiate the hours intent we just created and they will get a response that we just typed out, which is we are open from nine am to six PM every day. Is there anything else that we can do for you now, since hours intend currently has only one training phrase When are you open? The intent has insufficient knowledge toe identify other similar utterances that have the same meaning. So we need to provide more training phases so the agent can match a variety of user utterances that express the same intention. So I'm gonna go back into my training phrases and type in a few more train phrases to sufficiently train our baht so you guys can see have added in a few training phrases to sufficiently give are bought more information when the user starts a conversation and some off the words that I've typed in you guys notice have all automatically been identified as system entities. For example, tomorrow has been identified as a system date, and then again here tomorrow is the system date, whereas morning is a time period again, these air pre defiant system entities that delightful has automatically identified for us. So no, go ahead and click on Save. So let's test out to see if our no training phrases have worked and because you see when the type are you open now, it gives us the default response that we've typed in, and this was one of the new training phrases that I entered in on the left hand side. So far, we have an agent that can greet and welcome users and identify and resolve a specific request from the user. However, what happens, one user says something that can't be understood by the agent and to you guys remember from when we spoke about intense. This is when you go back to the fallback intent. So let's go ahead and customize the fallback intent. Also go back into my intense and going to the default fullback intent. I'm gonna go ahead and never get down to the responses section And just like the welcome response, I'm going to delete the pre defined text responses a dialogue floor comes with and the more the type out a customized fallback response. And just like with the default welcome intent, it's always good to have a few variations off the tax response. I'm gonna go ahead and type out just another various of the response to what the users know , that this body is only able to inform them about the hours or schedule an appointment. After that, I'm going click on Save Again, going back to the floor truck flow chart quickly. Now you guys can see that in our conversation flow chart. We have added a fallback, intent or customized, I should say before back intent, but you guys can see on the top left hand corner. So now we've done an intent for hours, but at this point, we don't have an intent that can handle appointment. So if you use your asked, I like to set up an appointment. We don't have an intent for that, So let's go ahead and create an intent to handle appointments. I'm going to name this intent, make appointment and just like we did with the hours. We're going to type out a few training phrases to help train the part about this intent. And what did you do? One user asks specific questions and Justin see in the actions and parameters it has identified assistant time and a system date before this training phrase. And in the response section, I'm going to go ahead and lay out a text response that the body should respond with. No, no, I have the tax response on McQueen. Click on Save If you guys remember that. O. CLO also has ability to create customized entities for extracting certain parameters that are uncommon or on Katara on categorized. But for our scenario, using system entities is sufficient for captured typical parameters, which we want to do, such as take time and date. So so far as you guys conceivable training phrases the contain time and date information. But in the real world, things are a bit different where user utterances may not always include a specific time and a specific specific date. Ah, user might say, I need to get my bike fixed or are you able to fix my bike? Or can you fix my bike. All the phrases indicate that the user wants to schedule an apartment, so our new and done should be matched with such phrases to handle the task of schedule an appointment. But each of these phrases lacks the time information and the date information or both. So if user were were to ask, I need my bike fixed. It does not have a time or a date, so phrase like these are troublesome because the intent cannot schedule an appointment without the time and date information. So this is where dialogue flow provides a feature called slot filling that ensures an intent obtains all the necessary information from a user Soto actor This feature We need to mark the parameters as required. So when an intent has required parameters, but is. But it is matched with the user utterance that lacks any of the required parameter that Intent asks propped questions in order to get all of the information. So in order to do that, we're gonna go ahead and go to the actions and parameters table, and we want to make sure that I want to know the time, and we want to know the date after we put these as required. We need to go ahead and define the prompts that the baht should ask the user. I'm gonna go and type out a few promise just to get the user to give Give us a specific time that they would like to schedule in the appointment for. So after I've typed in, I'm gonna click on clothes and I will do the same thing for the date. And another thing we can do again. We can also set priorities for the time of the day to see toe let the baht know which one is more important. If, for example, you have a priority level for your system entities, we can move these up and down, depending on your business case. After that's done, I'm gonna go and click on Save says You guys can see now I've typed in an utterance. I need to fix my bike tomorrow and the default responses on what time works for you again, as you guys can see lists out the context which we discussed during the lectures. So going back to our float trip now we have another section toe are full chart where we've added in the slot Philippe prompts for the required parameter. So now we have again. Initially, when we decided to create the baht, we were going toe hours an appointment so that our section is here and the appointment section here, where for the appointment section there are a few key pieces of information that we need in terms of the date and time in order to schedule the appointment. And that's what we've done through the slot filling action. So now we have any intent that make sure to obtain the date and time information. However, at the moment, the intent only replies with a mock up response. No actual appointment is scheduled, so we need to break a back and process called fulfillment, which we just discussed that can perform the task of scheduling an appointment on Google calendar. And again, we will use Google counter for the purposes of this demo. But depending on your business case, you can also do the same in outlook calendars and so on. If you guys remember, fulfillment is a service, app, feed, conversation or other logic that could resolve a user's request. So in our case, we need fulfillment and that can schedule an appointment with the bike shop and given the time and date information provided by the intent, make appointment. So for this set up, we provide a Web book as a back and service that can receive the time and date parameters from the intent and create an event on Google Calendar via AP. So in order to accomplish, we need to perform two tasks. First has obtained credentials for Google, a P I. And second is create a new calendar and configure the code in the Web book. So Dollar Flies an in line editor, which is I saw when we went through fulfillment that allows you to directly, right, no jazz code, which then could be deployed to run as a Web Okan Fire base. So first, we're gonna go ahead and navigate toe, are make appointment intent and enable fulfillment for this. So although on the bottom, we have fulfillment, So we're going to enable Web Book for this intent. After do that, we're gonna go and click on Save Next. We're gonna go and navigate toe are for filming section we're going to enable are in line, Editor. So we're going to go and delayed thes standard package dot Jason that's here and type out our own customized coat and ruled with the same thing for the index dot jets were gonna delete the default court and put in our customers code for Google Calendar. No, just to look at briefly at the code for index dot Js If you guys noticed. Line 59 intent map dot set make appointment. Now the function set is called on a map object, as you guys can see here this once and links and intent to a specific function in the cold . In this case, the call establishes the mapping between the intent. Make appointment and the function. Make appointment The function. Make appointment Agent reads the date and time parameter values from the input object agent by the agent dot parameters dot date and agent that primaries that time Now, after parsing and formatting the Dayton time values. The function then calls a custom function Create calendar event, which you guys can see on Line 63 here, which makes an A p A call to Google Calendar to create an event on the calendar Last of the Function Agent. That ad, which would see online 53 is used to deliver a customized string as a response to the user . I'm not using the dialogue for console to provide responses with a Web book. We can use the logic off code toe to construct highly dynamic responses. For instance, when the agent schedules an appointment successfully, it replies with the following response. Got it? I have your appointment scheduled on appointment dates. Drink at appointment times, drink. See you soon. Goodbyes. It's a very customized response. This confirming the specific date and time that the user requested. However, if the agent feels to make an appointment on the specific time and date it returned the following response. Sorry, we're booked on the date string and the time string. Is there anything else I can do for you? So at this point, we cannot test a code properly because it does not have access to the Google calendar. A p I. I noticed that we have the following variables in the code for personalizing Guler Google Calendar AP I set up, which is online. 24. The call on the calendar i d. Insert calendar I d here, so we need to configure the code to access the Google calendar. AP I we're gonna go ahead and navigate to the settings off our agent and launched the Google Cloud platform console I want to do is configure our AP eyes and services when we want to go to the library and we want to consider the A P I for the Google calendar and we want to enable this. So after it's enabled, we go ahead, navigate to the credentials. So after I go into credentials, I'm going to create credentials for the service account key and in the service. I can't I want to create a new service account and in the name I'm going to enter in my shop calendar for the role I want to do a project owner. And after I've done that, I'm going click and create. So next we need to create a new calendar for the bike shop to track appointments. So we use information from the Jason File that was just created and downloaded to integrate to the agents Web code with the new Google calendar. Now, make sure that you can view and copy the content of the Jason file before you continue with the next set off steps that I will be doing. So now I've navigated to my Google calendar, and again, this would be your organization school calendar. After I have done that, I'm gonna go ahead and click on the plus button next to Add Friends Calendar and I want a new calendar and in the name I'm going to type out the bike shop and I want to go and click on Create a Calendar. So after I've done that, I'm gonna navigate to that specific calendar that I just created and in the share with specific people section I'm going to add people. Now, This is where you want to open up the Donald J. San file and copy that email address in the client email field without the quotation marks . Again, this is a Jason file that we just don't loaded. So we want to do is copied this email address client email without the quotation marks and add that here and in the permissions. We want to make sure that we give them permissions to change because we want them to add appointments to this calendar, and then we're gonna go and click on Send now the next step is we're gonna go and navigate to the integrate calendar section. We're going to copy the content of calendar. I d you know, that's done. We're gonna go ahead and go back to our fulfillment page. So in the index dot gs tap off the online editor we're going took find the variable calendar i d. She gets here online 24 we're going to paste the calendar I d to replace insert Calendar idea here. Next warrant. We're going to go ahead and find the service account, and here we're going to go ahead and go back into our Jason file that we just created and downloaded jig I see here and want to make sure that we copy entire content, including the outermost curly brackets, and paste it in the service account. Next, we're gonna go ahead and click on Deploy knows he gets conceived, the agents been successfully deployed, and I have just tested it out. I've typed in. I need to make an appointment for 9 a.m. tomorrow, and it's given me a default response off. Okay, I have your your appointment scheduled on October 30th 2018 for 9 a.m. So you assume, which is one of our default responses that we just created unless they were going to look at, is something called small Talk. Small talk is a feature in dialogue load that gives your body a real human feeling. So in re enable small top, it allows us to customize our agent and give it certain characteristics that are human like So, for example, we have quite a few different options that allow us to customize our agent on again, go and fill out quite an extensive list to customize are bought and again, depending on a business case we can go and use to fill out a few of them. Or Philo all of them, depending on how customize you want your agent slash but to be. And again there's about the agent. There's courtesy for gonna believe somebody. Response, sir. That's bad or great problem. We can configure specific answers for those again. Small talk. Just so again, Whenever you're chatting with the human being, everybody makes certain level small talk. So the more human like you maker, but the better customer interaction you will get, the more comfortable customers and users will feel in interacting with their, but it will not feel as machine like. Thank you for joining me on this lesson. I hope you guys got a good overview on creating basic bots and how we can configure them and how we can enable different Web books for them to pull information outside off dialogue flow. So again, the Web book that we created was for a Google calendar. But it depends on your business case. You create a PS for the agent to pull information from any Web source, including your own Web server, if you have one. So thank you again for joining me. 5. Contexts Demo: everybody. And welcome to this demo on contacts and how we can implement both input and output contacts in dialogue flow, not add one or more output contacts. First of all, we need to go into intense because, as if you guys remember from lesson contacts are applied to intense over click on intense of Maguire and go to the intent that I created in the intent Demo and the first option you guys see when you go into intent when you go into the specific intent is contacts, and again it gives you a brief oriole. What context are mentions that could be used to remember parameter values so they could be passed between intense? So if you go ahead and click on add context here were able to add input and output contact . I'm going to add outboard contact shade for my favorite color intent. Now, just a note to keep in mind When naming contexts, keep the following points in mind only Use alphanumeric names. Use either a dash or underscore and context names are not case sensitive. So if you have an upper case and lower case, it will not matter. In terms of dollar call recognizing these contexts. And then, obstinately, we can also click on the little change of life span right now. By default. It is five, but you're able to increase it or reduce it. Depending on your business case, we will leave it as default for this and click on safe, so not have added in output context. I need to add a course mining input context from the go ahead and go back to my intense and going to the second intent that I created called Color Shade. Go back into the contacts section and when I go back into added input contacts, when I start typing in the name of the output contacts I just created, it will give you a drop down list of all the all of the output context that you have created that started with. This letter says Well, we have won. The drop down list only contains one contact that we can link it to and again just as a reminder intent Imagine follows three rules. When it comes to contacts, queries without context can match any intent. Queries with any number of contexts can match any intense that don't have any input. Contact and murder. And when one or more context are active and intense input context must be a subset, either one or more off those active contacts to be matched. So just keep that in mind when you're creating contacts, especially if you have a good number of intense that you will be using this for Yeah, For that's done, I'm just gonna go and click on Save. And once that's done, I have created my input and output contacts for dollar floor in my intense section. So thanks for watching. Are you guys got to go toe overview. We can create context and apply them to different, intense and again we will bring all of this back together in the final demo when we go ahead and create a baht from scratch. 6. Contexts: Hi, everybody, and welcome to this lesson on contexts. So in this lesson, we're going to get an overview of what context are, and then we look at different components off them in terms of input and output. Contacts will get follow up, intense contacts and their fulfillment and how contacts work with AP eyes. So contacts to represent the current state off, a user's request and all your agent to carry information from morning tend to another. You can use a car. You can use combinations off input and output contacts, which will look at later to control the conversational path things it takes through your dialogue. They intend that collects her favorite food, uses an upward context to remember what you said. The same context is used as input context to the next intent, which collects information about your favorite drink when referring to the collected parameters. Special syntax is used in the responses, so contacts let you control conversation flowed by letting you define specific states that a conversation must be in foreign intent to match normally. Dialogue for matches and intent if it's training phrases closely resembled the user utterance. However, when you apply context, Owen intent. Dialogue flow will only consider that intent for matching if the context is active now, the two types of context that you can activate our input contacts and output contacts input ones when applied to an intent, tells dialogue floor to match the intent only if the user veterans is a close match and if the context is active. Output, on the other hand, is applied to an intent. Tells Diallo photo. Activate a context if it's not already active or to maintain the contacts after the intent is matched. Some use cases where contacts are helpful include controlling order off intent, matching or creating different outcomes for intense with the same training phrases. For example, let's say you have to intense that. Have that have the training phrase, Show me a picture, but one shows pictures of dogs and the other shows pictures of cats if you want to control which intent is marriage's, depending on the user's preference. So in other intent asks the user whether they prefer dogs or cats and activates a likes dogs or likes cats. Output contacts each Show me picture. Intento has a corresponding input contacts to ensure dialogue for matches expected intent based on whether the user likes dogs or cats. When you apply an output context, one intent dialogue full activates that context if it's not already active or renews that context, if it's already active, multiple output context can be applied to an intent along for finer intent. Majin control And you can also adjust the lifespan off the context to set the number of conversation turns. That context is active, for they can also be used when you want to pass information captured from the user to feature responses. For example, if users ask whether they like cats or dogs more, the parameter value for the captured entity can be passed along in the output contexts. No. By default, output contacts expire after either five requests or 20 minutes after its corresponding intent is messed. If the same output context is included in an other intent, Contexts resets the counter and clock to fire requests in 20 minutes. Contacts and fall of intense have a default lifespan off to requests. No input intense, one added increase the likelihood off that intent being matched when that context is active while intense On Match 20 whose replies with something similar to define training phrases. Context that has attached to a session can force an intent to be matched. The intent matching allows three rules when it comes to contacts. First quarters without any context, can match any intent. Next queries with any number of contacts can match any intense that don't have any input ones. And lastly, when one or more context is active and input an intense input, contacts must be a subset off the active context to be matched. For example, when a question is asked, Do you like cars? A. Context is attached If we use replies. Yes, I do. The contact is activated. If users asked, Would you like to see a picture of a car? That's the first turn when they use the replies? Sure, that's the end of the first term. When the picture is shown to the user. That's the second turn, and the context is automatically removed. Now follow up intense. Provide a simple way to shape a conversation without having to create and manage contacts manually. These special intends are nested under the parent intent, and they're designed to handle preset replies from the user like yes, no cancel And so on. You can also customize follow up intense by choosing the custom option. When you create a follow up intent and output contact has added to the parent intent and input contacts of the same name is added to the child. This means that a follow up intent is mast Onley. When the parent intent his master in the previous conversational turn and the example you guys see, the users asked if they like cats. The child intent. Four. Would you like to see a cat picture can only be matched if the user says yes, No one Using fulfillment, you could activate and gather active contacts if you If you're developing fulfillment with the node that Jess, you can use a fulfillment library to retrieve context data. If you're developing in other languages, you can parse the Jason in https requests to your fulfillment Nephews of Fulfillment Library to retrieve attached context. Move. I it even use the following command agent dot get contexts. This will provide the contact information in the following format that you guys here in the bottom name context. Name Life's Man five To retrieve activated contact Y o level hook. You can see the query result that output contacts list in the Web book request. Jason Payload. No input in our put context can be activated, created and altered for intense and sessions using an A p I like in the console. You can set up input in our put context. With AP eyes. You can include optional contact object and the query parameters to activate them before the court is executed in the query results. The activity contacts are included in the output context object, and you're also able to create, read, update and delete contacts via the AP. I thank you for watching. I hope you guys got a good Oreo, what contacts are and how they're used in dialect flow. Now let's go ahead and take a look at how we can configure contacts in dialogue floor. 7. Creating Agents: Hi, everybody. And welcome to this lesson on how to create an agent in dialogue flow person, Makoto Daloa flow dot com and on the right hands are you guys will see Go to my console. All agent related menus and information are found at the top off the left menu. There you will see a list of agents associated with your account option to create a new agent office is the very first time that you creating an Asian like I am for you guys will see this create agent. If you already have existing agents created, you will see them listed here, and you can still create New Ages by clicking. On the plus side, there's some basic information that we need to provide when creating an agent, such as the agent name. Additionally, you can select the default language that you want your agent Teoh use. And again there's over 17 different languages that you can specify. Just keep in mind once is like the language for an agent. You are not able to change it after it's been created, and the new goals is best. Buy a default time zone and then, lastly, if you haven't existing Google project. You can select it here toe add the agent of that existent project. Or you can create a new project which will do this time something in order to goes. For the first time you guys log in. You always hear this information up. Top board says the Delacroix P I version one is going to be deprecate ID on October 23rd to those 19. So if you have been using dollop or in the past, and you have bots and ages created, they learn how to migrate it to AP aversion to here, where they have documentation in order for you to do that. But since this doesn't apply to us, I'm just going to go and click on Dismiss. So now let's look at the different settings off our agent that we just created, which is called Agent Qassam. Click on the gear box here. It will take me to the settings off the agent. Now in general settings. Here we can have a description of the agent, which is you describe it depending on the use case and again the default time zone. This is three idea of the Google Cloud project associated with the agent and the service account used for authentication. Again hearing you guys can see the A P I V took as compared to the one These are the A P a k is the tokens used for end user interaction with query context or and user entities and points on Lee, Please keep in mind that you guys should keep these private. Since I have deleted this agent after creating this course, you guys okay to see them? But for your use cases, please make sure you guys keep these private the's lock settings that keep user conversation logs that could be used for two. Further train your agent and you can either log attractions to dialogue floor or log corrections to Google Cloud where right, use a craze and debug information to Google stack drivers. So this is again for training your model. It will log all interactions with the user something to keep in mind if private user information will be transmitted through your but sometimes you will be required by law not to log the settings. So just please keep that in mind based on your business use case, Michael also make your agent multi lingual. It supports many root languages that could be used for the main development of agent. Some of the language include locales. Also, for example, there's couple of versions off Portuguese, either European or Brazilian. There's three diversions of Chinese, so it depends on the locale. It can support multiple versions, and you can also add a language you guys can see right now. The Asian support English. But if you click on the plus sign, you're able to add additional languages also in the amount settings tab A. Doubtful agents use machine learning the logarithms to understand natural language utterances. Mastin paying tens and then extract structure data. Now a couple of different settings for machine learning. One of the match mode. This setting defines that along with those that should be used for all intents in which machine learning is enabled and just like more of the following moldy. That hybrid did the mod first attempts a rule based grammar match. If a match is not made into, it is to motion machine learning matching and ml only. This more uses Onley, machine learning matching and the classification threshold. Garcia's 0.3 to filter out false positive results and still get variety and managed inputs for your agent. You can tune them. Ml classifications threshold. So intent matches have a conference value that ranges from 0.0, which is completely uncertain to 1.0, which is completely certain if the conference value is less than the amel classifications threshold. Fallback intent is matched, and then you can also do automatic spell correction if it's enable the user input has a spelling or grammar mistake and intensively matched as though it was written correctly. The detect intent response will contain the corrected user input. Looking at the export and important agents can be exported, imported and restoring. The dialogue for console import export restore should be used for backing up ages or transferring them from one account to another. Exporting an agent generates a ZIP file on the resulting ZIP file contains all of the Jason files related to the agent, according intents, training crazes and contexts. In a while, you know that the Jason follows directly and reimport them. You should make edits within the dial up for console or through the a p I. This insurers that changes are validated by the system and keeps troubleshooting toe. A minimal importing agent adds intense and entities to the current agent from a supplied to file and restoring an agent overwrites the current agent with the supply It a zip file. Now speech You guys considers an hour blast next to it. It's still in its beta testing, and right now I have not enabled it because this is again a beginner's courses speech and walls more advanced setting on Dalla flaw Just to give you guys an overview of dialogue, Floor could use Cloud Texas speech to generate speeds responses from your agent, and it uses both. It uses argue for both input and output one magic and intent and finally, in the share I can. How many team members can collaborate on an agent and you can control the level of access granted to each team member Even manage access using either Adele iCal console or the Google Cloud platform console. There many permissions that you are able to grant. You guys can see here either you reviewer or a developer or an admin, and you can also invite new people by typing in, the monitor says, and then adding them based on a specific role so thing guys were watching high because I got a good overview of how to create agents and the different options that are available for us to customize after the creation of them. 8. Creating Entities: Hi, everybody. And welcome to this demo on how we go about creating entities. Now that we've got a good overview of what entities are and the different entities that dialogue for has available. Let's go and look at how we can create a set off developer entities. Yes, he on the left hand of your screen, there's an option for entities. And if you click on the plus sign, were able to create entities. First thing that we have to do is given entity and name. You have to keep in mind that it's just start with the letter and can contain only the following on The letter from A to Z and numbers 0 to 9 underscores and dashes. It cannot contain any special characters or spaces. Now, after we have created an entity, we can click on any of these fields that are available to start adding our entries, and the defiant synonyms is automatically checked by default. And again that used to map reference values. And this keep in mind against your look information up here also where you have to separate synonyms by pressing the enter tab or the semicolon key for the reference value I'm going to use sizes by it just as an example, and I'm going to intersect several synonyms for this size. There's also check box for a low automated expansion. The automated expansion of developer entities allows an agent to recognize values that have not been exposed that have not been explicitly listed in the entity. If we users request includes an item that isn't listed in the entity, automatic expansion recognizes the undefined item as a parameter in the entity the agent sees users request is similar to the examples provided so it can derive what the item is in the request. For example, on the list that I have typed out here in terms of in terms of clothes, sizes for user says, I need to buy an extra small. The extra small will be picked up as a value, even though it's not included in the entity with automated expansion enabled agencies. The user's query is similar to the training phrases provided in the intent and can pick out what should be extracted as a new value. The course of the years and put is to the examples provided in the training phrases section , the better the results the automated expansion feature provides. This is another reason to provide as many examples as possible. So after I've gone ahead and done all of my synonyms, I'm going to click on Save. If I go back into my entities, you can see that the entity has been created, and there are also several batch operations that are available in dialect full. You're able to move, copy or delete multiple entities that wants using batch operations. For example, if you had multiple entities here, you can select however many introduce you want, and you can copy, move, delete. And, depending on your use case, you may have a substantial number of entities you want to add to your agent. Additionally, you may want to export a large list of entities that you've cultivated from training or agent, so that if you have that there are two different formats where you're able to download your entities. You can either download in a Jason format or a CSB format, and in order to do that, if we just how over the identity you guys can see that there's a cloud icon on the right hand side. If we click on that we can select whether want Jason or see SV, either one that we select it automatically Donald for us. Consequently, if there are entities that we want to upload either through a Jason or a CS three, we can also do that on the top right hand side. You guys can see these three buttons, if you click on that, were able to upload entities. And again, you can only upload CSB or Jason formats. And again, it gives you several directive on what the CSB format should have each interested correspond to a new line. The reference value and synonyms of beach should be separated by commas, each reference value and symptoms should be enclosed in double quotes. The reference value should be at the beginning of the line and include the reference value twice if you wanted to be matched by the entity, so make sure that your CSB file abides by all these rules and regulations. Otherwise, the agent will not be actuated, and you will have issues working with the agent in Della floor. And sometimes if you're bulk uploading, it will create some major issues and backlogs that will take quite some time for you to sort out. So that was a quick Oreo off, how we can create and other entities and the different fields that are available for us to either bulk upload or both download entities in dialogue floor. 9. Creating Intents: hi, everybody, and welcome to his lesson on creating intense. So now that we've gotten a good orderly or what intense are and how a dialogue for uses them, let's go over the process of creating and modifying intense, annotating training phrases within that intent and returning responses to the user. Intense makeup, the buck off your agents functionality. And in order to create intense, we go to bless the left hand side off our dashboard. Click on the plus sign for intense, and here we can enter in the name of our intent. And generally the name should represent the kind of user queries it recognizes. For example, if you expect user to provide their favorite color, we can name the intent. Favorite color. After we do that, we go and click on Save. Once we've done that, we can go ahead and start defining our training phrases for that intent that represent again what users might say that this is where to start typing in training phrases that we can expect our users to converse eight with during the conversation with the body. And these phrases should be slightly different from each other, but expressed this same intent for example, if he continue on with our favorite color intent, the training phrases could be I like red or my favorite color is yellow. You guys can see once you defined your training phrases. The words, phrases or values corresponding to known entities are highlighted, and for this example, blue is highlighted as a entity for color. Same goes with black and so on. Annotating the training phrases with entities tells Dalek will hot the parse parameters. For example, if the annotated training phrases with the color entity die local would recognize and extract any color parameter for, um, user input. Foreign Dalek Low parses remembers from user utterances. Those parameters are available to you in fulfillment. And when he defined the training phrases system, entities are annotated automatically and appear in the action and parameters table. As you guys can see here, if we need to create any custom entities that aren't already included in the Dalek Flaws system on today's, this is where we can do them now. There are some cases where entity values in training phrases are not automatically annotated, and we can also manually annotate an entity. If it's not manly, annotated, let's say if I were to type in a phrase and use the color red. But in another language you guys can see, the color is not an annotated because are only used English as this. Agents language for you guys. How we can manually candidate if we just highlight the word that want annotate. Diabolical automatically gives you a list of all entities that are available for you to specify, and it's smart enough to recognize that this word is a color. But in another language, we can specify that as a system color, I'm moving on to responses. Get because remember, each intent should return our response. Whether it's static or dynamic, return the static response. We can specify them in the responses section here. A generally responses should guard the user to stay within the conversations grammar. For example, if you want the user to provide their favorite color, you could define responses like What's your favorite color, or what color do you like? Best and last option and intent is a fulfillment of the, and this is where we can specify if you want to return dynamic responses, and we will come back to fulfillment later on in the course when we are a little bit more familiarized with the different options that are available for us in agents. So after we've done those responses, we can go ahead and click on Save Is the SNC are intent came up here. You remember from the first lesson. These are the two default intense dead and dialect flow automatically creates for us. There's a default full bucket intend and the default welcome intent and and I lived and keep in mind. You can also change the intent priority. So for training phrase matches, multiple intends and intent with a higher priority will be managed over an intent that has assigned a lower priority. And we can change that by clicking on the blue dots here, which will allow us to change the priority from highest to lowest and just to give you delivered Oreo about what the welcome intent and default fallback intent are configured as it gets and see that it's already pretty configured some training phrases for you and default responses, and same goes for the fallback intent. It's configured default responses. If an intent is not matched during the user utterance and you are able to delete and change these responses based on your use case. Think again for watching awfully. You guys learn on to create intense, indelible and I would recommend going on and creating a few intense just to get comfortable with how they work. 10. Events: everybody. And welcome to this lesson on events so most less in regard to get a good overview of what events are. And then we'll look at the two different types of events that dialogue floor works with platform events and custom events. I could invoke intense based on something that has happened instead of what a user communicates dialogue for supports events from several platforms, like Google Assistance, lack Skype and many more based on actions users take on those platforms. You can also create your own custom events that could be triggered via fulfillment or the detect intent a P I. For example, if the user initiates attacked before even typing something, you consent an automatic well welcome message to the user before they even say hi or hello , you're able to send a message before that chat is initiated. A plot from events are triggered by actions users take on platforms, dialogue full interacts with, like Google Assistant Slack and Facebook Messenger. These events give you a way to respond to the users action in your dialogue for agent and in fulfillment. Now, Dollar for has something called welcome movements, which are triggered when a user starts a conversation with your action bought skill or interface. When you create a new agent, a default welcome intent is automatically created. And if you guys remember form, the intense demo that I gave there were too intense that were automatically created, a welcome and rent and a default full document. Welcome about the generic given for supported one click integrations. It's a short way to set all welcome events when the end user triggers a welcome intent from a supported messaging platform. The relevant event is sent to dialogue flow. If there's no other intent with a defined event specific to a particular messaging platform , the default welcome intent is triggered. For example, if the user clicks and get started button to indicate they like to chat with your Facebook messenger bought the Facebook welcome event is triggered first dollar for checks for intense containing the Facebook welcome event. If no such intent is found, the default welcome intent is triggered for actions on Google events. If users communicating with your actions in ways other than through speech or text, these interactions are sent to Dalek lo y events. These events can indicate things like users input such as wish list item was selected by user confirmations and getting delivery addresses. Get permission for use information or performing transaction. The actions on Google calls these events action on Google, Intense and finally delightful. Also supports events from other platforms such as Facebook, location request, telegram slash commands and notifications. When trial, your amorous messages are received. Custom events are events you can create to signify some communication that can't be captured easily through tax or voice. These events can indicate that the user has clicked a button provided authorization or that a certain amount of time has passed. These events can be triggered through dialogue for fulfillment or the detect content. A P I and these events are also be handled in your doll for agent or in fulfillment. You can also invoke an intent wired to detect intent AP. Yet you can send a request containing an event. Remember, value there corresponds to the event name and when you send a query request within it with an event parameter, dialogue flow creates a context with the same name as an event name and contexts with life span of zero. This slice man value means that the contact is active only during the current request, you can use his context to pass parameter values from the detective intent request to the parameters defined in the actions and parameter section off the intent, and also referenced these parameter values in the response section of the triggered intent . You can also invoke events via fulfillment by sending the event name with a follow up event parameter. In the response from your Web service, you can use a follow up event input object. The past parameter values from the data object the parameters manly defined in the action and parameter section off the intent whole references parameter values in the Response section No. One, a follow event is triggered from the Web. All the events specified in the weapon response is triggered. Triggered event through a Web book, sends a request back through dialogue flow for matching without responding to the user. The responsible user is sent as if they use a triggered event that was triggered in the Web . Book have for the second intent is matched by the event Dialogue flow will do any necessary work and send a response back as if the second intent was originally mashed intent says You guys can see if the user speaks or types and utterance. Intent one is masked by dialogue floor. Ah, why Poke Request is sent to your fulfillment server, which indicates that Intent one was matched. Next, you're for filter Responds to the White Book request with a follow up event response. Next dialogue for rematches intent to based on the follow up event sent in the Web Book response and Violent dollar force. And the response to user based solely on intent to being masked, even though initially intent one was matched. So thank you for watching his lesson on events. Hopefully got a good overview off the different events that dialogue so comes with in terms of the platform Evans and the customer events that were able to create through one book and through other AP s. 11. Fulfillment: Hi, everybody, and welcome to this lesson on fulfillment. So be quick lesson that will give you a or B off how fulfillment works and how we can deploy it. Now fulfilment is cold. That's deport as a limbo that lets your dialogue agent call business logic on intent. My intent. Basis during the conversation, full formalized to use information extracted by dialogue, falls natural language processing to generate dynamic responses or trigger actions on her back end. Most I look for agents. Make use off a film mint, for example. You can use fulfillment to extend an agent to generate dynamic responses based on information. Looked up from a database toe look to place orders based on products a customer has asked for or to implement the rules and winning conditions for a game. Now you can enable fulfillment for any of your agents intense. To use it, you need to set up a Web book, and my book is just a Web server endpoint that you create and host One of intent with fulfillment. Enable is matched. Dialogue Floor will make an http post request to your Web book with a Jason object containing information about the mast intent after receiving a request. The Web all can perform any required tasks. For example, level might use information from the request to look up a product in the database or place an order. Finally, arrival should respond back with instructions for what dialogue thought should do next. And you guys can see the request format that your Web book will have when it sent now. Once requested, your iBook should provide a response. And in the response, you can specify the following things. That response that dialogue full returns to the user, updates to the context attached the conversation. Ah, follow up event named that would cause another intent of invoked or an arbitrary prate payload that can be sent to the original dial awful collar. The response should occur within five seconds and should not be larger than a 64 K in size . Additional. You guys can see the response. The response from your book should have the following fields. Now. If you ever exceeds the five second time out is unavailable or returns. One of the following http Status codes indicating an error such as 500 400 for a one and so on dialogue slow response to the user using whatever default response is defined in the intense response section. In addition, if Dollop Floor was original invoked, why a detect intent? A P I The status field in the response and to the client will be in a status code to 06 After you build your fulfillment, you can deploy your agent using platforms such as action on Google 1-click, integrations, importers and exporters. You can deploy through actions on Google Consul to make your agent available through Google assistant and related devices. Additionally, you can also make your agent available through one or more off dialogue flows platform integrations that they have with Facebook Messenger, Skype slack and so on. Oregon Important Alexa Skill into dialogue floor or export toe. Alexa or Cortana. Thank you for joining me on this session on Hall Fulfilment works. And now we're gonna go ahead and take a look at how we can configure fulfillment in dialogue. Hello, 12. Lesson 3 DialogFlow Agents: hi and welcome this lesson on looking at how dialogue full agents work and what they are. So we'll look at a few different aspects in terms of that work, for agents will look at how they work and different components of them in terms of utterance, fulfillment and how we go about designing an agent on Delic. Fall lets you easily achieve a conversational user experience by handling the natural language understanding. And when you use Delclaux, you create agents that can understand the vest and very nuances of human language, and translate that to standard and structured, meaning that your abs and services can understand. The drink I see on the screen is an example of hard dollar for handles, a user's utterance for weather forecast not to look up a weather forecast. You might need a few pieces of information like the time Do you like the time users want the forecast four and their location. However, as we previously mentioned, different users might request our forecast in different ways. Di local can understand these differences and translate them to a standard user intent to get the forecast. It can then parse the user's request for the partner and data. You need to fulfill the request in this case that users desire time and location for the weather forecast for only. You can use the data to look up the weather with a public rest a p I and return the weather to the user interface form of a response. When a user says something is referred to as an utterance, your agent matches the returns to an appropriate intent, otherwise known as intent. Classifications and intent is matched if the users language model for that intent can closely or exactly match the users utterance. He defined language model by specifying training phrases or examples off things users might want to say, and then dialogue for takes it from there. Like I just mentioned, an agent helps you process used user input into structure data that you can use to return an appropriate response. And I have been defined all of these things inside one or many intense, which will look at later on in the course in terms of what they are. Would you define how to map user input to a course morning response? Let's let's take a closer look at the example. I just mentioned. So the user might ask, What's the forecast or what's the weather today, or what's the temperature into by the highlighted words that you guys see on the screen are catch phrases for the baht to look for weather. The forecast, the weather and the temperature all refer to temperature in terms of providing back a number, whereas today and and divi refer to a place where it should gather the weather from all of that, the agent parses and processes and it picks up. The intent is forecast, and the extracted data from the user utterance is both a time and a location are. You can either send response that can prompt the user for more information to continue the conversation or just end the conversation. If more information is required, this back and forth happens again. Your agent matches a user utterance with an intent. Extracts parameters and returns. Response and dialogue full includes an easy to use. Their spots handle to return simple, usually static responses. If you want to return mawr cater responses, you can use logic called fulfillment to process any extracted parameters and return a response that is more dynamic or useful. Let's see how fulfillment works and what it is. Every intent has a built in response handled that can return responses after the tent is batch. Like I just mentioned, however, this feature only laws you to construct responses that are static or have minimal logic. And most times you'll want fulfillment to process the intent first and then return. UM, or intelligent response fulfillment is custom logic that you implement as a Web book, which services, requests, processes them and returns responses. The first your agent matches a user utterance to one intent next to your agent, extracts parameters out of the user utterance and calls her fulfillment with a Jason payload that contains the parameters, along with a host of other useful information about the intent. The third step is your fulfillment processes any necessary information it needs to from the Jason, such as calling another rest AP I with extracted parameters. The next goes on to construct a response and return it back to dialogue floor to render to the user. Now this response can be simple text or two, or a rich response such as a card with an image of example you guys see is a typical Jason request from the user. Want him to know about the weather and you guys can see the quarry text that the user type is. What's the weather in Mountain View tomorrow for the action waas weather And here's a typical Jason response from the baht back to the user are designing your agent. There are three basic things that you need to keep in mind. First of the goal. Second is a platform, and this next. As the dialogues so look so very important, you have to have the goal in mind in terms of what it is your business is trying to achieve and what you expect. The uses the users to get from this, but and then also, how often will interaction occur? Is it an hourly basis? Is a daily basis, or is it an infrequent basis that you expect the users interact with the body? Next is deciding on the platform what platform will be. Will it be available on whether it's a Web based bought, whether it's an app based pop, the last of dialogues that's very important to create high level conversation structure to cover all use cases that representing your business schools because in order to train your bots to interact with the users, it needs to know what types of conversations occur in your business. Not these three key things need to came in mind before you actually physically start designing your agent. Now, even if you've previously used dialogue, close, starting from scratch can seem like an order overwhelming task to mitigate some of these Della Ploy as features can utilize to get a great head start on your agent. Firstly, toe have pre built agents where the offer a substantial list of pre constructed ages to help you get started. They cover common use cases like hotel booking, navigation and online shopping. These agents come with the tents these agents come with intense and entities to cover the most popular requests pertaining to their verticals. Add responses specific to your business, and you have a functioning agent in no time. Next, our system entities. And when a user makes a request, there's important information you'll want to gather and parts from what they said in dialogue flowed there called entities and the system entities air collections of these important words and phrases that are readily available to use such as geography, dates, colors and many more. Next, we have small talk, one developing your dialogues and we have You may have considered covering requests that are off topic. While this makes for a more complete experience, you should focus on the conversations that pertain to your business. Dalla Po comes with an optional feature called Small Talk. With this feature enabled, your agent will respond to general conversation, emotional responses and questions about the agent itself. All of these multi responses can be customized to make sure the experience where their casual business like or somewhere in between his representative off your brand. Lastly, there Google has provided agent designed checklists on this checklist. Helps you find out if you have all the necessary components for a robust agent. This checklist. Take into account natural language, accuracy and usability to ensure your users will return to your agent. And I have provided this checklists as a downloadable document for you guys to download and go through as a homework assignment. So thank you guys for watching. I hope you guys got a little or V off what agents are and in the next lesson will go through actually creating an agent 13. Lesson 4 Intents: hi, everybody, and welcome to this lesson on intense and understanding what they are. So a couple things that will look at in this lesson we're getting overview of what intends are, and then we'll go ahead and look at the different components off. Intense $9 floor, the basic flow of a conversation. Waas three basic steps. The user giving the input, the agent parsing that input and the agent returning a response to the user to define our conversation work, we need to create intense in our agent that map user input two responses in each intent. We define examples off user utterances that can trigger the intent, what to extract from the entrance and how to respond. General and intent represents one dialogue turned within the conversation. For example, you could create an agent that recognizes and response to users and put about their favorite color. So if the user said something like my favorite color's purple, your agent would match that input to its corresponding intent and return the response you defined within that intent. Your agents response usually prompts users for another entrance, which your agent or attempt to match you toe another intent and the conversation continues . How intent contests are four main components that allow you to map what your user says towards your agent responds with the first We have intent. Name the intent name is passed to your fulfillment and identifies the mast. Intent. Training phrases are examples of what users can say to match a particular intent and dialogue flow automatically expands thes phrases to match similar user utterances. Action and parameters defined how relevant information are extracted from user utterances. Examples of this kind of information include dates, names, places, times you can use parameters as input into other logic. Shift is looking up information, carrying out a task or returning a response and responses an utterance that spoken or displayed back to the user. Now you guys can see on the right inside a figure on intent. Magic Now typical agent has several intense that represent a range of user intentions. Whenever user says something to your dialogue for agent, the agent attempts to match the utterance to a particular intent. Then the agent returns the response within that intent to match users and put that isn't recognized, you can create fullback intents, de local matches, user utterances to intense using the training phrases you defined and the important words, phrases or values you specify within them. You guys have seen the intent matching diagram. The user others three user asks. My favorite color is purple, and the dialogue slow goes down through all of us intense and tries to match intent. Four. Answering the question about favorite color Wanted finds the intent. It uses the training phrases you specified in that intent to answer the user, whereas in this example, just his response was purple is my favorite color to trading phrases are collections of possible utterances that users might say to match intent. Now you don't have to define every possible example of what a user might say because of Dala flaws built in machine learning, which naturally expands. Training phrases toe other similar utterances, but you will need to add multiple training raises within an intent, and a recommended average is about 15 examples that you should be adding, for example, training phrases like you guys see on the screen. What is the weather like on Tuesday at 3 p.m. Another example could be What's the weather today, or what's the temperature? Or is the temperature hot is a temperature cold, so these are all trained phrases that you should keep in mind again. Each is specific to its business, Kate. Then you also have what are known as entities and sanitation trading places. Training phrases. Allow your agent to successfully marriage user and put to an intent. Now to further help your agent with his matching process, you can also annotate training phrases with entities and entities represent categories of things like cities, colors, dates and so on. You can men. We annotate your trade training phrases, but dial up for can also do it hard American for you. Once the words or phrases annotated, it becomes highlighted in your training phrase. As you guys can see, the date and time are both highlighted as a system entity and a system date in the system time. The local defines system entities which are pre built within. He can also create developer defined entities when you want dialogue floor to recognize a certain category of things that isn't represented by his system entity. Now each training phrase can be in one of two Moz, either an example indicated by a quote icon or a template more indicated by at sign training phrases. In example, mode are written in natural language and annotated so that particular values can be extracted. For example, what is the weather going to be tomorrow? And Dubai is an example of that mode. Training phrases in template mode contained direct references to entities prefixed with an ad sign instead of annotation. So an example would be What is the weather going to be at date in at City? Now would think. H intent. There's a table under the training phrases entitled Actions and Parameters. Now, once you annotate your training phrase, the corresponding parameters automatically appear in this table, and the sectionals contains a text field name action. The value of this field has passed through fulfillment and can be used to trigger specific logic. The highlighted words in your train phrases represent entities that are extracted as parameters at runtime. Now the value off a parameter can be used in responses. To refer to that parameter value is like a placeholder or the variable sign to that primary . There's different types of parameters that we can use for example, lists which can contain indefinite number off values, for example, our produce ordering agent may expect the fallen utterances from the user like I want apples or I want apples and oranges. Using the list option in parameters sets this entity as less. This allows any number of possible parameters in the user utterance to be picked up as one entity. When you define responses, you can reference extracted parameter values and include them in the response. This is helpful for recapping information provided by the user. There's different extracted parameter values that you can use, such as original value, composite entities or contexts. Now every intent must define response that's returned to the user There. Two primary ways. You can return response to the user either with a pre defined status response or with the response generated from a Web book. On both these cases, you can use extracted parameter in the response. Now a static text response. You can define one or more responses that will be returned when the user's input matches that that particular intent if you have more than one text response to find your agent, will select responses to return at random but never used a variation twice in a row until all responses have been used. That's recommended toe. Add several varieties of text responses to make your agent more conversational. Next is a Web book response, which is, if you want to return dynamic responses to the user. For this, you must use fulfillment, which is quote that is deployed as a Web book and response to http requests for from dialogue flow your for formal court processes information from the matched intent and constructs a response to return to the user. More specifically, once user input is parsed, dialogue Floor sends the name off the intent that was matched and values of extracted parameters and other metadata as a Jason Payload in an http post. Request to your book and then attorney Rappel constructs a response and sends it because Jason Payload to your dialogue for agent was then delivers a response to the user. And as I mentioned in the previous election, money create an agent. There are default intense, which are pre configured for you by dialogue flow. There are two or from their pre configured. One of them is the welcome intact. This intent has a special welcome event attached to it, which is triggered whenever the user begins a conversation with your agent. The default welcome intent can also be managed through his training phrases, which are pre populated with problem common greetings like Hi Good Morning, How are you? And so on? When the default welcome attend is matched, your agent will respond with one of the pre populated text responses in the responses section of the fallback. Intent is pre configured with a variety of static responses such as I didn't get that. Can you say that again or story? What was that? The intent is mast when the user's input does not match any other intent. So in other words, it's kind of a catch all for any ANOC unrecognized user input. For example, say your agent only has one custom intent named whether that recognizes user input like What's the weather today or forecast tomorrow? So for user, a speaking tour Asian and says, I like the color purple, your default fallback intent is masked because agent is unable to match the input to the weather intent. Or, as you gotta see this example, if he's asked, what times what time is it? If there is no intent configured with time, the dollar for matches toe a fallback intent which again and which in turn, response to the user with a static text response. Thank you for watching this lesson on intense will. Hopefully you got a good Oreo. What intense are and how our dialogue for uses that to none. Next lesson. Let's look at hands on tutorial on creating intense within our agent. 14. Training and Analytics: everybody and welcome this lesson on training and analytics. Looking at hard dialogue flow provides different training in analytical tools for us when we're creating butts, so get a good overview off the different features that Dalla four has. And then we look specifically at training and analytics. So Della for prize features that can help you build and refine your agent. Using real world data as a developer again, leverage existing sources of conversation data you might have access to as Aulas usage and performance data that pertains to your running agents. Are there three main use cases for real world data within dialogue? Floor First is building a new agent using logs of existing customer interactions. Second, is improving the performance off a live dialogue flow agent using its own logs or, lastly, understanding the performance of a live dive local agent to inform your design decisions. The first month is used training toe. Add existing data to training phrases. The 2nd 1 used training toe, add additional data to training phrases and last is used analytics to assess performance off your agent. So these are all different examples off. One. To use each one of these use cases now, since dialogue foes natural language processing is based on machine learning, you can add training data that the agent learns from and uses to improve his performance. Dalla Clothes Trend Feature provides an interface for incorporating both ex general and internal customer interaction Logs in tow. Agents training phrases You can use this feature to build a new dialogue for agent using logs of existing customer attractions and to improve the performance off a live dialectical agent using its own locks in the training pays that we will look at where do the demo. It shows a list of conversations logs for your agents. Conversations automatically appear in the conversation list as customers chat with your agent, and you can also upload log data captured outside of dialogue flow. Now, since Training Tool considers every line in the file, a request file should only include logs that are potentially useful as training phrases within intense. If you are using existing customer logs, you should only include utterances made by the customer. For example, if your logs for conversation between customers and your agents, you should exclude anything said by the customer service agent Now, for each request, you can also choose to perform an action in order to improve your agent. Training is done in bulk across an entire conversation, so any changes specified will not be applied until you approve those changes. And we'll look at how we go about approving changes once they're imported into training and analytics. Now the analyst page gives you insight into how while you're agent is performing so you can work to further improve the user experience. You're providing there two types of data related to the agent and conversation. It's been part off. There's uses data, which is the number of sessions, inquiries, procession and then the annual you data, which, which is most frequently used intense and exit percentages. Dialogue floor gives you a good dashboard where can review statistics relevant to your specific agent, depending on how many agents you have, each agent will have its own analytics, and you're also able to choose analytics based on date ranges from anywhere from 1 to 30 days. So there's a quick, quick or view of training analytics in dialogue flow. Now let's go and take a look at how we can implement training and look at the analytics for our agents 15. BOT Integration into Skype and FB: Hi, everybody. And welcome to this lesson on deploying our about that we created an azure to a channel. So let's go ahead and go back to that food. But that we had created in the previous lesson who was the dashboard again? The one I went through last time. We're gonna go ahead on this left hand side will see an option for channels. So these are all of the channel that Microsoft provides automatic integrations with in terms off. Click through integrations where no additional quoting or AP eyes are required for you to integrate. This bought with, if you guess he appear, we already have it working and running on Web chat, which again it does by default on all bots that are created. Whereas on the bottom here, we can see all of the different options we have in terms of pot deployment. So in this lesson, we're gonna go ahead and take a look at how to deploy um, in two different channels. One will look at Skype, and next we'll look at Facebook messenger. So let's go ahead and look at Skype first, because that is the most easiest out of the two in terms of deployments. We're gonna go ahead and select Skype. Want to click on Skype? It automatically configures it for you. So we go back into our channels. You will see that as soon as you clicked on sky and automatically initiated the connection to Skype. But again, it gives us a warning because we haven't configured anything. We haven't synchronized with Skype yet, so I'm gonna go and closes out and go back to our Skype configuration. So a couple of options we have again we can control it on our website. We can control it through messaging and it gives us the option. If you want to enable mass, Jim or disable, and same with media cards, you also have the option for enable calling for Ivy our audio calls and real time media calls. You can automatically add botched toe a group. It's not really recommended to ah Lau bots in a group by default. And again, that's why it's disabled by default. But depending on your business case, this might be an option that you could be utilizing and then finally and a description for publishing after, but has a website, the category of your body or there's business catalogues, chat or so on, and then publishers information in terms of the organization or person's name and email What languages support should be provided. Would Skype Privacy statement you RL's and terms off the Earl? This is for if you are deploying the bod in a production environment in Skype, where we used by the masses outside of your organization, if you're deploying it within your organization solely, you will not need to fill out this form and submit for review. This is only done when you're deploying this, but to consumers into the public. So let's go ahead and take a look a little bit closer. At Web control, click on Get Web code It all Mike Lee takes us to Skype for developers, where we are able to generate a cold to embed Skype and this body on our website. So all we have to do is set the receiver as a bott and can add or Microsoft App. I d. Here, get your app I d from your as your dashboard. So if you go back into our dashboard and go on settings where all we would need to do is copy this app I d pasted here and it automatically generates this cold was we can copy and implement on our website if we're going to be utilizing this body on our website and additionally gives us simple implementation steps on how temperament is on the website. This court is automatically made for us up here and here you can set the message, the message recipients that set the canvas and so on. So it's a very, very simple walk through process if you are going to be embedding this bought on your website and customized buttons Chad canvas or if you have a JavaScript, sdk and so on. But what we want to do is score head and simply test out Skype to see how it's going to look if we were to chat with this body through our own Skype, so what I'm going to go and do is at my but this costume food by to my personal Skype and see how the conversation plays out. You guys, you know that the Skype is running. It's healthy because we've gone through the configuration. Although we haven't changed any of the default settings, we have gone through it and now again. It is working and running properly. If you go and click on Skype gives us the option to add this. But to our contact since him, since I'm already logged into Skype on McGuire and click on at the context Jesse, it goes to that same order processing that we did in our Web chat when we tested it out. It's as simple as that in in terms of implementing your body and Skype and always look at how we can implement it in Facebook. Messenger. We're gonna go ahead, go back into our channels and click on Facebook Messenger. Very good thing about Microsoft is that they give you a step by step instructions on how to add your bought to Facebook messenger. So for the first time, I would highly suggest you go through these step by step. It's a very, very simple way and process that they have provided for us. The first thing we need to do is create a Facebook page. I'm gonna go ahead and log into Facebook and create just a test Facebook page for the purposes of this demonstration. So what I want when I'm cream the page, what I'm gonna do is go ahead and click on business and brand the page name. And as for the category, owls like product service. And I'm going to skip the picture and the cover photo, because again, this is just sport the purposes of this demonstration. But if this was a real life scenario, obviously you would want to create a full fledged page with your essay pictures and your necessary cover photos in order to let the users know what this pot is going to be used for . We have our page created after a pages created. Next thing Wonder is create a Facebook app, so we're gonna go and go to developers dot facebook dot com. After I log in, I'm gonna go ahead and create a new app display name. I'll keep it the same as I did for my butt. Contact email again your Facebook email and this is again that would for Facebook developers. So this is the dashboard for Facebook developers, and Facebook gives us a lot of different options for developing and customizing it in order to use it for our business. But what option that we're concerned with specifically for this is Facebook Messenger and we can see that here. But before that, we want to go ahead and do is gather a few pieces of information in terms off our But we're gonna go ahead, go up here in the settings First, we're gonna in the basic setting. What we want to do is copy this app. I d an app secret because we will need this. We're gonna go ahead and go into the in brand sitting and we want to do is in the security . We want to allow a p I access toe app settings. Make sure this is quick to yes and save changes for now, I would go ahead, go back into our dashboard. We're gonna go and click on add products and want to set up messenger and here want to generate a token for our page that we just created all that that qassam food. What you want to do is make sure we copy this page packs is talking X. We want to enable web hoax. But this basically is going to do is allow us to forward our messages from Facebook Messenger toe are bott and we want to allow messages. The deliveries post backs and options and again, depending on our business. And we're going to be using this body and face the messenger four. We can enable all different kinds of messaging. So here we need to put our callback. You are Oh, and are talking for a call back you Earl. And we get this information from our azure portals, we're gonna go and go back into our portal. And if we scroll down from when we were in the configure face of messenger page towards the bottom is where we have our call, the girl and our token. So we're gonna go and copy this pasty you are all here and pays the token here. Want to verify and save? Once it verifies and ensures that the token you are correct, it opens up an additional dollar box for us where we are able to select the page that want enable the Why books for we're gonna go ends like that same page that we did that we're creating are bought for I'm gonna go and click on Subscribe for this is done. We go ahead, go back into our dashboard and remember all of the things I told you that we needed to copy and save are all are all going to be needed here. Our facebook app I d are up secret. Our access talk and your Facebook page. I do. You know, this has gotten from your Facebook page. So we go and go back into Facebook into the page we just created. And in the about section, if we scroll to the bottom, we have our page ideas. We want to copy this and we want to paste this here. After all that is done, we're gonna go and click on safe now that since that saved, we're gonna go ahead and test it out to see if this is implemented properly. So you go and go back in the faith. As you can see, I just opened up this chat for the Qassam food box and within Facebook, typed in high, takes me through the same exact option that we did. It asked me the same question. Welcome with simple Bart's and welcome to the simple sandwich order bought and it will take me through that same form for that we created. So that's basically how you integrated within Facebook. It's a very simple process there's no additional configuration or programming assets that is required. If you are going to be utilizing these bots out of the box, that's going to happen very rarely, whereas for most business cases you will require some customization in within your bots. I just keep in mind until you make the app public and you publish your Facebook page. It will not be available to anybody other than the page ad mons or the developer roll. I will not be going through that because obviously this was just for the demonstration purposes. But if you will be deploying it into production, those are the last two steps in terms of making the public and publishing the Facebook page . So thank you for joining me on this lesson. I hope you guys got a good overview off the simplicity that Microsoft has provided for us in terms off deploying your body in a couple of channels that we looked at both Skype and Facebook messenger. If we go back, lastly, the channels for one last time, we we do have multiple channels that marker soft has provided and out of the box intubation for us. So thank you for joining me 16. Building a FormFlow: Hi, everybody. And welcome to this demonstration on foreign flow. From this lesson, I'm going to take you through how to create a form for dialogue in our body that we initially created in our last lesson. So if you guys remember our form four takes ah poco model and creates a series of questions from it, Therefore it makes sense that the first place we should start is by creating the model that we're going to be utilizing. So first thing I'm going to do is go ahead and create a new folder. I'm going to call it models. And first, let's go ahead and start creating a bug report model. So all it is is a simple class that we're going to augment a little toe work with our for Miller. First I want to do is put a serial Izabal attribute on here so that it can utilise by our baht. Then before we start cutting attributes, I'm going to go and create a static function called Bill form Down here. Now, this is what this is wounded. It was returned a type of high farm which is genetic type of bug report. So basically it's sending a form interface off itself back then, we're gonna go ahead and put in our return statement. So now we'll write a new form. Builder of type bug report got build. The form of the class is pretty robust and works along the same lines as every other piece of code in the form library and that it's changeable, set off methods. So if he wanted to, we could even insert a message in here that gets spat out before every built something like , Please fill out a buck. Every time a new form gets kicked off, you will see that message. Okay, so now that we ever class it up, let's start putting in some properties. The further the first thing that I want to do is capture title description, first name and last name. So these are all string values that are pretty self explanatory. So let's go ahead and get those created. So this is basically going to do is when formal gets a description field, it will prompt the user. Enter description for your report. When it gets the first name, it'll prompt the user was her first name for the last name I've used. Describe attributes and called it surname instead. Now let's put in the date time variable that we're going to use for our call back time and weaken. Decorate that with a problem that will make it much more clear. Of course, if we get a date and time for our call back, we're going to need a phone number. So let's go ahead and put that. And also what I've done for the phone number is I've used a pattern attribute to make sure that it's in the phone number format. Now. One thing to keep in mind and note is that in Florida asks the questions in the order in which they appear in the class. So if you're one feel that depends on another field, then you want to make sure that you ask things in the correct order. So let's do another property. Let's make this one a list. Now, if you want customers to be able to choose from a list of bug types, they should be able to choose more than month. So I'm going to do is create its first created in um with their A list of bug types, and then I'll include a few types of bugs that they can choose from. If you have noticed, I've set each of these values toe in the miracle value, starting with one. And the reason to do that is, if I don't specify in a miracle value than the first items Index zero. If that happens when form full asks me to choose from a list, it will leave out Item zero. That's just one thing to keep in mind with form, flow and be aware, aware upon your setting up lists. So now that we ever and then we can create our list. So let's go ahead and do that. Probably I want to be able to select a reproduce ability value. So let's make him for that. And then we can create our class and create our property, which is reproduced. All right, so that takes care of our model. Let's go ahead and create our dialogue. We're gonna go and go into our dialogue and create a brand new dialogue will name this one first dialogue. So this time, instead of inheriting from idol log, we're going to create a variable off type, high dollar extreme call dialogue. So this time I was going to create a chain A chain it again. It's simply a series of dialogues that gets called one after another. The first thing we're going to write a chain that posed to chain and they're going to select what we need from that message we're going to use a select statement here on all really care about is the message dot texts. So it's like that that now you guys see there's two dialogues that we need to choose from here. One is our greeting dialogue, and one is a bug report dialogue. Now our ultimate goal here is that when a user types in the word high, we want to call our greeting dialogue and then when the user types and anything else to fall into the form flow dialogue. So in order to get the body to choose the appropriate dollar, we're going to utilize the switch statement. We're going to use a regular expression to search the text for the word high. So in order to do that, we do a reggae X case here. Looking for the word high on the rockets cases called is a callback function that passes context and text to the next dialogue over chain, which will be the greeting Della. So now, in order to continue on the green dialogue, we need to use the chain that continue with command. This takes into variables. One of the dialogue that we want to change to and the other is what we get called after the dialogue is finished. So in here we get the greeting dialogue and then we call the new method called after dialogue Continuation, which we created. The other brother you guys see is the default path which is simply going to take in our call back to the next part of the chain again run again. We've used to continue with method and going to call our form dialogue. With this line of code, you re past our method built form which turns are formed, dialogue, object. And then you guys also see that we are passing in the form options. We want to pass in the option, prompt and start, which will automatically kick off our form dialogue when they fall into this branch. Otherwise, we'll have to send an additional message to the body in order to start start the dialogue and then finally again. We're going to pass the after Duyvil Continuation left it. So this myth is going to return a task of my dialogue, off type, string and taking. And I bought contacts and I await herbal variables. So this matter that I will be typing in will be called after we finish either off the dialogues that that will be calling. So we created a little message that thanks to user for the body right here, all right, now that we've done that, the next step that we have to do is modify our greeting along that we created a little while ago The reason we have to change theirs Is that a real case? We don't have a dialogue on the stack because of that. It has nowhere else to go. So it immediately tries to fulfill the wait for incoming message with the message received a sink at it are no example. Our route dialogue is the chains. What falls back to that chain after the weight, the first thing we're going to need to do is split. The message received a sink into two different methods, one being called respond on the other one being called measured received basic. So let's go ahead and do that Now. I'm gonna go into our greeting dialogue and the court that we have a code that we have. I'm going to remove that and type in New Chord that I will take you through a step by step . All right, So I posted in some code here and just walk us through it. Our respondent that is going to take care of talking back to the user with either the question of what's your name or the answer of high whoever you are. How can I help you? The message received Basic is going to take care of the retrieval of the users answer from the text. In addition, just putting them out into two separate Martha's have added this context done here at the end of Mrs received a sink. If you recall in the previous example, we had must have received a sing simply wrap around on itself because ah, about always need somewhere to go. Once it reaches here, it will know it's done with this instance, and it can kick back out now if we don't have this, we just said context that weight must have received a sink. We would never get out of this greeting dialogue and we would just keep looping around over and over again, which is not really what we want to go back to the root dialogues. So we essentially have to say, OK, I'm done with this dialogue. Put me back up a level to the root. Finally, I need to alter my start facing method to put in a call to my respond method before we start waiting for input from the user. All right, where we're almost done. The last thing we need to do is goingto our messages controller and change line number 21 from calling the greeting gelato our first I love which we just created. Now, since we have our dialogue property, we aren't new ing up a copy of the dialogues we delete new. We simply call our dialogue property. All right, let's go ahead and give our body try. So I'm going to start the baht and open up the emulator. All right, so now that I've started up emulator, let's see how are bought currently works the way that we have a design at this point time. But there for the type in high? Yes, and see for stopping high ago. It kicks into the greeting message control that we just created. It says hello. I'm cost. I'm sure what is her name? And if you guys notice this is the greeting that we just We did This is appear kicks in this post a sink. Hello, I'm Qassam Shaw. And since it does not have my name, it's gonna ask me, what is your name? To get the user data get name. So I'm gonna type in my name or type in a name and and again that fools down the same greeting. Bella. Hi, John. How are you today? And if he has noticed, it's staying within this loop in terms off within the greeting dialogue. Nothing. Guys. Remember when we created the first dialogue? If you remember, appear when we said If the user types and high it will continue on with a greeting dialogue , if they type in something else other than high, that's when it kicks into the form floor dialogue that we just created. Let's see how that works. If I go back in here, my re start the conversation and I type in something other than high. Let's say hello now We kick into our form flow that we just created this bug report again. It's gonna go on down and ask us all of these questions for the bug report. The one thing delegation note here, that title does not have a prompt on it. So please enter. And then the variable name is your default setting for this problem. It's just going to ask me for the title and I'm just going to say report now. We moved on down to the next option you specified and is asking us to enter a description for this report and moving right on Long is gonna ask. The first name is going to ask surname. Now there's something that I I want to show you. If I type in help, I'm going to get the screen. What the screen gives me is this is the out of the box value are get with foreign flow. So we get a couple of things here in the first bullet. It says you're you're filling out the best time of day. Field was telling us what field are filling out. In addition to that, it's actually it actually tells us what the responses could be, and it says, Please enter a date and time and again some other options that come pre built with informed flow be an option to go back to our previous screen help again shows us these types off tips quit. It will quit the for middle. Completing it reset will start the form filling all over again status. Show us the progress and filling the form so far. And then again that we can also switch to another field by a during its name title description first name, surname, best time of data call for number, bug or reproduce. So it's I typed in my surname incorrectly. So if I type in back again is going to tell me my please enter the current surname which I entered a shot. So let's say I go ahead and change that. Now again, it goes on down the current form and asks best time and date to call back the time and date . I'm going to go ahead and put in a date on is gonna ask me for a phone number if you notice I forgot to type in the time from the go and go back. It's a normal Gordon put in my phone number. And now it's gonna ask us the book area that we specified. And again if you guys remember going back to our farm flow, these are the public inning buck types that we specified. I'm going to pick a bug type and again our reproduce ability and I'm going to say rarely, and here again is gonna ask us to confirm. So form full gives us all of the fields that we filled out. What the answers were filled out just so we can confirm. And again, if you guys remember up here, I want to ask me what the best time and date to call me back. I said, Now what for? Four had done. It's taken the date and time from my current come PC. And it put that in there because I specified now and I forwarded put tomorrow it would It would have done the same thing at this time for tomorrow. Phone number, usability and rarely. So I'm going to click on Yes, and this again ends are form and it kicks me out completing that status loop again. This is all out of the box from functionality. I'm wasn't having to do all the stuff from scratch by hand. That would be a lot of work. That's where Foreign Floor makes like a lot is it literally gives us a lot of power with minimal amount of courting. Thank you for Janet Joining me in this lesson. I hope you guys got a chance to see how foreign floor works, got a little bit familiarized with a coating that's involved, and notice how powerful a tool form floor is and what robust capabilities it has for us in terms of utilizing it in our butts. 17. Creating a BOT in Azure: Hi, everybody. And welcome to this lesson on creating a body through the azure portal. So finally, guys have seen how to create a bought, create and modify are bought using visual, studio and coding. Now, we're gonna look at what Microsoft has done for us in azure and how easy they've made us. Now my preference actually is to create about the azure. As you will see, they've made it very, very easy for us in terms of providing the resource is required to create and deploy about in a very short period of time. So what I've done is gone ahead and navigated to my azure portal. And what I'm going to do is go ahead and create a new resource. No, what I wanna do is find a I plus machine learning. Next, I'm going to search for bots service on the web. I bought four thing wins. Do is give are bought a name, and just to give you a little background, what I'll be doing is using one of the templates that Microsoft has provided for us in terms of utilizing form flow. So this way you guys can get a good comparison in terms of using foreign flow in visual studio and using a form flow and one of the templates that Microsoft has provided us. So when the temple is that they provided us that utilizes form flow, it's basically an ordinary service. So I'm going Teoh Name the spot. The same subscription again with as your portal, it has to be pays You go, resource, Go. I already have one created. If you don't, you can always create one here pricing tier again. You can get full pricing details here to give us two options after is free again for testing purposes and then the as one is standard. So we're just gonna go and stick with zero. Since this is for training purposes, this is where we can go ahead and select our template. No. One thing that you guys want to keep in mind. Microsoft has provided us with two SD case. Version three and version for Version four is fairly new and it's it's very limited in terms of the support and in terms of the templates that they provide you inversion for at this point in time. So just for the purposes of this demonstration, I'm going to stick with version three and again, Depending on your preference, you can use C sharp or you can use no Jess. I personally like to work and see sharp, but again, that depends on preference you couldn't work with either. Or, And these are the templates that Microsoft provides for us out of the box for a C sharp sdk version three. There's a basic baht. There's a form. There's language understanding With Louis AP I. There's a Q and A and there's a proactive pot. So we want to go for the purposes of this demonstration. I'm going to go and select form click on Select, and it puts that here as Thiebaud template, your APP service plan on location. We're gonna go and create a new one and the answer plan. I'll name it the same as I have for my butt. I'm going click on OK, the application inside it is always good to keep it on. It gives it provides route insights and metrics in terms off your bought, the utilization and songs. We're gonna go and keep this on, and then we're gonna go ahead and click on create click on, create you guys. Lord is that there's a blue line going back and forth in terms of the notifications. You click on that, we can see that the deployment is in progress. So Microsoft Azure is currently working in terms off readying the box for deployment, so it usually takes maybe a minute or two for the deployment process to complete as soon as the deployment is done again. If you click on the notifications again, it'll give you this dialog box where we can go and go to our resource. This provides a good overview in terms of a baht that Microsoft has created for us that we selected again the resource group, the subscription pain you pay as you go again, the subscription and subscription idea, our account specific and then the messaging endpoint. And again, if you guys remember from the tutorials on Visual studio is very This is one of the more important ones in terms of what the end point is, where are bought because again A but is essentially just an a p i n point. Additionally, some resource is that Microsoft has provided for US plan. We can review the bought design and guidelines for best practices provide somehow twos. Bill again Weaken, Download the code and put it in visual studio and customize it. We can test our bought online through Web chat. We can publish it directly. We just want to do it out of the box or we can connect. Are bought two channels such as Skype and Facebook. So let's go ahead and click on build. We want to customer. I want to see what the coating is, what it does and see if we can if we want to customize it a bit. So here we have a few options. We could download the baht source code and again Il Donaldo Zip file, and we can put it in visual studio and start working out of there. We can go. We can get the emulator for if we don't have the Miller downloaded or installed command line tools. Now, one of the very good tools that Microsoft has provided for us is we are able to make changes online, so we do not need to download the code and put it in visual studio. Microsoft provides us an online code editor, which makes life a lot easier, so we don't need to worry about having visual studio or downloading and putting in visual studio and uploading it back again. We could make our changes right online through the azure portal. Additionally, some other options that that it provides us publish upload as yours again. This is if you want to connect of channels. The second option is if we have downloaded the bots source code and were re modified it and we're ready to upload it back. We can do it here. Or there's also an option for continuous deployment again. If you are working in a production environment and you, you will be making constant changes to your bought to make sure it's adapting to your business case in your environment. So at that point time, it requires constant updates, and it would be a lot. It would be a lot of hassle for you to download a co would make changes and uploaded again . You would move a lot of time. So what Microsoft provides for us as you conduce continuous deployment where you can modify live code and it updates your bought right there and then it was very, very good tool. If you're working in an environment that requires such utility. But for the purposes of this demo we're gonna do is go ahead and open the online court adviser. And when you open up, the court editor on the left hand side should look a little bit familiar to you guys, especially if you have gone through the visual studio modules and this list all of the different files that are available for us to modify. And again, on the right hand side, Microsoft gives a good snippet introduction in terms of what you can do with this online code editor again, we can either download the zip and open it up and visual studio and modify it there. And then again, we need to publish it back, or we can use the editor. Mico changes right here. So what we're gonna do is go ahead and utilize this as your APP service editor to see what the court looks like and see if we want to make any changes. If you click on models on you, click on this sandwich class file again. This is the code that Microsoft has provided for us out of the box for this spot again. It's a very simple baht that utilizes form flows and again appear. You guys can see it use utilizing bodybuilder form flow, and it's basically just a simple form that asks you an order for a sandwich. It's very similar to what we worked on in visual studio when we worked on the bug type. And again, this makes life a lot easier because this provides something to start building apart. Now again, this is not something that you can put into production, obviously, because this is just a sample. But it's a very, very good start important for you to start your modifications, especially if you are familiar with C Sharp, which again you would need to be. If you are developing Microsoft bought through the body framework, Let's go back and see what this pot actually looks like. If you go back into our portal, we're gonna go ahead and test in Web chat again. This is just like the emulator that we used when we were working in Visual Studio is is that this is within the azure portal. So what I'm gonna go and do is type in my first message and right here again, right after I type in high it kicks into that simple form, Florida asks. Welcome to the simple sandwich order back and asked us to to select the Sanders from one of the listening to type it out or Regan's select one from this list, depending on our preference. And if we go back into our code And if you remember informed Flow, it'll work right down the list, depending on what question as faras and then go on down to the next questions. And the first question we come up with are the sandwich options. The sandwich options that you guys see here are the same options that show up here. Let's go ahead and select one to a spicy Italian. It goes on down to the next question I'm gonna do Inch next asks for bread. I'll type this or not. Just show you guys that you can either do type or select next question it asking for a type of cheese, and I would ask us to select one or more toppings. December 212 and three. Next question is a type of sauce. That's if I do one and two, and then finally it asks a confirmation for our selection. It goes through all of the answers that we've provided. And again, if we click on Let's if we did something wrong We do know it asks us what we want to change And here again it as it asks us to confirm our selection because remember, from the form flow lessons there, there are a couple of options that we're able to do if we have. If you want to ask for help or if you want to go bash, let's say by type and help provides us with a standard Microsoft form for it again. This day is the same regardless of if you're developing in the azure service or if you're developing on your own in visual studio, where gives you all of the different commands that are available, informed, full because form flu is and out of the box tool that Microsoft has provided, or you to make lives a lot easier if you're developing forms. It asked us to confirm our selections. I'm going to say yes and ends our conversation. There were provides the last line. This is the end of the form and you have to go back into the code. This is the last line that we provided, and this is where it kicks out. Since we provided all of the answers of the form, it kicks out, and this is where we can do the Web hook or the A P I called to your internal systems, for there are for the order to show up. Depending on whatever business systems you are using, you can develop that specific AP I So this order shows up in your systems on the spot can essentially be deployed to production in a very, very simplistic form right out of the box. 18. Creating BOT Visual Studio: Hi, everybody. And welcome to this demonstration on building your first pot. So what I'm going to do is take you through the initial steps of configuring your first spot in the Microsoft bought framework. In order to do that, the first thing we need is Microsoft Visual Studio, and you guys are able to double that online for free. I recommend that you download the community version. It has all of the features that will be required for you in order to build your butt and make sure that you don't know the dot net and see sharp frameworks along with that, so first thing we're going to do is open up. The are our first bought application that I have included for you guys in the download section for this lesson, and it's basically just the but application template that is provided by Microsoft. I have made a few modifications to it, which I will demonstrate throughout this course. So the first thing you guys have noticed is that visual studio and market soft have gone ahead and created a few things for us automatically. So on the right hand side, you guys, we have a solutions. Explorer that takes us through all of the options that we have installed and configured for our bott and just for your reverence. If this is not showing up for you guys, if you guys go up on here on view, you can also select Solution Explorer. And it will show up for you guys if it does not by default. So the few things that are army created for us by Microsoft are three folders this APP. Start controllers and dialogues. And if some of you are already familiar with .net projects, you'll notice that these look very familiar as they follow the same format. The first thing. Let's go ahead and get into the message controller to show you guys what's happening here. So the first thing that I want to show you is that is the fact that we are inheriting from the A p I controller. They get see on your online 11. And what this basically tells us is that this about is really just an a p i n point. All right, so the first myth that you guys see is probably the most important. It signifies the a p i n point for our chat, but it's the one place that all of the messages coming in and are handled from. One thing that you guys will notice that is that it accepts a message type of activity. And remember that activities retrieved from the connector service, which which if you guys remember from the lessons, translates the channels Jason into activity. JSA and I want to dig a little deeper. A few things become a little bit more clear. The first thing that we're looking for is activity type and activity type and tells us what event happened within the channel. Now there are six different activity types, which you guys see towards the bottom in handle system message. They are message delete, user data, conversation, off day, contact, relation, update typing and pink. So the delete user data type occurs when the user asks the baht to delete their personal data. The Conversation update type occurs when something makes the state of a conversation change , and this could be something like someone got added or removed from the channel. The contact relation type occurs when the user adds a removes the baht from their contact list. The type of death occurs when the user is typing and then lastly, the pink type is a test type you can use to make sure you're bought his active. So going back up here to the public casing, When a user sends a message to you, the activity type is message. This is the most common activity and the one that probably matters the most is you guys can see you have a bunch of different things that we can hook to create a fully functioning baht. Now, in this case, we really only care about the message time which has handled up here in the post. Now, if the activity type is of the type message, we get this line that's executed. Now the first thing that you got to notice is that we are utilizing await key work, which makes sense because right up here we can see that we're utilizing asynchronous function. So it would make sense that we need to use the await keyword here. No recalling the conversation got sent a sink which tells the baht framework that were activating the next step in the conversational flow by calling a dialogue which is signified here by this parameter rule dialog and a rood Dialogue is a class that has been created for us and lives in the folder. If you guys see on the right hand side called Dialogues and I remember dialogues are reusable snippets of conversation and Microsoft has really started us off on the right by creating a default one for us, making our lives a little bit easier. All right, so let's go ahead and look at the root dialogue. They should look a little bit familiar if you guys remember from the eye dialogue lesson we are inheriting from my dialogue, which means that we have to create a method called Start a Sink, which we see right here. So let's look and see what's happening in this in the start, a sink function three. Beloit were passing in the context, and the context is basically the context of the current conversation that we're having. And in the current conversation that we're having, we're calling the dot wait function and what the dot Wait function basically does they say , wait for the user to do something and most user does something called this method. This method is this message received a sink. Now this method is asynchronous, and it takes in a context. And also is I a wearable object result. The result can be translated into an activity which basically gives us the message that came in from the user. So right here we're saying All right, I want to say something back to the user because that's the reason I was built. And the way that I do that system is to take the context and call post a sink and inside the post a sink method, we want to send the sentence. And then finally, we're basically telling that I like to wait until they get the reply from the user, which should be their name. And essentially, we have to program this in such a way that there is never a final, and to it we always need to be asking for the next thing. That's why this is currently running in the loop does for this demo purposes. But when you're building an actual, but please make sure you keep in mind that you should design conversations that your butt should never end. The user should initiate the end of the conversation rather than your body. OK, so now let's go ahead and get the bots started to see how it's currently working. If you go up here, we can initiate the baht. All right, so it looks like our body has started. And as we're expecting, we've produced an end point of https are bots. Name A P I slash ap I slash messages our bots started. Now, how are we going to test it? This is where the emulator comes in. And it's also a piece of software that I have provided in download section, and you're also able to download it from the Microsoft website. So I'm gonna go and open up the emulator software. So this is the box framework simulator and what it basically does. It simulates your body that you have just created. You can go and test it out in your local environment rather than having to deploy it and testing it. Then you know, once this is open, how are we going to open the but that we are working up now if we go ahead and click on, create a new bought configuration. Since this is the first time that will be opening up this pot in the emulator, we get this dialog box that that ask us for a few pieces off information. The first part you need to understand in this section is where it says the and point you are. This is essentially the place that we're going to put the u R L to your a p i n point. What this is saying to the emulator is that this is the A p I that I want to hit in order to send messages to my box, though that there's a couple of different text boxes, the Microsoft App I D and the Microsoft at password. Now let's go back into our code so I can show you what the's actually mean. So if you look into our controller appear receipt bought authentication now because our but is an important we want to be able to secure it because obviously we don't want just anybody being able to hit our bought endpoint. We want to make sure that whoever is hitting it is authorized to do stop. So what? Putting this attribute on here we have a task authentication toward a P I end point. Other thing that we need to do is going to our Web config frog wide and show my solution. Explorer on the bottom. We have Web config and in the Web config on linings. 10 11 We see these two keys, the Microsoft APP I D and the Microsoft at Password No. One. We're finally ready to go ahead and register are baht which will do later on. In this course, we will receive an APP i D and password so that we can secure our bought. And if the app I d and password appear in the web config, it's that insider emulator. We would have to put them here in the app i d and the at password. Otherwise, we won't be able to connect to our but I'm gonna go ahead and fill out this information after you've collected the body you guys will see on the log file it gives you Ah, it'll give your running log off what your body is currently doing. So right now we have one post which is the direct line dot start conversation. Let's go ahead and try sending ah message to see what happens. All right, so let's go ahead and click the message. And this is another aspect of the emulator that is very useful. Another inspector, Jason. This represents the activity Jason that gets sent across the wire. It has a bunch of different attributes in it that are helpful to us. Things like the type of message, the text of the message, the locales and things like that. And a lot of these attributes are going to become more important to us as time goes on and we make our way through this course. But I just wanted to show that to you, to get you guys familiar to where you can go to get the Jason. And the next thing you guys will notice is in the log file. There are a bunch off additional things that have happened. Now, after I have type in the message, we got a bunch of different post and get requests from the baht to show us the flow of conversation and what is happening. After we typed our message, we go ahead and get the conversation data and we get the private conversation data, and then we send back are appropriate response, which was Hello. Tell me your sweet name. And if you guys remember from the message controller from the rude dialogue. This was the message that we typed in here. Hello? Tell me your sweet name. If I were to go ahead and type in my name again after he gets my name, it goes through the end of the conversation. And if you guys see from the root dialogue towards the end of the conversation to complete the loop last await contact, start post a sink. Waas. Hey, user name. Welcome to but And this is the exact same thing that they did hear. Hey, Qassam. Welcome to bought. And again this closed the loop for this initial, but that we have created and it will keep looping around in the same conversation. So if I were to type in high again and again if you guys see it continues on this same loop because this is how we have created the single loop in the root dialogue. So again, lastly, forward a type and wants the same thing again, it will respond. Hey, Hello. Welcome to but and again it's a It's a continuous loop back and forth through this last private facing that we've told in the root dialogue. So just like that, we have gone ahead and created and tested are for a spot 19. Enhancing Greeting Visual Studio: hi, everybody. And welcome back to the second half of lesson on creating your first but in Microsoft visual studio using the Microsoft. But framework, the last listening. I saw that we created a very basic pot, but it's very un interesting because it loops the same conversation over and over again, which is mentioning the name. So this lesson we're gonna go ahead and dig a little bit further to make it a little bit more useful. The first thing we want to do is add a new dialogue to this spot. So if you go ahead and come to the dialogues and our solution Explorer and one thing to keep in mind, if you guys are continuing on from the previous session, please make sure that you stop your bought because it has it was running previously in the emulator. If you don't stop it, you will not be able to create additional route dialogues. So if you go ahead and right click on dialogues, we're going to add a new class rule named is greeting. Now, once the classes created, we need it inherit from the I dialog interface visual. In turn, make us implement the function start a sink. So after we inherit from my dialogue, visual in turn, make us implement this the function start a sink. So if we go ahead and implement that, so there's our new function. But this is the first method that will be called when the dialogue spools up. Finally want attached to serialize herbal attribute to this class, and we can do that by putting the words see realizable up here in the brackets. Little here is to make a little bit more so. The goal here is to create a little bit more of a robust dialogue when we greet the user and ask him their name. So the idea is going to saw. So the idea is that we're going to utilize state management just to save the user's name. And once we know it, we can greet the use of the next time the interface of the box. So the first thing that we're going to do is great, the user, and we can do that with a simple post facing call. The reason why we have to add this lines because remember, the body needs to be told what to do once the next message comes in on the line simply returns the asynchronous tasks back to the calling program must have done that. We can move on to the message received basic method on this method. We want to both get the user's name and say hello, depending on the situation. So let's go ahead and generate that method. Oh, after you've generated that method, next we're gonna want to set up some variable. So let's go ahead and set the so the 1st 2 variables are obvious. We need to get the message sent to the body and we need a string to hold the user name. However, the third is something that we're going to use to determine whether or not we need to get the name in the first hand. This is going to be achieved by the get named flag next to want to get our saved values for these variables out of our state engine, there are three types of state containers we can utilize. Use the data, conversation data and private conversation there, and it's very important that we use the right type of state container depending upon the situation. So, in this case, regardless of conversation, we will always need to know the user's name. So for the situation, we want to use the user data state container, and we can do so with these lines of coat. So this will go ahead and pull those variables from our user data bag and placed them into our local variables. I wouldn't go ahead and check to see if we need to ask the user's name or greet the user. We can do that with a few additional lines of code now for getting these name. We want to take that from the message text here. Then we want to save that name here and change our flag defaults. So the next time around we passed over this condition. Now we have to create our code toe, ask for the user's name if we don't have it already, and for that wouldn't have a few additional lines. Now, with these additional eyes of code that I have just put in, if he's name is null or empty, then we're going to do is ask the user for the name and flip to get named flag to true. Otherwise, we need to greet the user with their user name. And then finally, we need to recall the message received a sink for the next time. So this we have our new dialogue until the last thing we have to do is we go back into our message controller and then change the dialogue to greeting, which is one be just created from dialogue. Let's go ahead and give it a try. I'm going to go ahead and run the baht, and once that's up and running, I'm gonna go ahead and open up the emulator. All right, now that we've connected the but I'm going to just type in Hello and just like we expected , he says, Hello, I'm costume shop. What is? What's your name? So, as we expected, after I tapped in high, the body asked, Hello, I'm costume show What's your name? And then after I typed in a name and said it, remember the names and high Aisha. How can I help you today? Not if I say hi again. Let's see what happens again. I did it. I see it remembered who I waas. Let's try something else. Let's try starting up a new conversation. So if I restart conversation up here and Let's try typing high again. He has noticed that it remembered the name from the last conversation. Now, if it's now, if we had saved our data to conversation data state container, then the data wouldn't have transferred over between conversations. But since we saved it in user data, the data is saved by the user. Now let's try closing the emulator and reconnecting. So if I type in high again now will see that the data was not safe for the last from the last time. That's because the data was saved into memory. Now, if we want the data to persist, we have to use a different type of container. Now, let's see how. Begin set up a more stable container. So in order do that. We need to log in to our as your account. Go ahead, go to portal that measure that calm. And if you guys don't have an account, you guys can create an account for free. We're gonna go and going to create a new resource, and we want to search for a storage account. I'm going to go ahead and click on the storage account. I already have a resource group created But if you don't, you can go out and create a new one. And one thing to keep in mind for azure it you have to specify a credit card because it is a pay as you go service. So we're gonna go ahead and give the storage account name. So after we have that storage created the information that we need for this box are these access keys. We want to grab one of our connections. Connection keys. After we have that copy would go back to our project into our Web config. Go ahead and stop my box first I only to go and create a new section for this called connection string. Now, please keep in mind that the value in the connection string should be the exact same value that you pulled from your as your account story that was just created. Now this is going to do is give or give us access to our as your table storage that's going to our global dot a sax and paste in some new code. So what this court is going to allow us to do is use the table but data store instead of in memory about data store. Thank you guys, for watching this demonstration on Configure your body in Microsoft Visual Studio. I hope you guys got a good overview off what's required in terms of making some generic conversations and greetings. And how do you get that configured in visual studio using the default template that's provided by Microsoft? 20. How MSFT BOTs work: everybody. And welcome to this lesson on understanding how Microsoft bots work. So in this lesson, we'll look at how the Microsoft bought framework works. We'll look at some detailed information in terms of the activity processing stack, the middleware that the use and the structure and the responses in terms of how the Microsoft bought framework candles them. Hopefully, by now we know that about is an act that users interact with in a conversational way and that every interaction between the user and the body generates and activity. Now the Microsoft bought service sense information between the users but connected app such as Facebook's Skype and so on, which is called the Channel and the baht. Each channel, if you guys remember, may include additional information and activities they send. So before quitting bites, it's important to understand how about uses activity objects to communicate with its users , especially in the Microsoft bought framework. Two types of activities are illustrated here. Conversation update and message. The Bark Framework service may send a conversation update when a party joins the conversation. For example, on starting a conversation with the bike framework emulator, you will see to conversation update activities one for the user joined the conversation and one for the baht joint. And when we look at the baht frame of emulator, you guys will see how these two conversations play out. To distinguish these conversations update activities, we have to check whether the members added property includes a member other than the box. The message activity, on the other hand, carries conversation information between the parties. In an echo bought example, the message activities are carrying simple text on the channel. Render this text. Alternatively, the message activity might carry text to be spoken. Suggested actions are cards to be displayed on the example that you guys see the bought created and sent a message activity in response to the inbound message activity it had received. However, A but can respond in other ways to a received message activity. It's not uncommon for a buttress. Respond to a conversation update activity by sending some welcome text in the message activity. And if you guys remember from the Google Dialogue flow, we had several options on how we can customize and configure the welcome intent which relate the welcome message in terms of the http details. Activities arrive at the baht from the BOK Framework Service. Why? Http post request the baht response to the inbound post request with a 200 http status code Nobody sent from the book to the channel are sent on a separate http post to the baht Framework Service. This in turn is acknowledged with the 200 http status code. The protocol doesn't specify the order in which these Post request and their acknowledgements are made. However, to fit with common http service frameworks Typically, these requests are nested. Meaning that out http request is made from the but within the scope off the inbound request . This pattern is illustrated in the diagram that you guys see. Since there are two distinct http connections back to back, the security model must provide for both a turn as it pertains to Microsoft bots. His user describe all the processing associated with arrival often activity. The turned context object provides information about the activities such as the sender and receiver, the channel and other data needed to process the activity. It also allows for the addition off information during the turn across various layers off the body. The turned context is one of the most important abstractions in the Microsoft bought framework has decayed. Not only does it carry the inbound activity toe all the middle or components and and the application now, let's drill a little bit further into the previous dry diagram, with the focus on the arrival off a message activity. So in the example, you guys see the baht replied to the message activity with another message. Activity containing the same text message processing starts with http Post Request with the activity. Information cared has a Jason Payload arriving at the Web server and C sharp. This will typically be an SP dot net project in the JavaScript Node.js project. This is likely to be one of the popular framework, such as express or rest, if I the adapter and integrated component off the SDK, serves as a conductor of the framework. The service uses the activity information to create an activity object and then calls adapters process activity method while passing the activity, object and authentication information are receiving the activity. That adapter creates a turn context object and calls the middle where processing continues to the baht. Logic after middle, where the pipeline completes and the adapter disposes of the turn context object. The bots turn handle, which makes up most of the application logic, takes a turn context as its argument. The turn handler would will typically process the inbound activities content and generate one or more activities in response, sending these out using the turn Contexts sent activity method calling. The send activity method will send an activity to the Users Channel unless processing otherwise gets interrupted. The activity will pass through any registered event handlers before being sent to the channel. No middleware is simply a class that sits between the adapter and you're about logic added to your adapters middleware collection during initialization. The sdk off the Microsoft bought framework allows you to write your own middleware or at reusable components off middle were created by others. Every activity coming into or out of your bought flows through your middleware. The adapter processes and directs incoming activities in through the baht middleware pipeline to your bots logic and then back out again as each activity flows in and out of the baht, each piece of middle work and inspect or act upon the activity both before and after the box logic runs the question comes up a bunch of that implement actions as middleware. Worse is using my normal bought logic. Middleware provides you with additional opportunities to interact with your users. Conversation. Float conversation flow both before and after each turn of the conversation is processed. It also allows you to store and retrieve information concerning a conversation and call additional processing logic when required. So the turn context provides activity response methods to allow code to respond to an activity. The send activity and sent activities, methods and Warner more activities to the conversation. If supported by the channel, the update activity method updates and activity within the conversation and also the delete activity method, if supported by the channel, removes any activity from the conversation now. Each response method runs in an asynchronous process when it's called the activity response method. Clones Theus Associated Event Handler list before started to call the handlers, which means it will contain every handler added up to this point but will not contain anything at it after the process starts. This also means the order off your responses for the independent activity calls is not guaranteed, particularly when one task is more complex than another In addition to the application and middleware logic response handlers awful also refer to as event handlers or a activity event handlers, which you guys might hear throughout. The rest of this course can be added to the context object these handlers are called when the associated response happens on the current context. Object before executing the actual response. These handlers are useful when you know you'll want to do something either before or after the actual event for every activity of that type. For the rest of the current response, the main bought logic is defined, and the echo with counter bought dot CS that you guys see not echo with counter bought class that dries from the I bought interface I bought defines a single method on turn a sink. Your application must implement. This method on Tornay's Inc has turned context that provides information about the incoming activity. The incoming activity corresponds to the inbound http request activities can be of various types, so we first check to see if you're bought has received a message. If it is a message, we get the conversation state from the turn context, increment and turn counter, and then persist a new turn contra value into the conversation state and then send them asses back to the user using send activity a sing call. The outgoing activity corresponds to the outbound http request. Now the Configure services method loads the connected services from the dot bought file, catches any errors that occurred during conversation, turn and logs them, sets up your credential provider and creates a conversation state object to store conversation data in memory. It also creates and registers echo box excess Ear's that are defined in the echo. Bought state successors dot CS file and are passed into the public echo with counter bod constructor using the dependency injection framework and E s p dot net core. The Echo Baht accessories classes created as a singleton in the start of class and passed into the eye. But Dr Class in this class public class echoed counter baht. The but users access er the Persist conversation data. So those are just some technical examples of how the bought structure works with within the Microsoft bought framework, specifically as it pertains to the sample echo baht that is usually provided by Microsoft. So thank you for watching this brief lesson our understanding how Microsoft bots work and a little brief overview about the infrastructure and the workings of Bach communication as a pretence to the Microsoft bought framework. Just keep in mind this is a very detailed subject, and I've just given you a broad over Rio if it 21. MSFT FormFlows: Hi, everybody, and welcome to the lesson on Microsoft form floor. So what we're going to talk about in this lesson is answering your first question in terms of what is foreign float. After that, we're going to talk about some of the many different ways that we are able to customize forms and three most predominant ways being through attributes, business logic and for Miller, dialogues are very powerful and flexible. Handling a guided conversation such as, for example, ordering a sandwich can require a lot of effort. At each point in the conversation, there are many possibilities off what will happen next. For example, you may need to clarify an ambiguity, provide provide help, go back or show progress now by using form floor within the Microsoft body Builder framework yuk Ungrateful e Simplify the process off. Managing a guided conversation formed floor automatically generates the dialogues that are necessary to manage a guided conversation based upon guidelines that you specify. Although using foreign flows sacrifices some off the flexibility that you might otherwise get by creating and managing dialogues on your own, designing a guided conversation using form flow can significantly reduce the time it takes and develop your body. Additionally, you may construct your bought using a combination of form for generating dialogues and other types of dialogues. For example, a Form four dialogue may guide the user through the process of completing a form while a Louis dialogue evaluate user import to determine intent. And we will look at what Louis is a little bit later on in the course. So the best way to describe form form full. It's actually for an example. So on one side you have your user and the other side. You have your body. So it's a type of dialogue you might see if you're ordering food, the bodies asking the user questions and the users answering them almost as though they are filling out of far. Let's get a little bit deeper into firm float. So the whole point of form full framework is that it gives you more options with less effort. I know you don't have to worry about all of those one off cases. You can instead focus your efforts on on to other things that leave the housekeeping and all of the's small work to Microsoft and just give you a little bit of a better idea about what housekeeping items you're getting in that bargain. There are a few things here that Microsoft takes care of out of the box. So, for example, some of the things that Microsoft provides through form flow is clear guidance. It's gives you very robust templates that you can work off so again you don't have to rebuild the wheel. Microsoft has done a lot of the heavy heavy lifting in developing these templates for you, along with intelligent answers. Go between steps and so on. So it's a very robust system that takes care a lot of the nitty gritty, so you can concentrate more on your overall design. But of course not everything will always be achieved with out of the box things. But luckily, Microsoft has given us some great ways to extend our form floor fields. So three most utilized ways are through attributes, business logic and the form builder class. You can think of attributes as things that you can add to your class to help better control how people view your dialogues so it could include things like describing how our field is shown to the user, know the best way to describe business logic is just a compared to getters and centers in DOT Net. You can control how the data is saved and returned to the user before it's the dialogue. You can even set other fields that are related to the current field. Finally, the formula class. This allows the maximum amount of control over your form flows by allowing you to change even the my noticed detail. Let's look at each one of these in a little bit more detail. So what attributes Microsoft has created seven distinct types to help us with building are formed flow as you guys can see them listed on the screen, such as described optional pattern, template, terms and song. So let's look at the prompt attribute first, so this is pretty straightforward. Let's say you're trying to figure out what the arrival date of the customer is. You might put in a prompt off. What is your scheduled arrival date? By doing that, when the baht prompts the user, it will use that exact phrasing. So it's just a nice way to find, too, in the way in which you ask your questions of the describe attributes lets you change how field or value is shown and text. Now a lot of people tend to get this one confused with prompt. The difference is that this one you're describing the property on the model you're linking the customers answer to, for example. So, for example, let's say you have a class that has a property started arm and that you want to fill in with the form full. Well, you don't necessarily want to refer to a start date. You want to use something more meaningful, like arrival date. So this attributes we can change. How these properties are presented to the user of in America would allows you to provide limits on the values accepted in a numerical field. So say, for example, your maximum room occupancy is three people. You want to put a limit on the number of people you allow the user to enter in for that property. This is an easy way to do that. The afternoon attribute is pretty straightforward to basically you're along for a non entry for one off your values. Another way we can customize form flow is through custom logic. So custom logic is basically any cold that allows you to inject logic in before the getter or center for property. This could be anything as trivial as some specific validation before a center or some custom calculations before I get it. This is the method that you should use after you've exhausted all of your attributes. Options is basically air ace in the hole that gives you ultimate control over what comes in and goes out a form for the final way you can customize your forms is through form builders , not the for. Miller is basically a fluent AP I interface that allows for maximum amount of control over exactly higher form shows up. It's also a place where you can insert the attributes and custom business logic that you've just heard about in the previous slides. So thank you for watching. I hope you guys got a good overview of how form floor works and the different attributes that come with informed flow, such as business logic or builder and the custom control dialogue attributes that we looked at 22. MSFT LUIS: Hi, everybody. And welcome to the lesson on Majin language through Lewis. So in this lesson, we're gonna look at describing what is. Louis will look at the framework that comes with Lewis, and then we'll look at and what the user interface for Louis looks like. So what is? Louis Louis actually stands for a language understanding intelligence service, and it's just a service that is designed in the hands your bots understanding off natural language to the technology off interactive machine learning. So what it does is play the role off a translator for your but But instead of translating one language to another, it's translating machine language to human language. Now Louis is a cloud based AP I service. That applies custom ML intelligence to a user's conversational natural language text to predict overall meaning and pull out relevant detail information. A client application for Lewis is any conversational application that communicates with the user in natural language to complete a task. So examples of client applications include social media apps such as Facebook messenger chatbots and speech enabled desktop applications. So Lewis basically takes in our requests who runs them through its natural language processing service which will in turn indicate to the system that for example, Haihe and how old all mean the same thing in the context of this. But so what can we do with it? Using the service, we can use the rest ap eyes to extract usual informations that does he intent entity phrases ek sector from any sentence. We can use it for building intelligent abs that can converse and understand what a sentence is trying to say. So for Louis, every sentence is an utterance based on all its experience. Lewis tries to pry for the intent from the sentence as in What is a speaker trying to say or do? In addition, it tries to best guest entity from the sentence as to what the intent is trying to refer to . So the example you guys see turned lights on for the kitchen. The utterance is Can you please turn the lights on? The intent, obviously, is to turn the light on, and the entity is the kitchen. The utterance is basically a plain English sentence. The intent is something the speaker is trying to do. An entity is what the speaker is referring Teoh so basically utterances put everything together. They're the sentences of the Louis world. They use both intense and entities to form ideas that Lewis can draw from to make conclusions and intense on the other hands. You can think of them as verbs of the Louis world, meaning that they are identified as any action that you want your body to take. One thing to keep in mind. As more and more of these situations are clarified and trained, Lewis actor gets better and smarter about being able to make the right best guess for your box. So it is an intelligence service that learns over time based on the actions and phrases that you've inputted into the system entities. If you guys have gone through the dialogue flow modules because remember, it's basically the same thing as in Google they you can refer to them as announce they identified as things that your body is taking action on. So the introduce represents a word or phrase inside the utterance that you want extracted and an utterance can include many entities or not at all. So again, entities can be places, things, people, events or even concepts. They describe information relevant to the intent, and sometimes they're essential for your app to perform this task. For example, in a travel booking app, the location, date, airline travel class and tickets are basically key information in order for the body to book a flight. No entities in the Microsoft bought framework are optional, but as you might have guessed, they're highly recommended. So while intense are required, entities are optional. You don't necessarily need to create entities for your but to be operational if the word choice or ward arrangement is the same, but doesn't mean the same thing who do not label it with the entity. For example, you guys conceive to utterances on the bottom and both of them. The World fair is a home. A graph. It spell the same but has totally different meaning. Now, if you wanted to have an event entity to find all event data label, the word fare in the first utterance, but not in the second of the Microsoft bought framework comes with a number off pre defined built in entities. And again, if you guys remember from the dialogue flow framework, it also came with built in entities. So the list that you guys see, just identify some off the entities that are pre built within the broad framework. So thank you guys for watching this lesson on Lewis. And when I walk you through the Louis interface online, you guys will get a better understanding off what it looks and feels like and how we can configure it properly.