Microsoft has recently introduced a set of learning modules on the Azure OpenAI Service. These modules provide detailed info on Responsible AI, Models, Prompt Engineering, & other related topics.
About Azure OpenAI Service
Azure OpenAI Service provides REST API access to OpenAI’s powerful language models including the GPT-4, GPT-35-Turbo, and Embeddings model series. In addition, the new GPT-4 and GPT-35-turbo model series have now reached general availability. These models can be easily adapted to your specific task including but not limited to content generation, summarization, semantic search, and natural language to code translation. Users can access the service through REST APIs, Python SDK, or our web-based interface in the Azure OpenAI Studio.
Responsible AI
At Microsoft, we’re committed to the advancement of AI driven by principles that put people first. Generative models such as the ones available in Azure OpenAI have significant potential benefits, but without careful design and thoughtful mitigations, such models have the potential to generate incorrect or even harmful content. Microsoft has made significant investments to help guard against abuse and unintended harm, which includes requiring applicants to show well-defined use cases, incorporating Microsoft’s principles for responsible AI use, building content filters to support customers, and providing responsible AI implementation guidance to onboarded customers.
How do I get access to Azure OpenAI?
Access is currently limited as we navigate high demand, upcoming product improvements, and Microsoft’s commitment to responsible AI.
For now, Microsoft’s working with customers with an existing partnership with Microsoft, lower-risk use cases, and those committed to incorporating mitigations.
More specific information is included in the application form. MS appreciate your patience as they work to responsibly enable broader access to Azure OpenAI.
Click here to apply for access.
Comparing Azure OpenAI and OpenAI
- Azure OpenAI Service gives customers advanced language AI with OpenAI GPT-4, GPT-3, Codex, and DALL-E models with the security and enterprise promise of Azure.
- Azure OpenAI co-develops the APIs with OpenAI, ensuring compatibility and a smooth transition from one to the other.
- With Azure OpenAI, customers get the security capabilities of Microsoft Azure while running the same models as OpenAI.
- Azure OpenAI offers private networking, regional availability, and responsible AI content filtering.
Key Concepts
Prompts & completions
The completions endpoint is the core component of the API service. This API provides access to the model’s text-in, text-out interface. Users simply need to provide an input prompt containing the English text command, and the model will generate a text completion.
Here’s an example of a simple prompt and completion:
Prompt: """ count to 5 in a for loop """
Completion: for i in range(1, 6): print(i)
Tokens
Azure OpenAI processes text by breaking it down into tokens.
- Tokens can be words or just chunks of characters.
- For example, the word “hamburger” gets broken up into the tokens “ham”, “bur” and “ger”, while a short and common word like “pear” is a single token.
- Many tokens start with whitespace, for example, “ hello” and “ bye”.
- The total number of tokens processed in a given request depends on the length of your input, output and request parameters.
- The number of tokens being processed will also affect your response latency and throughput for the models.
Resources
Azure OpenAI is a new product offering on Azure. You can get started with Azure OpenAI the same way as any other Azure product where you create a resource, or instance of the service, in your Azure Subscription. You can read more about Azure’s resource management design.
Deployment
Once you create an Azure OpenAI Resource, you must deploy a model before you can start making API calls and generating text. This action can be done using the Deployment APIs. These APIs allow you to specify the model you wish to use.
Prompt Engineering
- GPT-3, GPT-3.5, and GPT-4 models from OpenAI are prompt-based. With prompt-based models, the user interacts with the model by entering a text prompt, to which the model responds with a text completion.
- This completion is the model’s continuation of the input text.
- While these models are extremely powerful, their behaviour is also very sensitive to the prompt. This makes prompt engineering an important skill to develop.
- Prompt construction can be difficult. In practice, the prompt acts to configure the model weights to complete the desired task, but it’s more of an art than a science, often requiring experience and intuition to craft a successful prompt.
Models
- The service provides users access to several different models. Each model provides a different capability and price point.
- GPT-4 models are the latest available models. Due to high demand access to this model series is currently only available by request. To request access, existing Azure OpenAI customers can apply by filling out this form
- The DALL-E models, currently in preview, generate images from text prompts that the user provides.
- Learn more about each model on our model’s concept page.