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

Latest commit

 

History

History
44 lines (30 loc) · 1.87 KB

working-with-qna.md

File metadata and controls

44 lines (30 loc) · 1.87 KB

Creating QnA Maker JSON model file

Once you have created individual .qna files you can parse them all to a QnA Maker JSON model using this command:

> bf qnamaker:convert --in <folder with .qna files> [--out <outputfolder> --name <QnAKBName>]

This will parse all .qna files found and will create ONE QnA Maker JSON model.

If you would like to create multiple QnA Maker KB's, then you can add a root.lu file that holds reference to other relevant .qna files and parse it like this:

> bf qnamaker:convert --in <root_file.qna> [-o <outputFolder> -n <QnAKBName> --log]

This will parse all .qna files referenced in the root_file.qna and output ONE QnA Maker JSON model.

Creating word alterations/ synonyms list

You can use bf qnamaker:convert to parse and compile all word alterations/ synonyms list that can then be used to replace your existing QnA Maker alterations list.

See here for defining word alterations/ synonyms list in .qna files.

> bf qnamaker:convert --alterations --in <root_file.qna> [-o <outputFolder> -n <QnAKBName> --log]

Creating a new QnAMaker KB

> bf qnamaker:create:kb --in _qnaKB.json --subscriptionKey <key> --hostname <url> --endpointKey <key>

Replacing QnA Maker word alterations/ synonyms list

> qnamaker:replace:alterations --in _Alterations.json --subscriptionKey <key> --hostname <url> --endpointKey <key>

Converting QnA maker content to .qna format

> bf qnamaker:kb:export --kbId --subscriptionKey <key> --environment <test/prod> > qna_export.json
> bf qnamaker:convert --qna_export.json