Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Custom question answering stores answer text as markdown. There are many flavors of markdown. In order to make sure the answer text is returned and displayed correctly, use this reference.
Use the CommonMark tutorial to validate your markdown. The tutorial has a Try it feature for quick copy/paste validation.
When to use rich-text editing versus markdown
Use a formatting toolbar for rich-text editing of answers, allowing you, as the author, to quickly select and format text.
Markdown is a better tool when you need to autogenerate content to create projects to be imported as part of a CI/CD pipeline or for batch testing.
Supported markdown format
Following is the list of markdown formats that you can use in your answer text.
| Purpose | Format | Example markdown |
|---|---|---|
| A new line between 2 sentences. | \n\n |
How can I create a bot with \n\n custom question answering? |
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...\n# my h1 \n## my h2\n### my h3 \n#### my h4 \n##### my h5 |
| Italics | *text* |
How do I create a bot with *custom question answering*? |
| Strong (bold) | **text** |
How do I create a bot with **custom question answering***? |
| URL for link | [text](https://www.my.com) |
How do I create a bot with [custom question answering](https://language.cognitive.azure.cn/)? |
| *URL for public image |  |
How can I create a bot with  |
| Strikethrough | ~~text~~ |
some ~~questions~~ questions need to be asked |
| Bold and italics | ***text*** |
How can I create a ***custom question answering**** bot? |
| Bold URL for link | [**text**](https://www.my.com) |
How do I create a bot with [**custom question answering**](https://language.cognitive.azure.cn/)? |
| Italics URL for link | [*text*](https://www.my.com) |
How do I create a bot with [*custom question answering*](https://language.cognitive.azure.cn/)? |
| Escape markdown symbols | \*text\* |
How do I create a bot with \*custom question answering*\*? |
| Ordered list | \n 1. item1 \n 1. item2 |
This is an ordered list: \n 1. List item 1 \n 1. List item 2The preceding example uses automatic numbering built into markdown. This is an ordered list: \n 1. List item 1 \n 2. List item 2The preceding example uses explicit numbering. |
| Unordered list | \n * item1 \n * item2or \n - item1 \n - item2 |
This is an unordered list: \n * List item 1 \n * List item 2 |
| Nested lists | \n * Parent1 \n\t * Child1 \n\t * Child2 \n * Parent2\n * Parent1 \n\t 1. Child1 \n\t * Child2 \n 1. Parent2You 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 2This is an ordered nested list: \n 1. Parent1 \n\t 1. Child1 \n\t 1. Child2 \n 1. Parent2 |
- Custom question answering doesn't process the image in any way. It's the client application's role to render the image.
If you're adding content through the update or replace project APIs and your content or file includes HTML tags, be sure to preserve the HTML within your file. This step ensures that all opening and closing tags are properly converted to their encoded format.
| Preserve HTML | Representation in the API request | Representation in KB |
|---|---|---|
| Yes | <br> | <br> |
| Yes | <h3>header</h3> | <h3>header</h3> |
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'