Usage of Azure OpenAI should follow the six Microsoft AI principles:
- Fairness: AI systems shouldn't make decisions that discriminate against or support bias of a group or individual.
- Reliability and Safety: AI systems should respond safely to new situations and potential manipulation.
- Privacy and Security: AI systems should be secure and respect data privacy.
- Inclusiveness: AI systems should empower everyone and engage people.
- Accountability: People must be accountable for how AI systems operate.
- Transparency: AI systems should have explanations so users can understand how they're built and used.
One token is roughly four characters for typical English text.
In the Azure OpenAI Studio, you can build AI models and deploy them for public consumption in software applications. Azure OpenAI's capabilities are made possible by specific generative AI models. Different models are optimized for different tasks; some models excel at summarization and providing general unstructured responses, and others are built to generate code or unique images from text input.
These Azure OpenAI models fall into a few main families:
- GPT-4
- GPT-3
- Codex
- Embeddings
- DALL-E
Azure OpenAI's AI models can all be trained and customized with fine-tuning. We won't go into custom models here, but you can learn more on the fine-tuning your model Azure documentation.
Understanding GPT models for natural language generation Generative pre-trained transformer (GPT) models are excellent at both understanding and creating natural language. If you've seen recent news around AI answering questions or writing a paragraph based on a prompt, it likely could have been generated by a GPT model. GPT models often have the version appended to the end, such as GPT-3 or GPT-4. Azure OpenAI offers preview access to ChatGPT powered by gpt-35-turbo and to GPT-4. You can apply for access to GPT-4 here.
What does a response from a GPT model look like? A key aspect of OpenAI's generative AI is that it takes an input, or prompt, to return a natural language, visual, or code response. GPT tries to infer, or guess, the context of the user's question based on the prompt.
GPT models are great at completing several natural language tasks, some of which include:
Task | Prompt |
---|---|
Summarizing text | "Summarize this text into a short blurb" |
Classifying text | "What genre of book is this?" |
Generating names or phrases | "Write a tagline for my flower company" |
Translation | "Translate 'How are you' to French" |
Answering questions | "What does Azure OpenAI do?" |
Suggesting content | "Give me the five best weddings songs" |
Prompts can be grouped into types of requests based on task.
Learn more about prompt engineering.
Task type | Prompt example | Completion example |
---|---|---|
Classifying content | Tweet: I enjoyed the trip. Sentiment: | Positive |
Generating new content | List ways of traveling | 1. Bike 2. Car ... |
Holding a conversation | A friendly AI assistant | See examples |
Transformation (translation and symbol conversion) | English: Hello, French: | bonjour |
Summarizing content | Provide a summary of the content {text} | The content shares methods of machine learning. |
Picking up where you left off | One way to grow tomatoes | is to plant seeds. |
Giving factual responses | How many moons does Earth have? | One |
-
Use delimeters
###
"""
- 3x `
---
<
>
<tag>
XML</tag>
-
Ask for structured ouptut:
- HTML
- JSON
-
Check
- Wether conditions are satisfied.
- Assumptions required to do the ask.
-
Few-shot prompting.
- Specify the steps required to complete a task.
- Instruct the model to work out its own solution before rushing to a conclusion.
- Reduce hallucinations.
- First find relevant information.
- Answer the question based on relevant information.
- Introduction to Azure OpenAI Service
- Get started with Azure OpenAI Service
- Integrate Azure OpenAI into your app
- Utilize prompt engineering in your app
- Explore Azure OpenAI Service embeddings and document search