Skip to content

Commit 5127caf

Browse files
authored
Merge pull request #64 from MicrosoftDocs/main
8/30/2024 AM Publish
2 parents 83a7054 + d5d3dc4 commit 5127caf

File tree

25 files changed

+287
-105
lines changed

25 files changed

+287
-105
lines changed

articles/ai-services/openai/concepts/fine-tuning-considerations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn more about what you should take into consideration before fin
55
manager: nitinme
66
ms.service: azure-ai-openai
77
ms.topic: conceptual
8-
ms.date: 10/23/2023
8+
ms.date: 08/29/2024
99
author: mrbullwinkle
1010
ms.author: mbullwin
1111
recommendations: false
@@ -79,7 +79,7 @@ Even with a great use case, fine-tuning is only as good as the quality of the da
7979

8080
Another important point is even with high quality data if your data isn't in the necessary format for fine-tuning you'll need to commit engineering resources in order to properly format the data.
8181

82-
| Data | Babbage-002 & Davinci-002 | GPT-3.5-Turbo |
82+
| Data | Babbage-002 <br> Davinci-002 | GPT-3.5-Turbo <br> GPT-4o & GPT-4o mini <br> GPT-4 |
8383
|---|---|---|
8484
| Volume | Thousands of Examples | Thousands of Examples |
8585
| Format | Prompt/Completion | Conversational Chat |

articles/ai-services/openai/concepts/prompt-engineering.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ titleSuffix: Azure OpenAI
44
description: Learn how to use prompt engineering to optimize your work with Azure OpenAI Service.
55
ms.service: azure-ai-openai
66
ms.topic: conceptual
7-
ms.date: 03/29/2024
7+
ms.date: 08/29/2024
88
ms.custom: references_regions, build-2023, build-2023-dataai
99
manager: nitinme
1010
author: mrbullwinkle
@@ -14,7 +14,7 @@ recommendations: false
1414

1515
# Introduction to prompt engineering
1616

17-
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.
17+
GPT-3, GPT-3.5, GPT-4, and GPT-4o 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.
1818

1919
While these models are extremely powerful, their behavior is also very sensitive to the prompt. This makes prompt construction an important skill to develop.
2020

@@ -24,7 +24,7 @@ Prompt construction can be difficult. In practice, the prompt acts to configure
2424

2525
This section covers the basic concepts and elements of GPT prompts.
2626

27-
Text prompts are how users interact with GPT models. As with all generative language models, GPT models attempt to produce the next series of words that are most likely to follow from the previous text. It's as if we're saying *What is the first thing that comes to your mind when I say `<prompt>`?*. The examples below demonstrate this behavior. Given the first words of famous content, the model is able to accurately continue the text.
27+
Text prompts are how users interact with GPT models. As with all generative language models, GPT models attempt to produce the next series of words that are most likely to follow from the previous text. It's as if we're saying *What is the first thing that comes to your mind when I say `<prompt>`?* The examples below demonstrate this behavior. Given the first words of famous content, the model is able to accurately continue the text.
2828

2929
| Prompt |Completion |
3030
|------------------------------------|-----------|

articles/ai-services/openai/how-to/chatgpt.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ manager: nitinme
1212
keywords: ChatGPT
1313
---
1414

15-
# Work with the GPT-3.5-Turbo and GPT-4 models
15+
# Work with the GPT-3.5-Turbo, GPT-4 models, and GPT-4o models
1616

17-
The GPT-3.5-Turbo and GPT-4 models are language models that are optimized for conversational interfaces. The models behave differently than the older GPT-3 models. Previous models were text-in and text-out, which means they accepted a prompt string and returned a completion to append to the prompt. However, the GPT-3.5-Turbo and GPT-4 models are conversation-in and message-out. The models expect input formatted in a specific chat-like transcript format. They return a completion that represents a model-written message in the chat. This format was designed specifically for multi-turn conversations, but it can also work well for nonchat scenarios.
17+
GPT-3.5-Turbo, GPT-4, and GPT-4o series models are language models that are optimized for conversational interfaces. The models behave differently than the older GPT-3 models. Previous models were text-in and text-out, which means they accepted a prompt string and returned a completion to append to the prompt. However, the latest models are conversation-in and message-out. The models expect input formatted in a specific chat-like transcript format. They return a completion that represents a model-written message in the chat. This format was designed specifically for multi-turn conversations, but it can also work well for nonchat scenarios.
1818

19-
This article walks you through getting started with the GPT-3.5-Turbo and GPT-4 models. To get the best results, use the techniques described here. Don't try to interact with the models the same way you did with the older model series because the models are often verbose and provide less useful responses.
19+
This article walks you through getting started with chat completions models. To get the best results, use the techniques described here. Don't try to interact with the models the same way you did with the older model series because the models are often verbose and provide less useful responses.
2020

