AJ ZAFAR

Architecting intelligence. Delivering impact.

Azure4 min read

GPT-4 and the ChatGPT model arrive in Azure OpenAI Service

GPT-4 is now in preview in Azure OpenAI Service, alongside the ChatGPT model and a new Chat Completions API. Pricing, access and what I would plan for in 2023.

The ChatGPT playground in Azure OpenAI Studio with a system message, a chat session panel and model settings for a gpt-35-turbo deployment

It has been a busy few weeks. On 21 March Microsoft announced that GPT-4 is available in preview in Azure OpenAI Service. The same wave of updates also covers the ChatGPT model (gpt-35-turbo) in the service. For anyone building on Azure, this is the moment the conversation moves from “can we try ChatGPT?” to “how do we build with it properly inside our own tenant?”.

What was announced

GPT-4 in preview. Existing Azure OpenAI Service customers can apply for access to GPT-4. There are two variants: gpt-4 with an 8k token context and gpt-4-32k with a 32k context. Both are in limited preview, while gpt-35-turbo is available to all approved customers.

Pricing. Billing for GPT-4 starts on 1 April 2023. The published prices are:

  • 8k context: $0.03 per 1,000 prompt tokens and $0.06 per 1,000 completion tokens.
  • 32k context: $0.06 per 1,000 prompt tokens and $0.12 per 1,000 completion tokens.

Note that prompt and completion tokens are priced differently, which matters when you are sending long documents in the prompt.

A new Chat Completions API. The team also introduced the Chat Completions API, in preview with API version 2023-03-15-preview. Instead of one long text prompt, you send an array of messages, each with a role (system, user or assistant) and content. If you prefer the older completions API, you can use Chat Markup Language (ChatML) to format the conversation yourself, but the new API is the easier path.

Model versions. The current versions are 0301 for the ChatGPT model and 0314 for GPT-4. Both are due to be deprecated on 1 August 2023, and Microsoft has said a “latest” option is coming so you can track the newest version automatically.

Tooling and samples. There is a new Chat playground in Azure OpenAI Studio, and sample code to get started, including a demo that combines Azure OpenAI Service with Azure Cognitive Search to chat over your own documents.

Azure OpenAI Studio get started page with buttons for the GPT-3 playground and the ChatGPT playground in preview, plus example cards for summarising text, classifying text, natural language to SQL and generating product names
Azure OpenAI Studio now offers a ChatGPT playground in preview alongside the GPT-3 playground.Image: Microsoft Learn (CC BY 4.0)
ChatGPT playground showing an assistant setup area with a system message, a chat session panel, and settings for a gpt-35-turbo deployment including max response, temperature, top P and past messages included
The playground lets you shape the system message and tune parameters before you write any code.Image: Microsoft Learn (CC BY 4.0)

What it means for organisations

For a lot of my clients, the big draw of Azure OpenAI Service over public tools is that it runs in Azure, under an agreement they already have, with the networking and identity controls they already understand. GPT-4 arriving there makes that case stronger.

A few practical things stand out to me:

  • Access is gated. You need an approved Azure OpenAI Service resource first, then a separate application for GPT-4. Build that lead time into any plan.
  • Cost modelling is now a design task. With per token pricing and different rates for prompt and completion, the shape of your prompts drives the bill. Grounding a chat on large documents with the 32k model can get expensive quickly. I would estimate token usage for a realistic workload before promising anything to the business.
  • Plan for model change. With 0301 and 0314 both deprecating on 1 August, any app you build now will need to move to a newer version within months. Keep the deployment name and API version in configuration, not hard coded, and have a simple regression test of your prompts.
  • Retrieval patterns matter. The Azure Cognitive Search sample is the pattern I expect most enterprise use cases to follow: keep your documents in a search index, retrieve the relevant parts, and pass them to the model. That keeps answers grounded in your content and keeps prompts smaller.
  • Governance. Decide who can create Azure OpenAI Service resources, which subscriptions they live in, and how you will log and review usage. It is much easier to set this up at the start.

Microsoft also mentioned Copilot in Power Virtual Agents in the same announcement, so expect these models to show up inside low code tools as well as in custom apps.

What I would do now

↑↓ navigateEnter openEsc close