Skip to content

Commit 196e586

Browse files
committed
review edits, add legacy note, remove most screenshots
1 parent 8ad1ce9 commit 196e586

File tree

5 files changed

+9
-20
lines changed

5 files changed

+9
-20
lines changed

articles/ai-services/openai/how-to/integrate-synapseml.md

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.service: cognitive-services
88
ms.subservice: openai
99
ms.custom: build-2023, build-2023-dataai
1010
ms.topic: how-to
11-
ms.date: 08/30/2023
11+
ms.date: 09/01/2023
1212
author: ChrisHMSFT
1313
ms.author: chrhoder
1414
recommendations: false
@@ -26,14 +26,19 @@ This tutorial shows how to apply large language models at a distributed scale by
2626

2727
- Access granted to Azure OpenAI in your Azure subscription.
2828

29+
Currently, you must submit an application to access Azure OpenAI Service. To apply for access, complete <a href="https://aka.ms/oai/access" target="_blank">this form</a>. If you need assistance, open an issue on this repo to contact Microsoft.
30+
2931
- An Azure OpenAI resource. [Create a resource](create-resource.md?pivots=web-portal#create-a-resource).
3032

3133
- An Apache Spark cluster with SynapseML installed.
34+
3235
- Create a [serverless Apache Spark pool](../../../synapse-analytics/get-started-analyze-spark.md#create-a-serverless-apache-spark-pool).
3336
- To install SynapseML for your Apache Spark cluster, see [Install SynapseML](#install-synapseml).
3437

3538
> [!NOTE]
36-
> Currently, you must submit an application to access Azure OpenAI Service. To apply for access, complete <a href="https://aka.ms/oai/access" target="_blank">this form</a>. If you need assistance, open an issue on this repo to contact Microsoft.
39+
> This article is designed to work with the [Azure OpenAI Service legacy models](/azure/ai-services/openai/concepts/legacy-models) that support prompt-based completions like `Text-Davinci-003`. Newer models like the current `GPT-3.5 Turbo` and `GPT-4` model series are designed to work with the new chat completion API that expects a specially formatted array of messages as input.
40+
>
41+
> The Azure OpenAI SynapseML integration supports the latest models via the [OpenAIChatCompletion()](https://github.com/microsoft/SynapseML/blob/0836e40efd9c48424e91aa10c8aa3fbf0de39f31/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/openai/OpenAIChatCompletion.scala#L24) transformer, which isn't demonstrated in this article. After the [release of the GPT-3.5 Turbo Instruct model](https://techcommunity.microsoft.com/t5/azure-ai-services-blog/announcing-updates-to-azure-openai-service-models/ba-p/3866757), the newer model will be the preferred model to use with this article.
3742
3843
We recommend that you [create an Azure Synapse workspace](../../../synapse-analytics/get-started-create-workspace.md). However, you can also use Azure Databricks, Azure HDInsight, Spark on Kubernetes, or the Python environment with the `pyspark` package.
3944

@@ -223,10 +228,6 @@ completed_batch_df = batch_completion.transform(batch_df).cache()
223228
display(completed_batch_df)
224229
```
225230

226-
The following image shows example output with completions for multiple prompts in a request:
227-
228-
:::image type="content" source="../media/how-to/synapse-studio-request-batch-output.png" alt-text="Screenshot that shows completions for multiple prompts in a single request in Azure Synapse Analytics Studio." border="false":::
229-
230231
> [!NOTE]
231232
> There's currently a limit of 20 prompts in a single request and a limit of 2048 tokens, or approximately 1500 words.
232233
@@ -248,10 +249,6 @@ completed_autobatch_df = (df
248249
display(completed_autobatch_df)
249250
```
250251

251-
The following image shows example output for an automatic mini-batcher that transposes data to row format:
252-
253-
:::image type="content" source="../media/how-to/synapse-studio-transpose-data-output.png" alt-text="Screenshot that shows completions for an automatic mini-batcher in Azure Synapse Analytics Studio." border="false":::
254-
255252
### Prompt engineering for translation
256253

257254
Azure OpenAI can solve many different natural language tasks through _prompt engineering_. For more information, see [Learn how to generate or manipulate text](completions.md). In this example, you can prompt for language translation:
@@ -267,13 +264,9 @@ translate_df = spark.createDataFrame(
267264
display(completion.transform(translate_df))
268265
```
269266

270-
The following image shows example output for language translation prompts:
271-
272-
:::image type="content" source="../media/how-to/synapse-studio-language-translation-output.png" alt-text="Screenshot that shows completions for language translation prompts in Azure Synapse Analytics Studio." border="false":::
273-
274267
### Prompt for question answering
275268

276-
Azure OpenAI also supports prompting the GPT-3 model for general-knowledge question answering:
269+
Azure OpenAI also supports prompting the `Text-Davinci-003` model for general-knowledge question answering:
277270

278271
```python
279272
qa_df = spark.createDataFrame(
@@ -287,11 +280,7 @@ qa_df = spark.createDataFrame(
287280
display(completion.transform(qa_df))
288281
```
289282

290-
The following image shows example output for general-knowledge question answering:
291-
292-
:::image type="content" source="../media/how-to/synapse-studio-question-answer-output.png" alt-text="Screenshot that shows completions for general-knowledge question answering in Azure Synapse Analytics Studio." border="false":::
293-
294283
## Next steps
295284

296-
- Learn how to work with the [GPT-35-Turbo and GPT-4 models](/azure/ai-services/openai/how-to/chatgpt?pivots=programming-language-chat-completions).
285+
- Learn how to work with the [GPT-35 Turbo and GPT-4 models](/azure/ai-services/openai/how-to/chatgpt?pivots=programming-language-chat-completions).
297286
- Learn more about the [Azure OpenAI Service models](../concepts/models.md).
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)