2121
[!INCLUDE [Chat Completions](../includes/chat-completion.md)]

articles/ai-services/openai/how-to/completions.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ description: Learn how to generate or manipulate text, including code by using a
66
manager: nitinme
77
ms.service: azure-ai-openai
88
ms.topic: how-to
9-
ms.date: 08/15/2023
10-
author: ChrisHMSFT
11-
ms.author: chrhoder
9+
ms.date: 08/29/2024
10+
author: mrbullwinkle
11+
ms.author: mbullwin
1212
recommendations: false
1313

1414
---
@@ -17,6 +17,9 @@ recommendations: false
1717

1818
Azure OpenAI Service provides a **completion endpoint** that can be used for a wide variety of tasks. The endpoint supplies a simple yet powerful text-in, text-out interface to any [Azure OpenAI model](../concepts/models.md). To trigger the completion, you input some text as a prompt. The model generates the completion and attempts to match your context or pattern. Suppose you provide the prompt "As Descartes said, I think, therefore" to the API. For this prompt, Azure OpenAI returns the completion endpoint " I am" with high probability.
1919

20+
> [!IMPORTANT]
21+
> Unless you have a specific use case that requires the completions endpoint, we recommend instead using the [chat completions endpoint](./chatgpt.md) which allows you to take advantage of the latest models like GPT-4o, GPT-4o mini, and GPT-4 Turbo.
22+
2023
The best way to start exploring completions is through the playground in [Azure OpenAI Studio](https://oai.azure.com). It's a simple text box where you enter a prompt to generate a completion. You can start with a simple prompt like this one:
2124

2225
```console

articles/ai-services/openai/how-to/embeddings.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ manager: nitinme
77
ms.service: azure-ai-openai
88
ms.custom: devx-track-python
99
ms.topic: how-to
10-
ms.date: 01/16/2024
10+
ms.date: 08/29/2024
1111
author: mrbullwinkle
1212
ms.author: mbullwin
1313
recommendations: false
@@ -16,7 +16,6 @@ recommendations: false
1616

1717
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. Each embedding is a vector of floating point numbers, such that the distance between two embeddings in the vector space is correlated with semantic similarity between two inputs in the original format. For example, if two texts are similar, then their vector representations should also be similar. Embeddings power vector similarity search in Azure Databases such as [Azure Cosmos DB for MongoDB vCore](/azure/cosmos-db/mongodb/vcore/vector-search) , [Azure SQL Database](/azure/azure-sql/database/ai-artificial-intelligence-intelligent-applications?view=azuresql&preserve-view=true#vector-search) or [Azure Database for PostgreSQL - Flexible Server](/azure/postgresql/flexible-server/how-to-use-pgvector).
1818

19-
2019
## How to get embeddings
2120

2221
To obtain an embedding vector for a piece of text, we make a request to the embeddings endpoint as shown in the following code snippets:
@@ -37,13 +36,13 @@ from openai import AzureOpenAI
3736

3837
client = AzureOpenAI(
3938
api_key = os.getenv("AZURE_OPENAI_API_KEY"),
40-
api_version = "2024-02-01",
39+
api_version = "2024-06-01",
4140
azure_endpoint =os.getenv("AZURE_OPENAI_ENDPOINT")
4241
)
4342

4443
response = client.embeddings.create(
4544
input = "Your text string goes here",
46-
model= "text-embedding-ada-002"
45+
model= "text-embedding-3-large"
4746
)
4847

4948
print(response.model_dump_json(indent=2))
@@ -59,7 +58,7 @@ import openai
5958
openai.api_type = "azure"
6059
openai.api_key = YOUR_API_KEY
6160
openai.api_base = "https://YOUR_RESOURCE_NAME.openai.azure.com"
62-
openai.api_version = "2024-02-01"
61+
openai.api_version = "2024-06-01"
6362

6463
response = openai.Embedding.create(
6564
input="Your text string goes here",
@@ -83,7 +82,7 @@ OpenAIClient openAIClient = new (oaiEndpoint, credentials);
8382

8483
EmbeddingsOptions embeddingOptions = new()
8584
{
86-
DeploymentName = "text-embedding-ada-002",
85+
DeploymentName = "text-embedding-3-large",
8786
Input = { "Your text string goes here" },
8887
};
8988

articles/ai-services/openai/how-to/role-based-access-control.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: mrbullwinkle
77
manager: nitinme
88
ms.service: azure-ai-language
99
ms.topic: how-to
10-
ms.date: 04/03/2024
10+
ms.date: 08/29/2024
1111
ms.author: mbullwin
1212
recommendations: false
1313
---

articles/ai-services/openai/how-to/switching-endpoints.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ metadata:
77
author: mrbullwinkle
88
ms.author: mbullwin
99
manager: nitinme
10-
ms.date: 02/16/2024
10+
ms.date: 08/29/2024
1111
ms.service: azure-ai-openai
1212
ms.topic: how-to
1313
ms.custom:
@@ -55,7 +55,7 @@ procedureSection:
5555
5656
client = AzureOpenAI(
5757
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
58-
api_version="2023-12-01-preview",
58+
api_version="2024-07-01-preview",
5959
azure_endpoint=os.getenv("AZURE_OPENAI_ENDPOINT")
6060
)
6161
```
@@ -103,7 +103,7 @@ procedureSection:
103103
DefaultAzureCredential(), "https://cognitiveservices.azure.com/.default"
104104
)
105105
106-
api_version = "2023-12-01-preview"
106+
api_version = "2024-07-01-preview"
107107
endpoint = "https://my-resource.openai.azure.com"
108108
109109
client = AzureOpenAI(
@@ -139,12 +139,12 @@ procedureSection:
139139
)
140140
141141
chat_completion = client.chat.completions.create(
142-
model="gpt-4",
142+
model="gpt-4o",
143143
messages="<messages>"
144144
)
145145
146146
embedding = client.embeddings.create(
147-
model="text-embedding-ada-002",
147+
model="text-embedding-3-large",
148148
input="<input>"
149149
)
150150
```
@@ -159,12 +159,12 @@ procedureSection:
159159
)
160160
161161
chat_completion = client.chat.completions.create(
162-
model="gpt-35-turbo", # model = "deployment_name".
162+
model="gpt-4o", # model = "deployment_name".
163163
messages="<messages>"
164164
)
165165
166166
embedding = client.embeddings.create(
167-
model="text-embedding-ada-002", # model = "deployment_name".
167+
model="text-embedding-3-large", # model = "deployment_name".
168168
input="<input>"
169169
)
170170
```
@@ -190,7 +190,7 @@ procedureSection:
190190
191191
embedding = client.embeddings.create(
192192
input=inputs,
193-
model="text-embedding-ada-002"
193+
model="text-embedding-3-large"
194194
)
195195
196196
@@ -204,7 +204,7 @@ procedureSection:
204204
205205
embedding = client.embeddings.create(
206206
input=inputs,
207-
model="text-embedding-ada-002" # This must match the custom deployment name you chose for your model.
207+
model="text-embedding-3-large" # This must match the custom deployment name you chose for your model.
208208
# engine="text-embedding-ada-002"
209209
)
210210
@@ -215,7 +215,7 @@ procedureSection:
215215
</table>
216216
217217
relatedContent:
218-
- text: Learn more about how to work with GPT-35-Turbo and the GPT-4 models with our how-to guide
218+
- text: Learn more about how to work with chat completions models with our how-to guide
219219
url: ../how-to/chatgpt.md
220220
- text: For more examples, check out the Azure OpenAI Samples GitHub repository
221221
url: https://aka.ms/AOAICodeSamples

