Microsoft QnA Maker: Extend Virtual Agents with a Knowledgebase

The Microsoft QnA Maker Extension helps to answer frequently asked questions in a Cognigy.AI virtual agent. Therefore, an already created Knowledgebase can be used as a backup if the virtual agent did not find an intent. This tutorial will explain how to integrate an organization's QnA Maker instance to a Cognigy.AI virtual agent and generate answers.

Table of Contents

  1. Install the Microsoft QnA Maker Extension
  2. Create a QnA Maker Connection
  3. Generate an answer

Install the Microsoft QnA Maker Extension

The first step is to install the required integration. In this case, a so-called Extension is installed to Cognigy.AI. Thus, navigate to the Extensions Marketplace inside of the Virtual Agent and add the Microsoft QnA Maker Extension by clicking on the Install button. Now follow this installation guide and upload the Extension to Cognigy, where it will be displayed as the following:


Congrats! The installation of the Extension is finished!

Create a QnA Maker Connection

In this step, a so-called Connection will be created. If one, in Cognigy.AI, clicks on the previously uploaded Extension, the following details can be observed:


The red-marked part in the above figure shows, that there is one Connection required. Therefore, it needs to be created and filled with the QnA Maker instance information. In order to do so, one initial Flow Node needs to be added to a Flow:

  1. Create a new Flow in Cognigy.AI
  2. Inside of the Flow Chart, click on + and navigate to the Microsoft QnA Maker Extension:


  3. Add the Generate Answer Flow Node by clicking on it:


  4. In order to edit the Flow Node and create the Connection, please click on it. An Edit Node menu will be opened on the right side of the screen:


  5. Right next to the Connection field (the first one at the top), one needs to click on the + button. The Connection menu will be opened at the center of the screen:

  6.  The required values can be copied from the Settings page of the referenced QnA Maker Knowledgebase:
    1. Login to
    2. Select the Knowledgebase that should be connected
    3. On the top right, click on Settings
    4. Scroll down to the Deployment details

  7. Insert the related Microsoft QnA Maker credentials/information of the organization to the fields. 
    1. runtimeEndpoint
      1. The URL of the hosted QnA Maker instance.
    2. resourceKey
      1. The authentication key is provided after the "EndpointKey" name in the Authorization information.
    3. knowledgebaseId
      1. The actual identifier (ID) of the used Knowledgebase in QnA Maker.
  8. Click on the Create button

Generate an answer

Finally, a virtual agent could generate a fitting answer to a user's question if no intent was found in Cognigy.AI. A possible Flow Chart could look such as the following:


This straightforward configuration instantly extends the available list of possible FAQ answers in the chat/voice conversation. In this case, the Generate Answer Flow Node exposes two different so-called Child Nodes, helping the designer developing a valid logic.

On Found Answer

If a fitting answer was found in the QnA Maker Knowledgebase, the On Found path is executed -- the dynamic answer can be sent to the user in a Say Node


while the used CognigyScript is:


 The entire result JSON data information is stored in the Input or Context object:

    "answers": [
            "questions": [
                "Who is Cognigy?"
            "answer""Cognigy is an enterprise software provider for Conversational AI automation. Our platform, Cognigy.AI, automates customer and employee communications. Available in on-premises and SaaS environments, Cognigy.AI enables enterprises to have natural language conversations with their users on any channel – webchat, SMS, voice and mobile apps – and in any language.",
            "metadata": [],
            "context": {
                "prompts": []
        "...": "..."


On Not Found Answer

However, if even the QnA Maker database did not find a fitting answer, the On Not Found path is executed which could lead to a live chat handover event. Again, the Extension's result JSON data is stored in the Input or Context object -- based on the configuration:

    "answers": [
        "questions": [],
        "answer""No good match found in KB.",
        "metadata": []





Article is closed for comments.

Was this article helpful?
0 out of 0 found this helpful