Skip to content

Commit 3276d60

Browse files
committed
fix links
1 parent b2baae4 commit 3276d60

File tree

6 files changed

+48
-24
lines changed

6 files changed

+48
-24
lines changed

articles/ai-services/openai/concepts/advanced-prompt-engineering.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,26 @@ ms.topic: conceptual
99
ms.date: 09/05/2024
1010
manager: nitinme
1111
keywords: ChatGPT, GPT-4, meta prompts, chain of thought
12-
zone_pivot_groups: openai-prompt
1312
---
1413

15-
# System messages
14+
# System message design
1615

1716
This guide will walk you through some techniques in system message design.
1817

19-
While the principles of prompt engineering can be generalized across many different model types, certain models expect a specialized prompt structure. For Azure OpenAI GPT models, there are currently two distinct APIs where prompt engineering comes into play:
2018

21-
- Chat Completion API.
22-
- Completion API.
2319

24-
Each API requires input data to be formatted differently, which in turn impacts overall prompt design. The **Chat Completion API** supports the GPT-35-Turbo and GPT-4 models. These models are designed to take input formatted in a [specific chat-like transcript](../how-to/chatgpt.md) stored inside an array of dictionaries.
20+
## What is a system message?
2521

26-
The **Completion API** supports the older GPT-3 models and has much more flexible input requirements in that it takes a string of text with no specific format rules.
22+
A system message is a feature-specific set of instructions or contextual frameworks given to a generative AI model (e.g. GPT4-o, GPT3.5 Turbo, etc.) to direct and improve the quality and safety of a model’s output. This is particularly helpful in situations that need certain degrees of formality, technical language, or industry-specific terms.
2723

28-
The techniques in this guide will teach you strategies for increasing the accuracy and grounding of responses you generate with a Large Language Model (LLM). It is, however, important to remember that even when using prompt engineering effectively you still need to validate the responses the models generate. Just because a carefully crafted prompt worked well for a particular scenario doesn't necessarily mean it will generalize more broadly to certain use cases. Understanding the [limitations of LLMs](/legal/cognitive-services/openai/transparency-note?context=/azure/ai-services/openai/context/context#limitations), is just as important as understanding how to leverage their strengths.
2924

25+
There is no prescribed length. A system message can be one short sentence:
26+
27+
```
28+
You are a helpful AI assistant.
29+
```
30+
31+
A system message can also be *many* lines long, containing detailed rules, detailed context, formatting and output guidelines, and responsible AI (RAI) mitigations.
3032

3133
## System message examples
3234

articles/ai-services/openai/concepts/prompt-engineering.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,17 @@ Supporting content is information that the model can utilize to influence the ou
104104

105105
## Scenario-specific guidance
106106

107+
While the principles of prompt engineering can be generalized across many different model types, certain models expect a specialized prompt structure. For Azure OpenAI GPT models, there are currently two distinct APIs where prompt engineering comes into play:
108+
109+
- Chat Completion API.
110+
- Completion API.
111+
112+
Each API requires input data to be formatted differently, which in turn impacts overall prompt design. The **Chat Completion API** supports the GPT-35-Turbo and GPT-4 models. These models are designed to take input formatted in a [specific chat-like transcript](../how-to/chatgpt.md) stored inside an array of dictionaries.
113+
114+
The **Completion API** supports the older GPT-3 models and has much more flexible input requirements in that it takes a string of text with no specific format rules.
115+
116+
The techniques in this section will teach you strategies for increasing the accuracy and grounding of responses you generate with a Large Language Model (LLM). It is, however, important to remember that even when using prompt engineering effectively you still need to validate the responses the models generate. Just because a carefully crafted prompt worked well for a particular scenario doesn't necessarily mean it will generalize more broadly to certain use cases. Understanding the [limitations of LLMs](/legal/cognitive-services/openai/transparency-note?context=/azure/ai-services/openai/context/context#limitations), is just as important as understanding how to leverage their strengths.
117+
107118
#### [Chat completion APIs](#tab/chat)
108119

109120
[!INCLUDE [Prompt Chat Completion](../includes/prompt-chat-completion.md)]

