Introduction

Azure OpenAI Service offers REST API access to OpenAI's advanced language models, including GPT-4, GPT-35-Turbo, and the Embeddings model series. These models are meant for specific purposes and assist in various ways to,

Users can access these services either as REST APIs or through SDKs available for Python, NodeJS, or a web-based interface accessible within the Azure OpenAI Studio platform.

Azure OpenAI Service Models

Some of the models are.

  1. GPT-3 (Generative Pre-trained Transformer 3): GPT-3 is a widely known language model capable of various natural language processing tasks, including text generation, translation, summarization, and more. GPT-3.5-Turbo is optimized for efficient and high-quality text generation tasks.
  2. GPT-4: An advanced version of GPT-3, offering improved performance and capabilities for natural language understanding and generation tasks.
  3. Embedding Models: These models are focused on generating high-quality textual embeddings or representations of text data. They are useful for tasks like similarity analysis and recommendation systems.
  4. Codex Models: The models used for synthesizing code with the given set of inputs. The inputs are accepted from the natural language and translated into the native code. Currently, code can be generated for Python, JavaScript, TypeScript, Ruby, Go, C#, and C++.
  5. Dall-e Models: Right now, the models are in preview mode, which is used for generating images from the natural language input.

Models are classified majorly into.

Nomenclature of model names

Azure OpenAI model names typically correspond to the following naming conventions.

{capability}-{family}-{inputy-type}-{identifier/version}

{text}-{embedding}-{ada}-{002}

Difference between Azure OpenAI and OpenAI

  1. Azure OpenAI Service is offered only to businesses with advanced models with the security and enterprise-grade Azure Services
  2. Azure OpenAI jointly develops the APIs and builds models with OpenAI and hosts the models in the Azure cloud, so the transition will be seamless.
  3. Azure OpenAI also ensures Azure customers with private networking, regional availability, and responsible AI content filtering.

Key Terminologies


Prompts

The prompt is essentially a predefined instruction or question given to the model to elicit a specific type of response. It can be a text string or a series of text that sets the context or provides guidance for the model.

Example. "Write a short story about a detective solving a mysterious murder case in a small town."

Along with the context we set, the model has to write a story as defined in the prompt above.

Completion

Completion refers to the output or response generated by the model when given a prompt or input. With a given prompt to the model, it processes the input and generates a text completion that follows the context or instruction provided in the prompt.

Example. Complete the following sentence: 'The sun is shining, the birds are singing, and the flowers are blooming...'

The model would generate a completion to finish the sentence based on the context provided in the prompt. The completion might be something like:

Example. The sun is shining, the birds are singing, and the flowers are blooming in the vibrant garden.

In this case, the generated text, "in the vibrant garden," completes the sentence and is referred to as the "completion."

Tokens

A token is a fundamental unit of text that the model reads and processes. Tokens can be as short as one character or as long as one word in English, but they can vary in length in other languages. Tokens serve several important purposes:

Prompt Engineering

Prompt engineering refers to the process of carefully crafting and optimizing prompts or inputs given to a language model to achieve desired outputs or responses. It involves tailoring the instructions, format, and content of the prompt to guide the model in producing accurate, relevant, and high-quality responses. Prompt engineering is especially crucial when working with AI models for various natural language processing tasks. Key aspects of prompt engineering include:

While constructing a prompt, keep this formula in mind.

Context + Specificity + Intent + Format

LLM

A large language model, abbreviated as LLM, is a category of machine learning model with the capability to undertake a range of natural language processing (NLP) activities. These activities comprise of tasks such as text generation and categorization, engaging in natural conversational question-answering, and availing language translation from one language to another.

Responsible AI

Responsible AI, also known as Ethical AI or AI Ethics, refers to the practice of designing, developing, and deploying artificial intelligence systems in a way that aligns with ethical and moral principles, respects human rights, and minimizes potential negative impacts on society. Responsible AI is a framework and set of guidelines aimed at ensuring that AI technologies are used in a manner that ensures the following aspects for the benefit of all the stakeholders.

Availability

As part of Microsoft’s commitment to responsible AI, Azure OpenAI is not readily available to all businesses, it is limited, and businesses must submit a form to Microsoft for initial experimentation and approval for moving to production. Additionally, registration is required if the business wants to modify content filters or modify abuse monitoring settings.