Azure OpenAI Document Extracts and Notes

Featured

OVERVIEW

  • Azure OpenAI is a service provided by Microsoft Azure that allows users to access OpenAI’s powerful language models, including the GPT-3, Codex, and Embeddings model series. Users can access the service through REST APIs, Python SDK, or a web-based interface in the Azure OpenAI Studio.
  • Azure OpenAI Service gives customers advanced language AI with OpenAI
    • GPT-4, GPT-3, Codex, and DALL-E
    • Models with the enterprise security and privacy of Azure.
  • Azure OpenAI co-develops the APIs with OpenAI, ensuring compatibility and a smooth transition from one to the other
  • Azure OpenAI Infographic

Comparing Azure OpenAI and OpenAI

  • Enterprise-grade security with role-based access control (RBAC) and private networks
  • Essentially Security, Privacy, and Trust
  • Microsoft values a customer’s privacy and security of data. When using Azure AI services, Microsoft may collect and store data to improve the session experience and supportability of models. However, customer data is anonymized and aggregated to protect individual privacy.
  • Microsoft does not use customer data for fine-tuning or customizing models for individual users.
  • Microsoft Responsible AI Standard (PDF Download)

Responsible AI

  • For building AI systems according to six principles:
    • Fairness and Inclusiveness
      • Make the same recommendations to everyone who has similar symptoms, financial circumstances, or professional qualifications.
    • Reliability and Safety
      • Operate as originally designed, respond safely to unanticipated conditions, and resist harmful manipulation.
    • Privacy and Security
      • Restrict access to resources and operations by user account or group.
      • Restrict incoming and outgoing network communications.
      • Encrypt data in transit and at rest.
      • Scan for vulnerabilities.
      • Apply and audit configuration policies.
      • Microsoft has also created two open-source packages that can enable further implementation of privacy and security principles: SmartNoise and Counterfit
    • Transparency and Accountability
      • The model interpretability component provides multiple or global, local, and model explanations/views into a model’s behavior.
      • The people who design and deploy AI systems must be accountable for how their systems operate.

SECURITY AND PRIVACY

  • Azure OpenAI Service automatically encrypts your data when it’s persisted to the cloud, using FIPS 140-2 compliant 256-bit AES encryption.
  • By default, Microsoft-managed encryption keys are used, but you also have the option to use customer-managed keys (CMK) for greater control over encryption key management.
  • The Files API allows customers to upload their training data stored in Azure Storage, within the same region as the resource and logically isolated with their Azure subscription and API Credentials. Uploaded files can be deleted by the user via the DELETE API operation.
  • 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.
    • Azure OpenAI Service contains neural multi-class classification models aimed at detecting and filtering harmful content; the models cover
      • four categories: hate, sexual, violence, and self-harm across
      • four severity levels: safe, low, medium, and high.
    • The default content filtering is default to filter at the medium severity threshold for all four content harm categories for both prompts and completions. That means that content that is detected at severity level medium or high is filtered, while content detected at severity level low is not filtered by the content filters. The configurability feature is available in preview and allows customers to adjust the settings, separately for prompts and completions, to filter content for each content category at different severity levels.

AZURE OPENAI MODELS

Azure OpenAI provides access to models with various capabilities. The following is a list of the models and their descriptions:

  • GPT-4 (8k/32k): A set of models that improve on GPT-3.5 and can understand as well as generate natural language and code.
  • GPT-3 (4k/16k): A series of models that can understand and generate natural language. This includes the new ChatGPT model.
  • DALL-E: A series of models that can generate original images from natural language.
  • Codex: A series of models that can understand and generate code, including translating natural language to code.
  • Embeddings: A set of models that can understand and use embeddings. An embedding is a special format of data representation that can be easily utilized by machine learning models and algorithms. The embedding is an information dense representation of the semantic meaning of a piece of text. Currently, we offer three families of Embeddings models for different functionalities: similarity, text search, and code search.

AZURE OPENAI ON YOUR DATA