articles/ai-services/openai/concepts/safety-system-message-templates.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
1+
---
2+
title: Safety system message templates
3+
titleSuffix: Azure OpenAI Service
4+
description: This article contains recommended safety system messages for your generative AI systems, to help reduce the propensity of harm in various concern areas.
5+
ms.service: azure-ai-openai
6+
ms.topic: conceptual
7+
ms.date: 09/20/2024
8+
ms.custom:
9+
manager: nitinme
10+
author: PatrickFarley
11+
ms.author: pafarley
12+
---
113

214

15+
# Safety system message templates
316

4-
# Safety System Message Templates
517

18+
This article contains recommended safety system messages for your generative AI systems, to help reduce the propensity of harm in various concern areas. Before you begin evaluating and integrating your safety system messages, visit the [Safety System Message documentation](/azure/ai-services/openai/concepts/system-message) to get started.
619

7-
This article contains recommended safety system messages for your generative AI systems, to help reduce the propensity of harm in various concern areas. Before you begin evaluating and integrating your safety system messages, visit the [Safety System Message documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/system-message) to get started.
8-
9-
Please note using a safety system message is one of many techniques that can be used for mitigations risks in AI systems, and different from [Azure AI Content Safety](https://learn.microsoft.com/en-us/azure/ai-services/content-safety/overview).
20+
Please note using a safety system message is one of many techniques that can be used for mitigations risks in AI systems, and different from [Azure AI Content Safety](/azure/ai-services/content-safety/overview).
1021

1122
## Recommended system messages
1223

@@ -26,7 +37,7 @@ The following steps show how to leverage safety system messages in Azure AI stud
2637
1. Go to Azure AI Studio and navigate to Azure OpenAI and the Chat playground.
2738
:::image type="content" source="../media/navigate-chat-playground.PNG" alt-text="Screenshot of the AI Studio selection.":::
2839
1. Navigate to the default safety system messages integrated in the studio.
29-
:::image type="content" source="../media/navigate-system-message.PNG" alt-text="Screenshot of the system message selection.":::
40+
:::image type="content" source="../media/navigate-system-message.PNG" alt-text="Screenshot of the system message navigation.":::
3041
1. Select the system message(s) that are applicable to your scenario.
3142
:::image type="content" source="../media/select-system-message.PNG" alt-text="Screenshot of the system message selection.":::
3243
1. Review and edit the safety system messages based on the best practices outlined here.
@@ -40,4 +51,4 @@ The following steps show how to leverage safety system messages in Azure AI stud
4051
4152
## Evaluation
4253

43-
We recommend informing your safety system message approach based on an iterative process of identification and evaluation. Learn more in our [Safety System Message documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/system-message).
54+
We recommend informing your safety system message approach based on an iterative process of identification and evaluation. Learn more in our [Safety System Message documentation](/azure/ai-services/openai/concepts/system-message).

articles/ai-services/openai/concepts/system-message.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Safety System Messages
2+
title: Safety system messages
33
titleSuffix: Azure OpenAI Service
44
description: Learn about how to construct system messages also know as metaprompts to guide an AI system's behavior.
55
ms.service: azure-ai-openai
@@ -13,7 +13,7 @@ ms.author: mbullwin
1313
recommendations: false
1414
---
1515

16-
# Safety System Messages
16+
# Safety system messages
1717

1818
This article recommends frameworks and examples for writing effective system messages to guide AI models’ behavior, improve output quality and accuracy, and mitigate harms. Alongside other mitigation techniques, system messages provide a more precise way of determining safe outputs.
1919

@@ -35,9 +35,9 @@ You are a helpful AI assistant.
3535

3636
A system message can also be *many* lines long, containing detailed rules, detailed context, formatting and output guidelines, and responsible AI (RAI) mitigations.
3737

38-
## Safety System Messages
38+
## Safety system message examples
3939

40-
Safety system messages are a type of system message that provide explicit instructions to mitigate against potential RAI harms and guide systems to interact safely with users. Safety system messages complement your safety stack and can be added alongside foundation model training, data grounding, Azure AI Content Safety classifiers, and UX/UI interventions. Learn more about [Responsible AI practices for Azure OpenAI models](https://learn.microsoft.com/en-us/legal/cognitive-services/openai/overview?context=%2Fazure%2Fai-services%2Fopenai%2Fcontext%2Fcontext).
40+
Safety system messages are a type of system message that provide explicit instructions to mitigate against potential RAI harms and guide systems to interact safely with users. Safety system messages complement your safety stack and can be added alongside foundation model training, data grounding, Azure AI Content Safety classifiers, and UX/UI interventions. Learn more about [Responsible AI practices for Azure OpenAI models](/legal/cognitive-services/openai/overview?context=%2Fazure%2Fai-services%2Fopenai%2Fcontext%2Fcontext).
4141

4242
While this technique is very effective, it is still fallible, and most safety system messages need to be used in combination with other safety mitigations.
4343

@@ -107,7 +107,7 @@ For safety system message components, the primary criterion is the improvement i
107107

108108
### 7/ Iterate on system messages and safety system components and above steps
109109

110-
Based on your evaluations, revisit your top components to improve any issues to reach an acceptable level. Continue to monitor and evaluate your system regularly as changes are introduced, including new use cases, updated models, etc. Remember that even when using this guidance, you still need to validate your model responses per scenario. A well-crafted system message for one scenario may not work more broadly across other scenarios. Understanding the [limitations of LLMs](https://learn.microsoft.com/en-us/legal/cognitive-services/openai/transparency-note?context=/azure/ai-services/openai/context/context#limitations) and the [mechanisms for evaluating and mitigating those limitations](https://learn.microsoft.com/en-us/legal/cognitive-services/openai/overview?context=/azure/ai-services/openai/context/context) is just as important as understanding how to leverage their strengths.
110+
Based on your evaluations, revisit your top components to improve any issues to reach an acceptable level. Continue to monitor and evaluate your system regularly as changes are introduced, including new use cases, updated models, etc. Remember that even when using this guidance, you still need to validate your model responses per scenario. A well-crafted system message for one scenario may not work more broadly across other scenarios. Understanding the [limitations of LLMs](/legal/cognitive-services/openai/transparency-note?context=/azure/ai-services/openai/context/context#limitations) and the [mechanisms for evaluating and mitigating those limitations](/legal/cognitive-services/openai/overview?context=/azure/ai-services/openai/context/context) is just as important as understanding how to leverage their strengths.
111111

112112

113113
## Summary of best practices
@@ -163,7 +163,7 @@ Finally, remember that system messages, or metaprompts, are not "one size fits a
163163

164164
## Next steps
165165

166-
- [Azure OpenAI Service](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/prompt-engineering)
167-
- [Prompt engineering techniques with Azure OpenAI](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/advanced-prompt-engineering?pivots=programming-language-chat-completions)
166+
- [Azure OpenAI Service](/azure/ai-services/openai/concepts/prompt-engineering)
167+
- [Prompt engineering techniques with Azure OpenAI](/azure/ai-services/openai/concepts/advanced-prompt-engineering?pivots=programming-language-chat-completions)
168168
- [Announcing Safety System Messages in Azure AI Studio and Azure OpenAI Studio](https://techcommunity.microsoft.com/t5/ai-azure-ai-services-blog/announcing-safety-system-messages-in-azure-ai-studio-and-azure/ba-p/4146991) - Microsoft Community Hub
169169
- [Safety system message templates ](tbd)

articles/ai-services/openai/concepts/use-your-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ Use the following practices for best results when chatting with the model.
478478

479479
* If you aren't satisfied with the model response for a specific question, try either making the question more specific or more generic to see how the model responds, and reframe your question accordingly.
480480

481-
* [Chain-of-thought prompting](advanced-prompt-engineering.md?pivots=programming-language-chat-completions#chain-of-thought-prompting) has been shown to be effective in getting the model to produce desired outputs for complex questions/tasks.
481+
* [Chain-of-thought prompting](prompt-engineering.md?pivots=programming-language-chat-completions#chain-of-thought-prompting) has been shown to be effective in getting the model to produce desired outputs for complex questions/tasks.
482482

483483
**Question length**
484484

articles/ai-services/openai/toc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ items:
7474
href: ./concepts/prompt-engineering.md
7575
- name: Image prompt engineering techniques
7676
href: ./concepts/gpt-4-v-prompt-engineering.md
77-
- name: System message
77+
- name: System messages
7878
items:
7979
- name: System message design
8080
href: ./concepts/advanced-prompt-engineering.md
8181
- name: Safety system messages
8282
href: ./concepts/system-message.md
83-
- name: System message templates
83+
- name: Safety system message templates
8484
href: ./concepts/safety-system-message-templates.md
8585
- name: Model versions
8686
href: ./concepts/model-versions.md

0 commit comments

Comments
 (0)