Azure AI QnA Chatbot sometimes sends double messages?

19 Views Asked by At

Our site is using a QnA Azure chatbot. For some reason, when the user asks a question, the bot responds with two messages - one that contains a small part of the answer in the knowledge base and one that contains the full answer. This happens with the same responses consistently, about half of them have this bug, the other half don't. There doesn't appear to be a pattern to which answers are affected and which aren't. Example below:

Example of the bug in question

Any help would be greatly appreciated.

I've looked through my knowledge base to see if the bugged questions have anything in common (i.e contains links, text formatting, character count, etc.) and have found no patterns that can help. There's nothing about this in the documentation either.

1

There are 1 best solutions below

0
Mohamed Azarudeen Z On

i tried reproducing the same find the below code and give it a try it worked fiinr for me, import this and give it a try

{
  "entityResolver": {
    "searchConfiguration": {
      "maxEdits": 0
    },
    "type": "internal",
    "isGenerated": true
  },
  "minIntentConfidence": 0.4,
  "highIntentConfidence": 0.8,
  "lgTemplates": [
    "# FallbackResponse",
    "- Add your fallback message here",
    "# TestCommand-MyNumber",
    "- what number?",
    "# TestCommand-27dfe650040311ebb2dccf4459b3ff8b",
    "- confirmed.",
    "# TestCommand-3228f4d0040311ebb2dccf4459b3ff8b",
    "- denied.",
    "# TestCommand-4ea19f40040311ebb2dccf4459b3ff8b",
    "- sure?"
  ],
  "type": "BaseLanguage",
  "recognizer": {
    "application": "",
    "isStaging": false,
    "versionId": "0.1",
    "type": "luis"
  },
  "speechOutput": {
    "font": "Microsoft Server Speech Text to Speech Voice (en-US, Aria24kRUS)",
    "locale": "en-US"
  },
  "webEndpoints": [],
  "globalParameters": [],
  "commands": [
    {
      "name": "FallbackCommand",
      "completionStrategy": "OnRequiredParameters",
      "parameters": [],
      "rules": [],
      "completionRules": [
        {
          "name": "DefaultResponse",
          "conditions": [
            {
              "type": "True"
            }
          ],
          "actions": [
            {
              "type": "SpeechResponse",
              "response": {
                "type": "Template",
                "templateName": "# FallbackResponse"
              }
            }
          ],
          "postExecutionState": "None"
        }
      ],
      "triggeringExamples": [
        "> - You can start sentences with '>' to add comments.",
        "> - You can also use parameters by adding the name of the parameter within curly braces, i.e.",
        ">     Set an alarm to {YourDateParameterName}",
        ">   Where YourDateParameterName is the name of a parameter defined in the 'Parameters' section.",
        "Help",
        "Help me",
        "What can you do?",
        "How can I start?",
        "Hello",
        "Hi"
      ],
      "multiTurnExamples": []
    },
    {
      "name": "TestCommand",
      "completionStrategy": "OnRequiredParameters",
      "parameters": [
        {
          "name": "MyNumber",
          "type": {
            "name": "Number"
          },
          "elicitResponse": {
            "type": "Template",
            "templateName": "# TestCommand-MyNumber"
          }
        }
      ],
      "rules": [
        {
          "name": "Confirm command",
          "conditions": [
            {
              "type": "AllRequiredParameters"
            }
          ],
          "actions": [
            {
              "type": "SpeechResponse",
              "response": {
                "type": "Template",
                "templateName": "# TestCommand-4ea19f40040311ebb2dccf4459b3ff8b"
              }
            }
          ],
          "nextTurnExpectations": [
            {
              "type": "Confirmation"
            }
          ],
          "postExecutionState": "WaitForInput"
        },
        {
          "name": "Confirmation succeeded",
          "conditions": [
            {
              "type": "SuccessfulConfirmation"
            }
          ],
          "actions": [
            {
              "type": "SpeechResponse",
              "response": {
                "type": "Template",
                "templateName": "# TestCommand-27dfe650040311ebb2dccf4459b3ff8b"
              }
            }
          ],
          "nextTurnExpectations": [],
          "postExecutionState": "ReadyForCompletion"
        },
        {
          "name": "Confirmation denied",
          "conditions": [
            {
              "type": "DeniedConfirmation"
            }
          ],
          "actions": [
            {
              "type": "SpeechResponse",
              "response": {
                "type": "Template",
                "templateName": "# TestCommand-3228f4d0040311ebb2dccf4459b3ff8b"
              }
            }
          ],
          "nextTurnExpectations": [],
          "postExecutionState": "CompleteCommand"
        }
      ],
      "completionRules": [
        {
          "name": "Done",
          "conditions": [
            {
              "type": "True"
            }
          ],
          "actions": [],
          "nextTurnExpectations": [],
          "postExecutionState": "CompleteCommand"
        }
      ],
      "triggeringExamples": [
        "number {MyNumber}",
        "my number is {MyNumber}"
      ]
    }
  ]
}

https://github.com/microsoft/botframework-sdk/issues/4112