0

When updating the knowledge base for the QnA Maker, I've noticed that if multiple users happen to try adding a new QnA pair within a few seconds of each other, the second one will overwrite the first. I'm guessing this is due to each process running asynchronously, where each will try to use the next available ID but will end up selecting the same one which will end up with the first one being just updated to the second instead of creating a new pair.

Is there any way to get around this through the API? I've tested with trying to include different IDs in the request but it seems to ignore that field. Maybe a way to query the knowledge base to see if it is currently running an "Add" operation and waiting until that is complete?

Thanks

1 Answers1

0

my experience with QnA Maker seems to put QnA Pairs into a 'queue'. Adding different IDs using the Update method as described here should not overwrite QnA Pairs but append it to the next ID in the knowledgebase. You will need to run the publish knowledgebase api call to finalize the changes https://westus.dev.cognitive.microsoft.com/docs/services/5a93fcf85b4ccd136866eb37/operations/5ac266295b4ccd1554da7600

If you could, please send through screenshots or the context in which you are applying the Add operation, it would help me to understand it better.

Hope this helps!

Yanzal
  • 113
  • 1
  • 8
  • I assumed it would be a queue too but it doesn't seem to be the case. If you go directly into the qnamaker.ai interface and open it up in two separate windows, and then add a qna pair into each and click on "Save and Train" within a few seconds of each other and refresh the page, only the one that you clicked second will be retained. I tried this to simulate what would happen if two different users add questions within a short time span which might not happen often in practice, but if it does it could cause a lot of confusion. – Brandon Hum Dec 05 '18 at 20:11