Bot Framework v4 QnA Maker with AppInsights sample
This sample shows how to create a bot that uses QnA Maker with Application Insights to get telemetry around bot and QnA Maker performance. This bot example uses applicationinsights
.
This bot has been created using Microsoft Bot Framework.
This samples shows how to:
- Use QnAMaker to implement core AI capabilities
- How to use Middleware to log messages to Application Insights
- How to log QnAMaker results to Application Insights
- View metrics using a PowerBI report, Azure Monitor queries or Visual Studio
This samples requires prerequisites in order to run.
- Install modules
npm install
- Setup LUIS
Assuming prerequisites have been installed:
# log into Azure az login
# set you Azure subscription az account set --subscription "<azure-subscription>"
# Create LUIS service application msbot clone services --name "<your-bot-name>" --location <azure region like eastus, westus, westus2 etc.> --folder "deploymentScripts/msbotClone" --verbose
- Start the bot
npm start
Microsoft Bot Framework Emulator is a desktop application that allows bot developers to test and debug their bots on localhost or running remotely through a tunnel.
- Install the Bot Framework Emulator version 4.1.0 or greater from here.
- Launch Bot Framework Emulator
- File -> Open Bot Configuration and navigate to
BotBuilder-Samples/samples/javascript_nodejs/20.qna-with-appinsights
- Select
<your-bot-name>.bot
file
QnA Maker enables you to power a question and answer service from your semi-structured content.
One of the basic requirements in writing your own Bot service is to seed it with questions and answers. In many cases, the questions and answers already exist in content like FAQ URLs/documents, product manuals, etc. With QnA Maker, users can query your application in a natural, conversational manner. QnA Maker uses machine learning to extract relevant question-answer pairs from your content. It also uses powerful matching and ranking algorithms to provide the best possible match between the user query and the questions.
After creating the bot and testing it locally, you can deploy it to Azure to make it accessible from anywhere. To learn how, see Deploy your bot to Azure for a complete set of deployment instructions.
- Learn how to use PowerBI, use Azure Monitor queries and Visual Studio to view Application Insights data.