Microsoft Bot Framework Steven Hook
Steven Hook @StevenHook steven@hookscode.com http://hookscode.com @StevenHook steven@hookscode.com Organizer of the Pittsburgh .NET User Group Join our group at https://www.meetup.com/pghdotnet/
The Bot Framework Flow Start at a client like Skype, Slack or Cortana The bot sends message to your Azure Bot Service The message is translated into a Bot Framework SDK readable message Your App Service or Serverless Function interprets that message
From FAQ to Bot in minutes. QnA Maker Build, train and publish a simple question and answer bot based on FAQ URLs, structured documents or editorial content in minutes. https://qnamaker.ai
What are we building today? Get a bot up and running Primitive interpretation of messages Form Flow to have a pointed conversation Be conversational with LUIS
Get a bot up and running Install the Bot Application template Install the Bot Emulator Get a bot running in the emulator
Primitive interpretation of messages Let’s just see if we can direct the flow of the discussion by looking for words. if (activity.Text.ToLower().Contains("hungry")) {} Then, let’s organize it a bit into its own file. await context.Forward( new HungryDialog(), RecommendationReceived, activity);
Form Flow to have a pointed conversation If you know what you’re looking for from the user, just ask them! return new FormBuilder<Feedback>() .Message("Tell me about your lunch.") .Field(nameof(Location)) .Field(nameof(FoodRating)) .Field(nameof(ServiceRating)) .Field(nameof(Comments)) .Build(); This is great, but has a definite feel.
Be conversational with LUIS Intents identify when your users want to perform these different tasks BuyPlaneTicket RentHotelRoom MakeRecomendation Entities the “things” your user is talking about I want to buy a ticket to {destination_city}. Do you have any {room_type} rooms in {destination_city}? What {cuisine} place can {person} and {person} agree on going to for lunch?
Be conversational with LUIS Let’s train LUIS to tell us what the user is asking for [LuisIntent("GetRecommendation")] public async Task GetRecommendationIntent( IDialogContext context, LuisResult result) { // Get stuff done! }