Skip to content

rjayapra/ai-language-and-botservices-hackathon

Repository files navigation

Azure AI Language Service with Bot Framework

Welcome to Azure AI Language Services with Bots workshop.

In this OpenHack, you’ll go through tasks that will help you master using Language services (CQA, CLU and Orchestration workflow ) and also build bots to connect to these services. This exercice can be done alone or in group and will take 4 hours. If you find any issue or have any remark, please do open a issue in the repository.

Language Services

Azure AI Language is a cloud-based service that provides Natural Language Processing (NLP) features for understanding and analyzing text. Use this service to help build intelligent applications using the web-based Language Studio, REST APIs, and client libraries.

Available Features

  • Named Entity Recognition
  • Personally identifying (PII) and health (PHI) information detection
  • Language detection
  • Sentiment Analysis and opinion mining
  • Summarization
  • Key phrase extraction
  • Entity linking
  • Text analytics for health
  • Custom text classification
  • Custom Named Entity Recognition (Custom NER)
  • Conversational language understanding
  • Orchestration workflow
  • Question answering
  • Custom text analytics for health

Migrate from Text Analytics, QnA Maker, or Language Understanding (LUIS)

Azure AI Language unifies three individual language services in Azure AI services - Text Analytics, QnA Maker, and Language Understanding (LUIS). If you have been using these three services, you can easily migrate to the new Azure AI Language. For instructions see Migrate to Azure AI Language.

Create a Bot with the Bot Framework SDK

Bots are software agents that can participate in conversational dialogs with human users. The Microsoft Bot Framework provides a comprehensive platform for building bots that can be delivered as cloud services through the Azure Bot Service.

Pre Requisites

Tools

  1. an Azure subscription (and at least a dedicated resource group).
  2. if you plan to run command from your computer: install Az cli or Azure Powershell
  3. setup BotFramework Emulator
  4. setup Git
  5. setup VS Code

Clone Repository

To install Git, follow these steps:

  1. Visit the official Git website at https://git-scm.com/downloads.
  2. Choose the appropriate installer for your operating system (Windows, macOS, or Linux).
  3. Run the installer and follow the on-screen instructions. Note: If you are using Visual Studio Code, Git is often bundled with the editor, so you may not need to install it separately.

Open the palette (SHIFT+CTRL+P) and run a Git: Clone command to clone the repository https://github.com/rjayapra/ai-services-hackathon to a local folder When the repository has been cloned, open the folder in Visual Studio code. Wait while additional files are installed to support the C# code projects in the repo.

Note: If you are prompted to add required assets to build and debug, select Not Now.

Create Language Resource:

  1. Login to Azure Portal
  2. Navigate to https://portal.azure.com/#create/Microsoft.CognitiveServicesTextAnalytics
  3. Select custom features "Customer Question Answering"
  4. Select appropriate subscription, resource group (create one if not exists), region, provide a name and pricing tier
  5. For CQA select Azure search region set as "East US" and pricing tier as "Basic"
  6. Read Responsible AI Note and click "Review + create".

Use Language Studio to try out the features without any code : Language Studio

Lab Exercises:

Module Description
👇 Module 1 CQA
Create a Custom Question Answering project and build a bot to use the service. We will also deploy the bot to Azure. BotWithCQA
👇 Module 2 CLU
Create a Custom Language Understanding project and build a bot to use the service. We will also deploy the bot to Azure.CoreBotWithCLU
👇 Module 3 Orchestration workflow
Create a Orchestration workflow project and use the CQA and CLU projects to train the model and create a deployment. Build a bot to use the service. We will also deploy the bot to Azure. OrchestrationWorkflowBot
👇 Module 4 Custom Storage bot
Understand the different storage options - Memory, Blob storage and CosmosDB storage.custom-storage-bot
👇 Module 5 State management bot
Store the user and conversation state in Memory or custom storage. State store can be used to understand the user interactions state-management-bot
👇 Module 6 Bot Monitoring
Add telemetry to bot solution, use metrics and logs to understand the status of bots and troubleshoot BotMonitoring
👇 Module 7 Debugging
Understand different options/techniques to debug a bot. Use this example to invoke inspection middleware to debug the bot. inspection-bot
👇 Module 8 Unit Testing
Add unit tests to bot. Refer this sample core bot example to add test cases and validate the bot BotTests
👇 Module 9 Middleware
Bots can use the inbuilt middleware like logging, telemetry , translation etc., before or after every turns. Also can use custom middleware created as well. In this example we will try to use a translation service and invoke the translation middleware on configured languages. Middleware Bot

Training materials

All the slides used for the workshop are available here

About

Hands-on lab projects with language services and Bot

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages