Skip to content

Commit 2851579

Browse files
Merge pull request #2808 from mrbullwinkle/mrb_02_06_2025_reasoning
[Azure OpenAI] Reasoning formatting re-enabled
2 parents 6e62db3 + 1a64224 commit 2851579

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

articles/ai-services/openai/how-to/reasoning.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to use Azure OpenAI's advanced o3-mini, o1, & o1-mini rea
55
manager: nitinme
66
ms.service: azure-ai-openai
77
ms.topic: include
8-
ms.date: 01/30/2025
8+
ms.date: 02/06/2025
99
author: mrbullwinkle
1010
ms.author: mbullwin
1111
---
@@ -55,8 +55,11 @@ Request access: [limited access model application](https://aka.ms/OAI/o1access)
5555
| Streaming || - | - | - |
5656

5757
<sup>*</sup> Reasoning models will only work with the `max_completion_tokens` parameter. <br><br>
58+
5859
<sup>**</sup>The latest o<sup>&#42;</sup> series model support system messages to make migration easier. When you use a system message with `o3-mini` and `o1` it will be treated as a developer message. You should not use both a developer message and a system message in the same API request.
5960

61+
62+
6063
### Not Supported
6164

6265
The following are currently unsupported with reasoning models:
@@ -312,3 +315,15 @@ print(response.model_dump_json(indent=2))
312315

313316
---
314317

318+
## Markdown output
319+
320+
By default the `o3-mini` and `o1` models will not attempt to produce output that includes markdown formatting. A common use case where this behavior is undesirable is when you want the model to output code contained within a markdown code block. When the model generates output without markdown formatting you lose features like syntax highlighting, and copyable code blocks in interactive playground experiences. To override this new default behavior and encourage markdown inclusion in model responses, add the string `Formatting re-enabled` to the beginning of your developer message.
321+
322+
Adding `Formatting re-enabled` to the beginning of your developer message does not guarantee that the model will include markdown formatting in its response, it only increases the likelihood. We have found from internal testing that `Formatting re-enabled` is less effective by itself with the `o1` model than with `o3-mini`.
323+
324+
To improve the performance of `Formatting re-enabled` you can further augment the beginning of the developer message which will often result in the desired output. Rather than just adding `Formatting re-enabled` to the beginning of your developer message, you can experiment with adding a more descriptive initial instruction like one of the examples below:
325+
326+
- `Formatting re-enabled - please enclose code blocks with appropriate markdown tags.`
327+
- `Formatting re-enabled - code output should be wrapped in markdown.`
328+
329+
Depending on your expected output you may need to customize your initial developer message further to target your specific use case.

0 commit comments

Comments
 (0)