Skip to content

CSA-OCP-GER/chatbot-development-hands-on-day

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chatbot Development Hands-On Day

Welcome to the Chatbot Development Hands-On Day! Today, we'll go through how to build a simple "Time-Off Bot" using Azure Bot Service. The day is organized by different challenges and participants should complete Step 1 through 4. Step 5 contains additional ideas that can be implemented if desired. The steps are structured the following way:

  • Step 1: Setup a basic bot
  • Step 2: Implement the dialog flow
  • Step 3: Add natural language understanding
  • Step 4: Implement business logic
  • Step 5: Further ideas

Our final bot might look something like this:

Our final bot

A good source for code examples is the official Bot Builder Samples Repository with its C# and Node.js examples.

Challenges

Step 1 - Setup a basic bot

Goal for Step 1

As a first step, we need to lay out the foundation for our bot. This means getting a basic bot running, enable basic CI (Continuous Integration) via git. In order to move to the next step, you should be able to check off the following items:

  • You have a Bot running on App Service (based on the Basic template in the Azure Portal)
  • You should be able to deploy code change to your bot via local Git deployment
  • You should be able to test your bot locally before pushing to Azure
  • Your bot should persist its state in an Azure Table
  • Users should be able to talk to your Bot via Microsoft Teams (or other channels)

Here are some resources that might help you reaching your goal quicker:

Step 2 - Implement dialog flow

Goal for Step 2

In the second step, we'll lay out the basic dialog flow of our bot. In order to move to the next step, you should be able to check off the following items:

  • Have a root dialog
  • Have an empty request time-off dialog
  • Have an empty show time-off dialog
  • Have an empty help dialog
  • Be able to navigate through dialogs via static phrases ("show time-off", "request time-off")

Here are some resources that might help you reaching your goal quicker:

Step 3 - Add natural language understanding

Goal for Step 3

In this step, we'll make our bot understand natural language. For this, we'll leverage LUIS (Azure's Language Understanding Service). This means you have to create a custom language model and connect it to your bot. In order to move to the next step, you should be able to check off the following items:

  • Have a LUIS model trained and published, that will be used to recognize the user's intent (request time-off or show existing time-off)
  • Have your LUIS model integrated in your Bot
  • Use the integrated LUIS model for routing between the dialogs

Here are some resources that might help you reaching your goal quicker:

Step 4 - Implement business logic

Lastly, we want to implement some (basic) business logic in our bot. In a real world example, our bot might integrate with existing systems for processing time-off requests. In our example here, we can use a storage destination of our choice. You can even use userData for persisting time-off requests, but be aware that userData is channel specific. In order to complete the main part of our day, you should be able to check off the following items:

  • Your "request time-off" dialog should request time-off parameters like start date, end date, and vacation destination
  • Your "show time-off" dialog should show existing time-off requests using Adaptive Cards
  • Your help dialog should show something useful
  • Your bot should proactively welcome the user

Here are some resources that might help you reaching your goal quicker:

Step 5 (optional) - Further ideas

Now that we have a basic bot running, we can start embedding more functionality. Here are some ideas for learning more:

  • Use Visual Studio Team Services (VSTS) as your CI/CD pipeline
  • Implement data persistency with Azure Table or Azure CosmosDB
  • Leverage Cognitive Services to show images of the user's vacation destination in the "show time-off" dialog

Authors

Most of this work has been done by @clemenssiebler and @erjosito. If you have questions or ideas on how to make this repo better, please reach out to us!

License

Licensed using the MIT License (MIT) - Copyright (c) Microsoft Corporation. For more information, please see LICENSE.

About

Instruction repository for Microsoft's Chatbot Hands-On Day workshop

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published