articles/ai-services/openai/how-to/working-with-models.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ titleSuffix: Azure OpenAI
44
description: Learn about managing model deployment life cycle, updates, & retirement.
55
ms.service: azure-ai-openai
66
ms.topic: conceptual
7-
ms.date: 06/18/2023
7+
ms.date: 08/29/2024
88
ms.custom: references_regions, build-2023, build-2023-dataai, devx-track-azurepowershell
99
manager: nitinme
1010
author: mrbullwinkle #ChrisHMSFT

articles/ai-services/openai/includes/chat-completion.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ author: mrbullwinkle #dereklegenzoff
66
ms.author: mbullwin #delegenz
77
ms.service: azure-ai-openai
88
ms.topic: include
9-
ms.date: 04/25/2024
9+
ms.date: 08/29/2024
1010
manager: nitinme
1111
keywords: ChatGPT
1212

1313
---
1414

15-
## Work with the GPT-3.5-Turbo and GPT-4 models
15+
## Work with chat completion models
1616

17-
The following code snippet shows the most basic way to use the GPT-3.5-Turbo and GPT-4 models with the Chat Completion API. If this is your first time using these models programmatically, we recommend that you start with the [GPT-3.5-Turbo and GPT-4 quickstart](../chatgpt-quickstart.md).
17+
The following code snippet shows the most basic way to interact with models that use the Chat Completion API. If this is your first time using these models programmatically, we recommend that you start with the [chat completions quickstart](../chatgpt-quickstart.md).
1818

1919
> [!NOTE]
2020
> In the Azure OpenAI documentation, we refer to GPT-3.5-Turbo and GPT-35-Turbo interchangeably. The official name of the model on OpenAI is `gpt-3.5-turbo`. For Azure OpenAI, because of Azure-specific character constraints, the underlying model name is `gpt-35-turbo`.

0 commit comments

Comments
 (0)