Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Comments

[qnamaker] Export as well as replace support for .qna format#695

Merged
munozemilio merged 2 commits intomasterfrom
vishwac/673
Mar 31, 2020
Merged

[qnamaker] Export as well as replace support for .qna format#695
munozemilio merged 2 commits intomasterfrom
vishwac/673

Conversation

@vishwacsena
Copy link
Contributor

Fixes #670 and #673

@vishwacsena vishwacsena changed the title Export as well as replace support for .qna format [qnamaker] Export as well as replace support for .qna format Mar 31, 2020
@vishwacsena
Copy link
Contributor Author

@feich-ms can you look at this PR in the context of qnamaker:build and comment if we can switch to use .qnaformat for both replace as well as export needs? I have not played with qnamaker:build yet but will do so after this is reviewed and merged in and you have been able to get multi-turn supported in qnamaker:build. Also I hope we do not do create w/ KB in qnamaker:build. It always has to be a create command followed by replace for qnamaker:build since the create command does not support .qna format.

Copy link
Contributor

@munozemilio munozemilio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CIL

@munozemilio munozemilio merged commit 2d25957 into master Mar 31, 2020
@munozemilio munozemilio deleted the vishwac/673 branch March 31, 2020 23:14
@feich-ms
Copy link
Contributor

feich-ms commented Apr 1, 2020

Will have a try

Copy link

@vipeketi vipeketi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed

@feich-ms
Copy link
Contributor

feich-ms commented Apr 1, 2020

@vishwacsena, I am OOF this Wednesday and Thursday, so I haven't got a chance to try it. But from tests, it seems to work well. One question is if I export with qna format, will it reconstruct the url and file references to qna files? If not, we can not compare the qna format contents to decide whether updating knowledge base just like we do in luis build. I will give updates soon when I'm back to work.

@vishwacsena
Copy link
Contributor Author

@feich-ms export will not reconstruct url and file references. The way to do it would be to complete cross-train etc on our side, put together the single qna KB (per locale) and compare it against the exported qna document. We might need to do some work on the comparison end to sort on questions and answers like we did for luis but other than that, that's how we should compare.

@feich-ms
Copy link
Contributor

feich-ms commented Apr 2, 2020

@vishwacsena, I just tried to create an empty kb and then replace it with the multiturn qna content. It works now. But if I added a file or url referernce in the qna content, the referenced qna pairs are not included in published kb. So is it reasonable or valid if file or url references exist in multiturn qna file. What to do if file or url references are in multiturn qna content?

My proposal is

  1. qna without multiturn, use create api to create kb with json format
  2. qna with multiturn and without references, use replace api to replace an empty kb with lu format
  3. qna with multiturn and references, use replace api to import lu format qna pairs like step 2, and then use update api to add the references

How do you think?

@vishwacsena
Copy link
Contributor Author

@feich-ms I believe we should only support URI reference. @vipeketi can you comment on how we should handle files?
As for your proposal, immaterial of the KB content, why not just always do create followed by replace or just replace if KB already exists?

@feich-ms
Copy link
Contributor

feich-ms commented Apr 2, 2020

@vishwacsena, I double tried and confirmed that URI or file reference are not supported under qna format. If they are not planned to support, I think we can always do step 3 to keep consistency for all lu files. If they are already suppoerted, we can drop the update api call for reference in step 3. Please help to confirm. Thanks.

@vipeketi
Copy link

vipeketi commented Apr 3, 2020

@feich-ms I find your approach of combining replace and update api as best approach for taking care of URI or file refernce updates.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

qnamaker:kb:export command not exporting multi turn prompts

4 participants