Announcing Safety System Messages in Azure AI Studio and Azure OpenAI Studio
We are excited to announce the integration of default safety system message templates into the playground experiences for studio. Available now, this feature streamlines the process of integrating research-backed safety instructions for your model directly into your system message, supporting more controlled and trustworthy deployments from the start. System messages are essential in building responsible AI applications and have proven to be one of the most effective tools to mitigate the novel risks of generative AI.
Introduction to Safety System Messages
A system message, sometimes referred to as a metaprompt or system prompt, is a message written by the developer to prime a foundation model with context, instructions, or other information. The goal is to customize the model’s behavior and improve the predictability and performance of the model for various use cases. For example, a developer can use a system message to describe the assistant’s desired behavior, define what the model should and shouldn’t answer, and define the format of model responses. If you're new to prompt engineering, we recommend starting with our introduction to prompt engineering and prompt engineering techniques guidance.
It is recommended that developers add specific safety instructions to their system message to mitigate unwanted and unsafe behavior. For example, to reduce the risk of a model fabricating or hallucinating information, a developer can provide instructions to always check grounding data to help formulate answers, regardless of the foundation model’s base knowledge. Further, a developer could instruct the model to respond “I am unable to answer that question” whenever relevant grounding data is unavailable.
Crafting an effective system message is an iterative process! Even experienced prompt engineers may find it difficult to anticipate and address novel risks presented by generative AI. That’s why Microsoft is making it easier for customers to get started with research-backed templates, available in documentation and now available directly in Azure AI Studio and Azure OpenAI Service. System messages can and should be combined with other responsible AI tools and practices, such as content filters, grounding data, and responsible UX design, for a layered defense-in-depth approach.
Get started with research-backed templates
You can start experimenting with Safety System Messages today!
Included in the Azure AI Studio and Azure OpenAI Studio templates are four common risk mitigation areas: Harmful content (Sexual, Violence, Self-harm and Hate and Fairness), Ungroundedness, Protected Material, and Jailbreak attack attempts. Example components for other harms can be found in our prompt engineering techniques guidance.
We’ve developed these templates with token length, safety, and overall performance top of mind. They have been evaluated across several models, including GPT-3.5, GPT-4, LLaMA 2, LLaMA 3, and others.
New to Azure AI Studio or Azure OpenAI Studio?
Onboard to the Azure AI Studio or the Azure OpenAI Service studio.
- Navigate to your studio.
- Navigate to your playground view. Safety System Messages are integrated directly into the playground experience, accessible through the prompt panel.
- Select the safety system message(s) that apply to your scenario. These selections will automatically populate in your system message. Remember to save your changes by selecting Apply changes.
- Build and ship responsibly. Safety system messages are one of many mitigations that can be applied to your AI system. Each application and scenario are different and will have different risks. These messages are meant to help give you an understanding of how safety system messages are created and how you can use prompt engineering to improve the quality and safety of generated responses. We encourage you to continue to iterate on these safety system message instructions as needed to fit your unique scenario.
Coming soon
Keep an eye out for additional safety system messages, coming soon to your studio experience and Azure AI documentation. See more components in our prompt engineering techniques guidance.
Resources
- Introduction to prompt engineering
- Prompt engineering techniques for large language models (LLMs)
- Azure AI Studio
- Azure OpenAI Studio