Skip to content

Commit 17f21e5

Browse files
authored
Merge pull request #105135 from diberry/diberry/0221-qna-howto-rewrite
[Cogsvcs] QnA Maker - How-to rewrite
2 parents 5cd9ffc + 7bc1493 commit 17f21e5

13 files changed

+346
-316
lines changed

.openpublishing.redirection.json

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -801,34 +801,44 @@
801801
"redirect_url": "/azure/machine-learning",
802802
"redirect_document_id": false
803803
},
804+
{
805+
"source_path": "articles/cognitive-services/QnAMaker/concepts/data-sources-supported.md",
806+
"redirect_url": "/azure/cognitive-services/QnAMaker/Quickstarts/reference-document-format-guidelines",
807+
"redirect_document_id": false
808+
},
809+
{
810+
"source_path": "articles/cognitive-services/QnAMaker/tutorials/choosing-capacity-qnamaker-deployment.md",
811+
"redirect_url": "/azure/cognitive-services/QnAMaker/Concepts/azure-resources",
812+
"redirect_document_id": false
813+
},
804814
{
805815
"source_path": "articles/cognitive-services/QnAMaker/Quickstarts/create-publish-kb-nodejs-sdk.md",
806-
"redirect_url": "/azure/cognitive-services//QnAMaker/Quickstarts/quickstart-sdk",
816+
"redirect_url": "/azure/cognitive-services/QnAMaker/Quickstarts/quickstart-sdk",
807817
"redirect_document_id": false
808818
},
809819
{
810820
"source_path": "articles/cognitive-services/QnAMaker/Quickstarts/create-publish-kb-csharp-sdk.md",
811-
"redirect_url": "/azure/cognitive-services//QnAMaker/Quickstarts/quickstart-sdk",
821+
"redirect_url": "/azure/cognitive-services/QnAMaker/Quickstarts/quickstart-sdk",
812822
"redirect_document_id": false
813823
},
814824
{
815825
"source_path": "articles/cognitive-services/QnAMaker/Quickstarts/python-sdk.md",
816-
"redirect_url": "/azure/cognitive-services//QnAMaker/Quickstarts/quickstart-sdk",
826+
"redirect_url": "/azure/cognitive-services/QnAMaker/Quickstarts/quickstart-sdk",
817827
"redirect_document_id": false
818828
},
819829
{
820830
"source_path": "articles/cognitive-services/QnAMaker/Quickstarts/create-knowledge-rest-api-nodejs.md",
821-
"redirect_url": "/azure/cognitive-services//QnAMaker/Quickstarts/publish-kb-nodejs",
831+
"redirect_url": "/azure/cognitive-services/QnAMaker/Quickstarts/publish-kb-nodejs",
822832
"redirect_document_id": false
823833
},
824834
{
825835
"source_path": "articles/cognitive-services/QnAMaker/Quickstarts/get-answer-from-kb-using-postman.md",
826-
"redirect_url": "/azure/cognitive-services//QnAMaker/Quickstarts/get-answer-from-knowledge-base-using-url-tool",
836+
"redirect_url": "/azure/cognitive-services/QnAMaker/Quickstarts/get-answer-from-knowledge-base-using-url-tool",
827837
"redirect_document_id": false
828838
},
829839
{
830840
"source_path": "articles/cognitive-services/QnAMaker/Quickstarts/get-answer-from-kb-using-curl.md",
831-
"redirect_url": "/azure/cognitive-services//QnAMaker/Quickstarts/get-answer-from-knowledge-base-using-url-tool",
841+
"redirect_url": "/azure/cognitive-services/QnAMaker/Quickstarts/get-answer-from-knowledge-base-using-url-tool",
832842
"redirect_document_id": false
833843
},
834844
{
@@ -986,11 +996,6 @@
986996
"redirect_url": "/azure/cognitive-services/QnAMaker/quickstarts/create-new-kb-csharp",
987997
"redirect_document_id": false
988998
},
989-
{
990-
"source_path": "articles/cognitive-services/QnAMaker/Concepts/data-sources-supported.md",
991-
"redirect_url": "/azure/cognitive-services/QnAMaker/concepts/knowledge-base",
992-
"redirect_document_id": false
993-
},
994999
{
9951000
"source_path": "articles/cognitive-services/QnAMaker/How-To/create-knowledge-base.md",
9961001
"redirect_url": "/azure/cognitive-services/QnAMaker/Quickstarts/create-publish-knowledge-base",

articles/cognitive-services/QnAMaker/Concepts/content-types.md

Lines changed: 3 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Content types - QnA Maker
33
description: Content types include many standard structured documents such as PDF, DOC, and TXT.
44
services: cognitive-services
55
ms.topic: conceptual
6-
ms.date: 01/27/2020
6+
ms.date: 02/24/2020
77
---
88

99
# Content types of documents you can add to a knowledge base
@@ -40,134 +40,8 @@ You can add files to a knowledge base from a public source, or your local file s
4040

4141
## Content format guidelines
4242

43-
QnA Maker adds file and URL content, converting the content into QnA sets, stored as markdown (`.md`). Content is fit for a knowledge base where the content is organized in some structured form, and is represented in well-defined sections. The sections can further be broken into subsections, or subtopics. Extraction works best on content that has a clear structure with hierarchical headings.
44-
45-
QnA Maker identifies sections and subsections and relationships in the content based on visual clues like font size, font style, numbering, colors, etc. Semi-structured content includes manuals, FAQs, guidelines, policies, brochures, flyers, and many other types of files.
46-
47-
## FAQ URLs
48-
49-
QnA Maker can support FAQ web pages in 3 different forms: Plain FAQ pages, FAQ pages with links, FAQ pages with a Topics Homepage.
50-
51-
52-
### Plain FAQ pages
53-
54-
This is the most common type of FAQ page, in which the answers immediately follow the questions in the same page.
55-
56-
Below is an example of a plain FAQ page:
57-
58-
![Plain FAQ page example for a knowledge base](../media/qnamaker-concepts-datasources/plain-faq.png)
59-
60-
61-
### FAQ pages with links
62-
63-
In this type of FAQ page, questions are aggregated together and are linked to answers that are either in different sections of the same page, or in different pages.
64-
65-
Below is an example of an FAQ page with links in sections that are on the same page:
66-
67-
![Section Link FAQ page example for a knowledge base](../media/qnamaker-concepts-datasources/sectionlink-faq.png)
68-
69-
70-
### FAQ pages with a Topics homepage
71-
72-
This type of FAQ has a home page with the Topics where each Topic is a link to its relevant QnAs in a different page. Here, QnA Maker crawls all the linked pages to extract the corresponding questions & answers.
73-
74-
Below is an example of an FAQ page where a topics homepage has links to FAQ sections in different pages.
75-
76-
![Deep link FAQ page example for a knowledge base](../media/qnamaker-concepts-datasources/topics-faq.png)
77-
78-
79-
### Support Urls
80-
81-
QnA Maker can process semi-structured support web pages, such as web articles that would describe how to perform a given task, how to diagnose and resolve a given problem, and what are the best practices for a given process. Extraction works best on content that has a clear structure with hierarchical headings.
82-
83-
> [!NOTE]
84-
> Extraction for support articles is a new feature and is in early stages. It works best for simple pages, that are well structured, and do not contain complex headers/footers.
85-
86-
![QnA Maker supports extraction from semi-structured web pages where a clear structure is presented with hierarchical headings](../media/qnamaker-concepts-datasources/support-web-pages-with-heirarchical-structure.png)
87-
88-
89-
## PDF/ DOC files
90-
91-
QnA Maker can process semi-structured content in a PDF or DOC file, and convert it into QnAs. A good file that can be extracted well is one where content is organized in some structured form, and is represented in well-defined sections. The sections can further be broken inTO subsections, or subtopics. Extraction works best on documents that have a clear structure with hierarchical headings.
92-
93-
QnA Maker identifies sections and subsections and relationships in the file based on visual clues like font size, font style, numbering, colors, etc. Semi-structured PDF or DOC files could be Manuals, FAQs, Guidelines, Policies, Brochures, Flyers, and many other types of files. Below are some example types of these files.
94-
95-
### Product manuals
96-
97-
A manual is typically guidance material that accompanies a product. It helps the user to set up, use, maintain, and troubleshoot the product. When QnA Maker processes a manual, it extracts the headings and subheadings as questions and the subsequent content as answers. See an example [here](https://download.microsoft.com/download/2/9/B/29B20383-302C-4517-A006-B0186F04BE28/surface-pro-4-user-guide-EN.pdf).
98-
99-
Below is an example of a manual with an index page, and hierarchical content
100-
101-
![Product Manual example for a knowledge base](../media/qnamaker-concepts-datasources/product-manual.png)
102-
103-
> [!NOTE]
104-
> Extraction works best on manuals that have a table of contents and/or an index page, and a clear structure with hierarchical headings.
105-
106-
### Brochures, guidelines, papers, and other files
107-
108-
Many other types of documents can also be processed to generate QA pairs, provided they have a clear structure and layout. These include: Brochures, guidelines, reports, white papers, scientific papers, policies, books, etc. See an example [here](https://qnamakerstore.blob.core.windows.net/qnamakerdata/docs/Manage%20Azure%20Blob%20Storage.docx).
109-
110-
Below is an example of a semi-structured doc, without an index:
111-
112-
![Azure Blob storage semi-structured Doc](../media/qnamaker-concepts-datasources/semi-structured-doc.png)
113-
114-
### Structured QnA document
115-
116-
The format for structured Question-Answers in DOC files, is in the form of alternating Questions and Answers per line, one question per line followed by its answer in the following line, as shown below:
117-
118-
```text
119-
Question1
120-
121-
Answer1
122-
123-
Question2
124-
125-
Answer2
126-
```
127-
128-
Below is an example of a structured QnA word document:
129-
130-
![Structured QnA document example for a knowledge base](../media/qnamaker-concepts-datasources/structured-qna-doc.png)
131-
132-
## Structured *TXT*, *TSV* and *XLS* Files
133-
134-
QnAs in the form of structured *.txt*, *.tsv* or *.xls* files can also be uploaded to QnA Maker to create or augment a knowledge base. These can either be plain text, or can have content in RTF or HTML.
135-
136-
| Question | Answer | Metadata (1 key: 1 value) |
137-
|-----------|---------|-------------------------|
138-
| Question1 | Answer1 | <code>Key1:Value1 &#124; Key2:Value2</code> |
139-
| Question2 | Answer2 | `Key:Value` |
140-
141-
Any additional columns in the source file are ignored.
142-
143-
### Example of structured Excel file
144-
145-
Below is an example of a structured QnA *.xls* file, with HTML content:
146-
147-
![Structured QnA excel example for a knowledge base](../media/qnamaker-concepts-datasources/structured-qna-xls.png)
148-
149-
### Example of alternate questions for single answer in Excel file
150-
151-
Below is an example of a structured QnA *.xls* file, with several alternate questions for a single answer:
152-
153-
![Example of alternate questions for single answer in Excel file](../media/qnamaker-concepts-datasources/xls-alternate-question-example.png)
154-
155-
After the file is imported, the question-and-answer pair is in the knowledge base as shown below:
156-
157-
![Screenshot of alternate questions for single answer imported into knowledge base](../media/qnamaker-concepts-datasources/xls-alternate-question-example-after-import.png)
158-
159-
## Formatting considerations
160-
161-
After importing a file or URL, QnA Maker converts and stores your content in the [markdown format](https://en.wikipedia.org/wiki/Markdown). The conversion process adds new lines in the text, such as `\n\n`. A knowledge of the markdown format helps you to understand the converted content and manage your knowledge base content.
162-
163-
If you add or edit your content directly in your knowledge base, use **markdown formatting** to create rich text content or change the markdown format content that is already in the answer. QnA Maker supports much of the markdown format to bring rich text capabilities to your content. However, the client application, such as a chat bot may not support the same set of markdown formats. It is important to test the client application's display of answers.
164-
165-
Learn more from the [QnA Maker markdown reference documentation](../reference-markdown-format.md).
166-
167-
## Testing your Markdown
168-
169-
Use the **[CommonMark](https://commonmark.org/help/tutorial/index.html)** tutorial to validate your Markdown. The tutorial has a **Try it** feature for quick copy/paste validation.
43+
Learn more about the [format guidelines](../reference-document-format-guidelines.md) for the different files.
17044

17145
## Next steps
17246

173-
* Understand how to design and manage [question and answer (QnA) sets](question-answer-set.md)
47+
Understand what information is stored in a [question and answer (QnA) set](question-answer-set.md).

articles/cognitive-services/QnAMaker/How-To/add-sharepoint-datasources.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ If the QnA Maker knowledge base manager is not the Active Directory manager, you
1515

1616
## Prerequisites
1717

18-
QnA Maker uses Microsoft Graph for permissions. If your SharePoint is on-premises, you won't be able to extract from SharePoint because Microsoft Graph won't be able to determine permissions.
18+
* Cloud-based SharePoint - QnA Maker uses Microsoft Graph for permissions. If your SharePoint is on-premises, you won't be able to extract from SharePoint because Microsoft Graph won't be able to determine permissions.
19+
* URL format - QnA Maker only supports SharePoint urls which are generated for sharing and are of format https://*.sharepoint.com
1920

2021
## Add supported file types to knowledge base
2122

articles/cognitive-services/QnAMaker/How-To/business-continuity-plan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ The high-level idea as represented above is as follows:
3535
## Next steps
3636

3737
> [!div class="nextstepaction"]
38-
> [Choose capacity for your QnA Maker deployment](../Tutorials/choosing-capacity-qnamaker-deployment.md)
38+
> [Choose capactiy](./improve-knowledge-base.md)

articles/cognitive-services/QnAMaker/How-To/get-analytics-knowledge-base.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ QnA Maker stores all chat logs and other telemetry, if you have enabled App Insi
5151
//Total Traffic
5252
requests
5353
| where url endswith "generateAnswer" and name startswith "POST"
54-
| parse kind = regex url with *"(?i)knowledgebases/"KbId"/generateAnswer"
54+
| parse kind = regex url with *"(?i)knowledgebases/"KbId"/generateAnswer"
5555
| summarize ChatCount=count() by bin(timestamp, 1d), KbId
5656
```
5757

@@ -63,8 +63,8 @@ let startDate = todatetime('2019-01-01');
6363
let endDate = todatetime('2020-12-31');
6464
requests
6565
| where timestamp <= endDate and timestamp >=startDate
66-
| where url endswith "generateAnswer" and name startswith "POST"
67-
| parse kind = regex url with *"(?i)knowledgebases/"KbId"/generateAnswer"
66+
| where url endswith "generateAnswer" and name startswith "POST"
67+
| parse kind = regex url with *"(?i)knowledgebases/"KbId"/generateAnswer"
6868
| summarize ChatCount=count() by KbId
6969
```
7070

@@ -77,7 +77,7 @@ requests
7777
| project timestamp, id, url, resultCode, duration
7878
| parse kind = regex url with *"(?i)knowledgebases/"KbId"/generateAnswer"
7979
| join kind= inner (
80-
traces | extend id = operation_ParentId
80+
traces | extend id = operation_ParentId
8181
) on id
8282
| extend UserId = tostring(customDimensions['UserId'])
8383
| summarize ChatCount=count() by bin(timestamp, 1d), UserId, KbId
@@ -109,11 +109,11 @@ traces | extend id = operation_ParentId
109109
| extend answer = tostring(customDimensions['Answer'])
110110
| extend score = tostring(customDimensions['Score'])
111111
| where score == "0"
112-
| project timestamp, KbId, question, answer, score
112+
| project timestamp, KbId, question, answer, score
113113
| order by timestamp desc
114114
```
115115

116116
## Next steps
117117

118118
> [!div class="nextstepaction"]
119-
> [Choose capactiy](../tutorials/choosing-capacity-qnamaker-deployment.md)
119+
> [Choose capactiy](./improve-knowledge-base.md)

0 commit comments

Comments
 (0)