With Azure OpenAI GPT-35-Turbo and GPT-4 models, enable them to provide responses based on your data. You can access Azure OpenAI on your data using a REST API or the web-based interface in the Azure OpenAI Studio to create a solution that connects to your data to enable an enhanced chat experience.

Per the document, Azure OpenAI on your data, Azure OpenAI Service supports the following file types:

File typeExtension
Text.txt
Markdown.md
HTML.html
Word.docx
PowerPoint.pptx
PDF.pdf
CSV.csv
TSV.tsv
Excel.xlsx
JSON.json
JSONL.jsonl

QUICKSTART

Previous models were text-in and text-out, meaning they accepted a prompt string and returned a completion to append to the prompt. However, the GPT-35-Turbo and GPT-4 models are conversation-in and message-out.

TRAIN MODEL

TOKEN

  • 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 a 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 quantity of tokens being processed will also affect your response latency and throughput for the models.

Azure OpenAI Pricing

  • Pricing will be based on the pay-as-you-go consumption model with a price per unit for each model, which is similar to other Azure AI Services pricing models.

Azure Service Availability

  • SLA: This describes Microsoft’s commitments for uptime and connectivity for Microsoft Online Services covering Azure, Dynamics 365, Office 365, and Intune.

Quota and Limits

PLAYGROUND

The system role also known as the system message is included at the beginning of the array. This message provides the initial instructions to the model. You can provide various information in the system role including:

  • A brief description of the assistant
  • Personality traits of the assistant
  • Instructions or rules you would like the assistant to follow
  • Data or information needed for the model, such as relevant questions from an FAQ

You can customize the system role for your use case or just include basic instructions. The system role/message is optional, but it’s recommended to at least include a basic one to get the best results.

Azure OpenAI Is Ready, Are You?

Azure OpenAI can be utilized for a wide range of tasks that cater to both business and technical requirements. It offers various capabilities, including but not limited to:

Content Generation: Azure OpenAI can generate high-quality and coherent text content for a variety of purposes, such as writing articles, product descriptions, marketing materials, and more. It can help automate content creation and save time and effort.

Summarization: With Azure OpenAI, you can extract key information and generate concise summaries from large volumes of text. This can be particularly useful for processing lengthy documents, news articles, research papers, or any content that requires distilling important points.

Semantic Search: Azure OpenAI enables semantic search capabilities, allowing you to perform more advanced and accurate searches based on the meaning and context of the query. This can improve search results by understanding the intent behind the search terms, resulting in more relevant and targeted information retrieval.

Natural Language to Code Translation: Azure OpenAI can assist in translating natural language queries or instructions into executable code. This feature can be helpful for developers and non-technical users alike, allowing them to express their requirements in plain language and receive code snippets or solutions that align with their intentions.

In summary, Azure OpenAI offers a powerful suite of tools for content generation, summarization, semantic search, and translating natural language to code. It empowers businesses and individuals to leverage advanced AI capabilities to automate tasks, enhance productivity, and unlock new possibilities in various domains.

Here’s how to start using Azure OpenAI services:

TaskDescription
Accessing Azure OpenAITo access Azure OpenAI, you need to create an Azure subscription and apply for access to the Azure OpenAI service by completing the form at https://aka.ms/oai/access
Azure OpenAI StudioAzure OpenAI provides a web-based interface in the Azure OpenAI Studio to access OpenAI’s powerful language models including the GPT-3, Codex and Embeddings model series.
Python SDKAzure OpenAI provides a Python SDK to access the service.
Quotas and LimitsAzure OpenAI has certain quotas and limits that apply to the service, such as the number of requests per second per deployment and the total number of training jobs per resource.
Business Continuity and Disaster Recovery (BCDR)Azure OpenAI provides BCDR considerations for implementing BCDR with Azure OpenAI.

References:

  1. Quickstart – Deploy a model and generate text using Azure OpenAI Service
  2. How to customize a model with Azure OpenAI Service
  3. What’s new in Azure OpenAI Service? – Azure Cognitive Services
  4. Business Continuity and Disaster Recovery (BCDR) with Azure OpenAI Service