Skip to content

Commit 49b8b89

Browse files
committed
[Cogsvcs] QnA Maker - markdown reference
1 parent aa31659 commit 49b8b89

File tree

3 files changed

+45
-30
lines changed

3 files changed

+45
-30
lines changed

articles/cognitive-services/QnAMaker/Concepts/data-sources-supported.md

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ manager: nitinme
88
ms.service: cognitive-services
99
ms.subservice: qna-maker
1010
ms.topic: conceptual
11-
ms.date: 09/25/2019
11+
ms.date: 01/09/2020
1212
ms.author: diberry
1313
---
1414

@@ -183,35 +183,7 @@ After importing a file or URL, QnA Maker converts and stores your content in the
183183

184184
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.
185185

186-
Following is the list of markdown formats that you can use in QnA Maker:
187-
188-
|Purpose|Format|Example markdown|Rendering<br>as displayed in Chat bot|
189-
|--|--|--|--|
190-
A new line between 2 sentences.|`\n\n`|`How can I create a bot with \n\n QnA Maker?`|![format new line between two sentences](../media/qnamaker-concepts-datasources/format-newline.png)|
191-
|Headers from h1 to h6, the number of `#` denotes which header. 1 `#` is the h1.|`\n# text \n## text \n### text \n####text \n#####text` |`## Creating a bot \n ...text.... \n### Important news\n ...text... \n### Related Information\n ....text...`<br><br>`\n# my h1 \n## my h2\n### my h3 \n#### my h4 \n##### my h5`|![format with markdown headers](../media/qnamaker-concepts-datasources/format-headers.png)<br>![format with markdown headers H1 to H5](../media/qnamaker-concepts-datasources/format-h1-h5.png)|
192-
|Italics |`*text*`|`How do I create a bot with *QnA Maker*?`|![format with italics](../media/qnamaker-concepts-datasources/format-italics.png)|
193-
|String (bold)|`**text**`|`How do I create a bot with **QnA Maker**?`|![format with strong marking for bold](../media/qnamaker-concepts-datasources/format-strong.png)|
194-
|URL for link|`[text](https://www.my.com)`|`How do I create a bot with [QnA Maker](https://www.qnamaker.ai)?`|![format for URL (hyperlink)](../media/qnamaker-concepts-datasources/format-url.png)|
195-
|*URL for public image|`![text](https://www.my.com/image.png)`|`How can I create a bot with ![QnAMaker](https://review.docs.microsoft.com/azure/cognitive-services/qnamaker/media/qnamaker-how-to-key-management/qnamaker-resource-list.png)`|![format for public image URL ](../media/qnamaker-concepts-datasources/format-image-url.png)|
196-
|Strikethrough|`~~text~~`|`some ~~questoins~~ questions need to be asked`|![format for strikethrough](../media/qnamaker-concepts-datasources/format-strikethrough.png)|
197-
|Bold and italics|`***text***`|`How can I create a ***QnA Maker*** bot?`|![format for bold and italics](../media/qnamaker-concepts-datasources/format-bold-italics.png)|
198-
|Bold URL for link|`[**text**](https://www.my.com)`|`How do I create a bot with [**QnA Maker**](https://www.qnamaker.ai)?`|![format for bold URL](../media/qnamaker-concepts-datasources/format-bold-url.png)|
199-
|Italics URL for link|`[*text*](https://www.my.com)`|`How do I create a bot with [*QnA Maker*](https://www.qnamaker.ai)?`|![format for italics URL](../media/qnamaker-concepts-datasources/format-url-italics.png)|
200-
|Escape markdown symbols|`\*text\*`|`How do I create a bot with \*QnA Maker\*?`|![format for italics URL](../media/qnamaker-concepts-datasources/format-escape-markdown-symbols.png)|
201-
|Ordered list|`\n 1. item1 \n 1. item2`|`This is an ordered list: \n 1. List item 1 \n 1. List item 2`<br>The preceding example uses automatic numbering built into markdown.<br>`This is an ordered list: \n 1. List item 1 \n 2. List item 2`<br>The preceding example uses explicit numbering.|![format for ordered list](../media/qnamaker-concepts-datasources/format-ordered-list.png)|
202-
|Unordered list|`\n * item1 \n * item2`<br>or<br>`\n - item1 \n - item2`|`This is an ordered list: \n * List item 1 \n * List item 2`|![format for unordered list](../media/qnamaker-concepts-datasources/format-unordered-list.png)|
203-
|Nested lists|`\n * Parent1 \n\t * Child1 \n\t * Child2 \n * Parent2`<br><br>`\n * Parent1 \n\t 1. Child1 \n\t * Child2 \n 1. Parent2`<br><br>You can nest ordered and unordered lists together. The tab, `\t`, indicates the indentation level of the child element.|`This is an unordered list: \n * List item 1 \n\t * Child1 \n\t * Child2 \n * List item 2`<br><br>`This is an ordered nested list: \n 1. Parent1 \n\t 1. Child1 \n\t 1. Child2 \n 1. Parent2`|![format for nested unordered list](../media/qnamaker-concepts-datasources/format-nested-unordered-list.png)<br>![format for nested ordered list](../media/qnamaker-concepts-datasources/format-nested-ordered-list.png)|
204-
205-
*QnA Maker doesn't process the image in any way. It is the client application's role to render the image.
206-
207-
If you want to add content using update/replace knowledgebase APIs and the content/file contains html tags, you can preserve the HTML in your file by ensuring that opening and closing of the tags are converted in the encoded format.
208-
209-
| Preserve HTML | Representation in the API request | Representation in KB |
210-
|-----------|---------|-------------------------|
211-
| Yes | \&lt;br\&gt; | &lt;br&gt; |
212-
| Yes | \&lt;h3\&gt;header\&lt;/h3\&gt; | &lt;h3&gt;header&lt;/h3&gt; |
213-
214-
Additionally, CR LF(\r\n) are converted to \n in the KB. LF(\n) is kept as is. If you want to escape any escape sequence like a \t or \n you can use backslash, for example: '\\\\r\\\\n' and '\\\\t'
186+
Refer to the markdown examples provided in the [QnA Maker markdown reference](reference-markdown-format.md) for more information.
215187

