0
votes

I was following code sample about QnA Maker multiturn feature. If I want to use that I have to fill QnAMakerOptions.context in request for Generate Answer API. Its type is QnARequestContext and this interface specifies 2 fields: previousQnAId and previousUserQuery.

In that code sample only previousQnAId is filled which makes sense for me because for context only follow up questions QnA Maker needs to know what was the previous question. But what is purpose of previousUserQuery and why should I use that?

I was trying to understand it from API documentation but I was unable to do so.

1

1 Answers

0
votes

I haven't been able to find any documentation to back this up, but my best guess for purpose of the previousUserQuery is to provide a sane, human-readable alternative to the previousQnAId property for debugging. This provides context around how an answer was arrived at.

There is an example response from the QnA Maker API that includes the previousQnA* properties available here:

{
  "question": "Use Windows Hello to sign in",
  "top": 10,
  "userId": "Default",
  "isTest": false,
  "qnaId": 17,
  "context": {
    "previousQnAId": 15,
    "previousUserQuery": "accounts and signing in"
  }
}