Skip to content

Port to gpt-4o-mini as default #2443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 24, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ This template, the application code and configuration it contains, has been buil

[📺 Watch a video overview of the app.](https://youtu.be/3acB0OWmLvM)

This sample demonstrates a few approaches for creating ChatGPT-like experiences over your own data using the Retrieval Augmented Generation pattern. It uses Azure OpenAI Service to access a GPT model (gpt-35-turbo), and Azure AI Search for data indexing and retrieval.
This sample demonstrates a few approaches for creating ChatGPT-like experiences over your own data using the Retrieval Augmented Generation pattern. It uses Azure OpenAI Service to access a GPT model (gpt-4o-mini), and Azure AI Search for data indexing and retrieval.

The repo includes sample data so it's ready to try end to end. In this sample application we use a fictitious company called Contoso Electronics, and the experience allows its employees to ask questions about the benefits, internal policies, as well as job descriptions and roles.

Expand Down
2 changes: 1 addition & 1 deletion docs/deploy_existing.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ You should set these values before running `azd up`. Once you've set them, retur
1. Run `azd env set AZURE_OPENAI_RESOURCE_GROUP {Name of existing resource group that OpenAI service is provisioned to}`
1. Run `azd env set AZURE_OPENAI_LOCATION {Location of existing OpenAI service}`
1. Run `azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT {Name of existing chat deployment}`. Only needed if your chat deployment is not the default 'chat'.
1. Run `azd env set AZURE_OPENAI_CHATGPT_MODEL {Model name of existing chat deployment}`. Only needed if your chat model is not the default 'gpt-35-turbo'.
1. Run `azd env set AZURE_OPENAI_CHATGPT_MODEL {Model name of existing chat deployment}`. Only needed if your chat model is not the default 'gpt-4o-turbo'.
1. Run `azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_VERSION {Version string for existing chat deployment}`. Only needed if your chat deployment model version is not the default '0125'. You definitely need to change this if you changed the model.
1. Run `azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_SKU {Name of SKU for existing chat deployment}`. Only needed if your chat deployment SKU is not the default 'Standard', like if it is 'GlobalStandard' instead.
1. Run `azd env set AZURE_OPENAI_EMB_DEPLOYMENT {Name of existing embedding deployment}`. Only needed if your embeddings deployment is not the default 'embedding'.
Expand Down
66 changes: 38 additions & 28 deletions docs/deploy_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
This document covers optional features that can be enabled in the deployed Azure resources.
You should typically enable these features before running `azd up`. Once you've set them, return to the [deployment steps](../README.md#deploying).

* [Using GPT-4](#using-gpt-4)
* [Using different chat completion models](#using-different-chat-completion-models)
* [Using text-embedding-3 models](#using-text-embedding-3-models)
* [Enabling GPT-4 Turbo with Vision](#enabling-gpt-4-turbo-with-vision)
* [Enabling media description with Azure Content Understanding](#enabling-media-description-with-azure-content-understanding)
Expand All @@ -21,15 +21,11 @@ You should typically enable these features before running `azd up`. Once you've
* [Deploying with private endpoints](#deploying-with-private-endpoints)
* [Using local parsers](#using-local-parsers)

## Using GPT-4
## Using different chat completion models

(Instructions for **GPT-4**, **GPT-4o**, and **GPT-4o mini** models are also included here.)
As of late March 2025, the default chat completion model is `gpt-4o-mini`. If you deployed this sample before that date, the default model is `gpt-3.5-turbo`. You can change the chat completion model to any Azure OpenAI chat model that's available in your Azure OpenAI resource region by following these steps:

We generally find that most developers are able to get high-quality answers using GPT-3.5. However, if you want to try GPT-4, GPT-4o, or GPT-4o mini, you can do so by following these steps:

Execute the following commands inside your terminal:

1. To set the name of the deployment, run this command with a unique name in your Azure OpenAI account. You can use any deployment name, as long as it's unique in your Azure OpenAI account.
1. To set the name of the deployment, run this command with a unique name in your Azure OpenAI account. You can use any deployment name, as long as it's unique in your Azure OpenAI account. For convenience, many developers use the same deployment name as the model name, but this is not required.

```bash
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT <your-deployment-name>
Expand All @@ -38,10 +34,10 @@ Execute the following commands inside your terminal:
For example:

```bash
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT chat4
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT gpt-4o
```

1. To set the GPT model name to a **gpt-4**, **gpt-4o**, or **gpt-4o mini** version from the [available models](https://learn.microsoft.com/azure/ai-services/openai/concepts/models), run this command with the appropriate GPT model name.
1. To set the GPT model to a different [available model](https://learn.microsoft.com/azure/ai-services/openai/concepts/models), run this command with the appropriate model name.

For GPT-4:

Expand All @@ -61,19 +57,14 @@ Execute the following commands inside your terminal:
azd env set AZURE_OPENAI_CHATGPT_MODEL gpt-4o-mini
```

1. To set the Azure OpenAI deployment SKU name, run this command with [the desired SKU name](https://learn.microsoft.com/azure/ai-services/openai/how-to/deployment-types#deployment-types).
For gpt-3.5-turbo:

```bash
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_SKU GlobalStandard
azd env set AZURE_OPENAI_CHATGPT_MODEL gpt-35-turbo
```

1. To set the Azure OpenAI deployment capacity, run this command with the desired capacity.

```bash
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_CAPACITY 10
```

1. To set the Azure OpenAI deployment version from the [available versions](https://learn.microsoft.com/azure/ai-services/openai/concepts/models), run this command with the appropriate version.
1. To set the Azure OpenAI model version from the [available versions](https://learn.microsoft.com/azure/ai-services/openai/concepts/models), run this command with the appropriate version string.

For GPT-4:

Expand All @@ -93,23 +84,42 @@ Execute the following commands inside your terminal:
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_VERSION 2024-07-18
```

For gpt-3.5-turbo:

```bash
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_VERSION 0125
```

1. To set the Azure OpenAI deployment SKU name, run this command with [the desired SKU name](https://learn.microsoft.com/azure/ai-services/openai/how-to/deployment-types#deployment-types).

For GlobalStandard:

```bash
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_SKU GlobalStandard
```

For Standard:

```bash
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_SKU Standard
```

1. To set the Azure OpenAI deployment capacity (TPM, measured in thousands of tokens per minute), run this command with the desired capacity. This is not necessary if you are using the default capacity of 30.

```bash
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_CAPACITY 20
```

1. To update the deployment with the new parameters, run this command.

```bash
azd up
```

This process does *not* delete your previous model deployment. If you want to delete previous deployments, go to your Azure OpenAI resource in Azure AI Foundry and delete it there.

> [!NOTE]
> To revert back to GPT 3.5, run the following commands:
>
> * `azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT chat` to set the name of your old GPT 3.5 deployment.
> * `azd env set AZURE_OPENAI_CHATGPT_MODEL gpt-35-turbo` to set the name of your old GPT 3.5 model.
> * `azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_CAPACITY 30` to set the capacity of your old GPT 3.5 deployment.
> * `azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_SKU Standard` to set the Sku name back to Standard.
> * `azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_VERSION 0125` to set the version number of your old GPT 3.5.
> * `azd up` to update the provisioned resources.
>
> Note that this does not delete your GPT-4 deployment; it just makes your application create a new or reuse an old GPT 3.5 deployment. If you want to delete it, you can go to your Azure OpenAI studio and do so.
> To revert back to a previous model, run the same commands with the previous model name and version.

## Using text-embedding-3 models

Expand Down
4 changes: 2 additions & 2 deletions docs/gpt4v.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ For more details on how this feature works, read [this blog post](https://techco
* The ability to deploy a gpt-4o model in the [supported regions](https://learn.microsoft.com/azure/ai-services/openai/concepts/models#standard-deployment-model-availability). If you're not sure, try to create a gpt-4o deployment from your Azure OpenAI deployments page.
* Ensure that you can deploy the Azure OpenAI resource group in [a region where all required components are available](https://learn.microsoft.com/azure/cognitive-services/openai/concepts/models#model-summary-table-and-region-availability):
* Azure OpenAI models
* gpt-35-turbo
* gpt-4o-mini
* text-embedding-ada-002
* gpt-4o
* gpt-4o (for vision/evaluation features)
* [Azure AI Vision](https://learn.microsoft.com/azure/ai-services/computer-vision/)

### Deployment
Expand Down
Loading