216188
## Editing your knowledge base locally
217189

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: Markdown format - QnA Maker
3+
description: Following is the list of markdown formats that you can use in QnA Maker's answer text.
4+
ms.topic: reference
5+
ms.date: 01/09/2020
6+
---
7+
8+
Following is the list of markdown formats that you can use in QnA Maker's answer text.
9+
10+
11+
|Purpose|Format|Example markdown|Rendering<br>as displayed in Chat bot|
12+
|--|--|--|--|
13+
A new line between 2 sentences.|`\n\n`|`How can I create a bot with \n\n QnA Maker?`|![format new line between two sentences](../media/qnamaker-concepts-datasources/format-newline.png)|
14+
|Headers from h1 to h6, the number of `#` denotes which header. 1 `#` is the h1.|`\n# text \n## text \n### text \n####text \n#####text` |`## Creating a bot \n ...text.... \n### Important news\n ...text... \n### Related Information\n ....text...`<br><br>`\n# my h1 \n## my h2\n### my h3 \n#### my h4 \n##### my h5`|![format with markdown headers](../media/qnamaker-concepts-datasources/format-headers.png)<br>![format with markdown headers H1 to H5](../media/qnamaker-concepts-datasources/format-h1-h5.png)|
15+
|Italics |`*text*`|`How do I create a bot with *QnA Maker*?`|![format with italics](../media/qnamaker-concepts-datasources/format-italics.png)|
16+
|String (bold)|`**text**`|`How do I create a bot with **QnA Maker**?`|![format with strong marking for bold](../media/qnamaker-concepts-datasources/format-strong.png)|
17+
|URL for link|`[text](https://www.my.com)`|`How do I create a bot with [QnA Maker](https://www.qnamaker.ai)?`|![format for URL (hyperlink)](../media/qnamaker-concepts-datasources/format-url.png)|
18+
|*URL for public image|`![text](https://www.my.com/image.png)`|`How can I create a bot with ![QnAMaker](https://review.docs.microsoft.com/azure/cognitive-services/qnamaker/media/qnamaker-how-to-key-management/qnamaker-resource-list.png)`|![format for public image URL ](../media/qnamaker-concepts-datasources/format-image-url.png)|
19+
|Strikethrough|`~~text~~`|`some ~~questoins~~ questions need to be asked`|![format for strikethrough](../media/qnamaker-concepts-datasources/format-strikethrough.png)|
20+
|Bold and italics|`***text***`|`How can I create a ***QnA Maker*** bot?`|![format for bold and italics](../media/qnamaker-concepts-datasources/format-bold-italics.png)|
21+
|Bold URL for link|`[**text**](https://www.my.com)`|`How do I create a bot with [**QnA Maker**](https://www.qnamaker.ai)?`|![format for bold URL](../media/qnamaker-concepts-datasources/format-bold-url.png)|
22+
|Italics URL for link|`[*text*](https://www.my.com)`|`How do I create a bot with [*QnA Maker*](https://www.qnamaker.ai)?`|![format for italics URL](../media/qnamaker-concepts-datasources/format-url-italics.png)|
23+
|Escape markdown symbols|`\*text\*`|`How do I create a bot with \*QnA Maker\*?`|![format for italics URL](../media/qnamaker-concepts-datasources/format-escape-markdown-symbols.png)|
24+
|Ordered list|`\n 1. item1 \n 1. item2`|`This is an ordered list: \n 1. List item 1 \n 1. List item 2`<br>The preceding example uses automatic numbering built into markdown.<br>`This is an ordered list: \n 1. List item 1 \n 2. List item 2`<br>The preceding example uses explicit numbering.|![format for ordered list](../media/qnamaker-concepts-datasources/format-ordered-list.png)|
25+
|Unordered list|`\n * item1 \n * item2`<br>or<br>`\n - item1 \n - item2`|`This is an ordered list: \n * List item 1 \n * List item 2`|![format for unordered list](../media/qnamaker-concepts-datasources/format-unordered-list.png)|
26+
|Nested lists|`\n * Parent1 \n\t * Child1 \n\t * Child2 \n * Parent2`<br><br>`\n * Parent1 \n\t 1. Child1 \n\t * Child2 \n 1. Parent2`<br><br>You can nest ordered and unordered lists together. The tab, `\t`, indicates the indentation level of the child element.|`This is an unordered list: \n * List item 1 \n\t * Child1 \n\t * Child2 \n * List item 2`<br><br>`This is an ordered nested list: \n 1. Parent1 \n\t 1. Child1 \n\t 1. Child2 \n 1. Parent2`|![format for nested unordered list](../media/qnamaker-concepts-datasources/format-nested-unordered-list.png)<br>![format for nested ordered list](../media/qnamaker-concepts-datasources/format-nested-ordered-list.png)|
27+
28+
*QnA Maker doesn't process the image in any way. It is the client application's role to render the image.
29+
30+
If you want to add content using update/replace knowledgebase APIs and the content/file contains html tags, you can preserve the HTML in your file by ensuring that opening and closing of the tags are converted in the encoded format.
31+
32+
| Preserve HTML | Representation in the API request | Representation in KB |
33+
|-----------|---------|-------------------------|
34+
| Yes | \&lt;br\&gt; | &lt;br&gt; |
35+
| Yes | \&lt;h3\&gt;header\&lt;/h3\&gt; | &lt;h3&gt;header&lt;/h3&gt; |
36+
37+
Additionally, CR LF(\r\n) are converted to \n in the KB. LF(\n) is kept as is. If you want to escape any escape sequence like a \t or \n you can use backslash, for example: '\\\\r\\\\n' and '\\\\t'
38+
39+
## Next steps
40+
41+
Review batch testing [file formats](reference-tsv-format-batch-testing.md).

articles/cognitive-services/QnAMaker/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@
148148
href: troubleshooting.md
149149
- name: File formats
150150
items:
151+
- name: Markdown reference
152+
href: reference-markdown-format.md
151153
- name: Batch testing TSV
152154
href: reference-tsv-format-batch-testing.md
153155
- name: REST API Reference

0 commit comments

Comments
 (0)