Posts

Showing posts with the label c#

Fastest way to create a Question/Answer bot using QnA Maker & Microsoft Bot Framework

Image
Microsoft has provided an easy to use QnA Maker service which gives ability to build, train and publish a simple question and answer bot based on FAQ URLs, structured documents or editorial content in minutes. Just register on below url. https://qnamaker.ai/ Once registered it gives option to create new service. After creating the new service, it gives option to input a FAQ page url or upload FAQ files (formats - .tsv, .pdf, .doc, .docx, .xlsx) or start with blank data & enter your own questions and answers. For the article I choose FAQ url, once the url is entered, service scans the content from the page & creates the Knowledge Base. The knowledge base can be trained & saved and can be published to be used in the bot or any other application. Service also provide a very handy interface to Test the request response. Just use the "Test" option on the left hand side. Now as our QnA service is published, we can go to Azure portal & cre...

How to build a simple conversation bot with Microsoft Bot Framework

Image
Lets build a simple conversation bot who will decode our emotions & will try to cheer us. Basic Idea is to get, how the user is feeling now, then pass the feelings to Cognitive services & get the sentiment score. If the sentiment score is high or neutral then pop a joke to the user. If the sentiment score is low, try to show a motivational message. Hope everyone has the environment setup for the bot app, else just check my earlier blog post First we need to create a new bot project. Choose Bot Application Give it a name & lets start exploring. The project will create a controller - MessagesController.cs which is the starting point for our bot. Controller consists of a task Post which handles the messages received by the bot. It should look like below. I am just trying to pass the flow to a RootDialog which is bot framework dialog. The RootDialog looks like this RootDialog welcomes the user & asks about how he/she is feeling now. Those fee...