FAQ Knowledge Base with Azure Bot Service and Integration with Microsoft teams
Tags: chatbot, azure, qnamaker
Published: 2019-10-01 01:56:10

---
title: FAQ Knowledge Base with Azure Bot Service and Integration with Microsoft teams
published: true
description: We will learn how to use QnAMaker along with Azure.
tags: ChatBot, azure, QnAMaker
cover_image: https://miro.medium.com/max/4000/1*m9IJdAYW04MYh75ivpwUNA.png
---

Before jumping into configuration let us understand the core concept first. For successful integration we will need to understand few features and its usage. 

**What is cognitive services?**

Cognitive Services provides the best suite for having an interactive, automated model of an application. It helps to build powerful intelligence into applications to enable natural and contextual interactions.

Microsoft Cognitive Services provide us the ability to build apps with powerful algorithms using just a few lines of code. It works across devices and platforms, and with continuous enhancement, it's easy to set up.

Cognitive Services (preview) comes with a series of APIs, which can be used to enable natural and contextual interaction within your applications. Cognitive Services offers Language, Speech, Vision, Search, and Knowledge APIs.

**Why ChatBots?**

It works 24/7 and never calls sick. More and more businesses and marketers are adopting **chatbots** to enhance productivity and collaboration which can improve the efforts of a whole team. [Read here](https://chatbotslife.com/chatbots-and-your-marketing-strategy-a6fc6464626c) for more info

**What is QnA Maker?**

**QnA Maker** is a cloud-based API service that creates a conversational, question and answer layer over your data. **QnA Maker** enables you to create a knowledge-base(KB) from your semi-structured content such as Frequently Asked Question (FAQ) URLs, product manuals, support documents and custom questions and answers.

**What is Azure Bot Service?**

**Azure Bot Service** is **Microsoft's** artificial intelligence (AI) chatbot offered as a **service** on the **Azure** cloud **service** marketplace. **Azure Bot Service** offers the ability to add intelligent agents that are capable of conversation without having to commit the resources to develop one's own AI.

Now with above knowledge lets jump on setting up our QnAMaker.

Step 1: Login into https://www.qnamaker.ai and click on Create a knowledge base.

Step 2: **Create a QnA service in Microsoft Azure.** When you click on it you will be redirected to Azure. Here we to sign up first in case if your account doesn't exist. Post successful sign up now we will need to create our Azure QnA service for our KB(KnowledgeBase). (In our example we will use QnAMakerChatBot  as name going forward instead of QnAMakerChatBot1)

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/x6o43edk8o5lfzlxfbvb.png)

Step 3: **Connect your QnA service to your KB.** After performing above step you can click on refresh button and you will notice Azure QnA Service is populated with above details.

Step 4: **Name your KB.** The knowledge base name is for your reference and you can change it at anytime.

Step 5: **Populate your KB.** you can skip this for now. We will cover this in step 7.

Step 6: **Create your KB**. Click on create your KB.

Step 7: Once our KB is created its time to power our KB with some data. There are multiple ways to add data to your KB such as URL, document, Excel, TXT. You can feed the data here to your KB. Once data is loaded you can click on **Save and train**.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/3tdpr55c7krd6je3cwsb.png)

Step 8: Once your KB is trained its time to publish the data to Azure. You can publish data by clicking Publish button. Post successful publish you can view the Postman and Curl details and now you can invoke your KB using Postman.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/mo4nyzf207kjfhmikwfw.png)

Step 9: Click on Create Bot and you will be redirected to Web App Bot screen with most of the details automatically pre-populated.  

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/8kv984fgbn22x6pu1cwy.png)

Note: It is advisable to Create Microsoft App ID. 

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/wc42rrfemrfva8boun1d.png)

Step 10: Now since we have created our web app we can go ahead and test it. Go to All Resources and select your Web App bot. You will be presented with many options. We need to choose test in Web Chat and we can test our Bot here.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/hv8o254c59lpnierb9fg.png)

Step 11: Now its time to integrate our Bot with other services like Microsoft Teams, skype, slack etc. In this example we will integrate our Bot with Microsoft teams. 

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/xzdswe203ajme1qdclc6.png)

Step 12: After selecting Microsoft Teams you will see 3 options: Messaging, Calling and Publish. Here we will use Messaging and click on save. 

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/3liue8i0z1bb2felc6e3.png)

Now you can go back to channels and select Microsoft teams and it will open it in your system with integrated Bot. You can chat with your Bot now.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/yxa2umxi9tfs8sdclmus.png)

Reference:

[A-look-at-cognitive-services](https://dzone.com/articles/a-look-at-cognitive-services)

[Azure-Bot-Service](https://whatis.techtarget.com/definition/Azure-Bot-Service)

[QnAMaker](https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/overview/overview)

[Microsoft Azure Cognitive Services: QnA Maker by Jesse Dietrichson](https://app.pluralsight.com/library/courses/microsoft-azure-cognitive-services-qna-maker/table-of-contents)