Skip to content

Commit 40b331d

Browse files
authored
Merge pull request #261010 from PatrickFarley/openai-on-data
Openai on data
2 parents 548ddbd + 60335cf commit 40b331d

8 files changed

+44
-41
lines changed

articles/ai-services/openai/concepts/use-your-image-data.md

Lines changed: 44 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@ Use this article to learn how to provide your own image data for GPT-4 Turbo wit
2828
- An Azure OpenAI resource with the GPT-4 Turbo with Vision model deployed. For more information about model deployment, see the [resource deployment guide](../how-to/create-resource.md).
2929
- Be sure that you're assigned at least the [Cognitive Services Contributor role](../how-to/role-based-access-control.md#cognitive-services-contributor) for the Azure OpenAI resource.
3030

31-
## Data formats and file types
32-
33-
The following file types are supported:
34-
* .jpg
35-
* .png
36-
* .gif
37-
* .bmp
38-
* .tiff
39-
4031
## Add your data source
4132

4233
Navigate to [Azure OpenAI Studio](https://oai.azure.com/) and sign-in with credentials that have access to your Azure OpenAI resource. During or after the sign-in workflow, select the appropriate directory, Azure subscription, and Azure OpenAI resource.
@@ -45,36 +36,42 @@ Navigate to [Azure OpenAI Studio](https://oai.azure.com/) and sign-in with c
4536

4637
On the **Assistant setup** tile, select **Add your data (preview)** > **+ Add a data source**.
4738

48-
:::image type="content" source="../media/quickstarts/chatgpt-playground-add-your-data.png" alt-text="A screenshot showing the button for adding your data in Azure OpenAI Studio." lightbox="../media/quickstarts/chatgpt-playground-add-your-data.png":::
49-
39+
:::image type="content" source="../media/use-your-image-data/chatgpt-playground-add-your-data.png" alt-text="A screenshot showing the button for adding your data in Azure OpenAI Studio." lightbox="../media/use-your-image-data/chatgpt-playground-add-your-data.png":::
5040

5141
In the pane that appears after you select **Add a data source**, you'll see multiple options to select a data source.
5242

5343
:::image type="content" source="../media/use-your-image-data/select-add-data-source.png" alt-text="A screenshot showing the data source selection." lightbox="../media/use-your-image-data/select-add-data-source.png":::
5444

5545
You have three different options to add your data for GPT-4 Turbo with Vision’s data source:
5646

57-
* Using [Azure Blob Storage](/azure/storage/blobs/storage-blobs-introduction)
58-
* Using [Azure AI Search](/azure/search/search-what-is-azure-search)
59-
* Uploading your image files and image metadata
47+
* Using [your own image files and image metadata](#add-your-data-by-uploading-files)
48+
* Using [Azure AI Search](#add-your-data-using-azure-ai-search)
49+
* Using [Azure Blob Storage](#add-your-data-using-azure-blob-storage)
6050

6151
All three options use Azure AI Search index to do image-to-image search and retrieve the top search results for your input prompt image. For Azure Blob Storage and Upload files options, Azure OpenAI will generate an image search index for you. For Azure AI Search, you need to have an image search index. The following sections contain details on how to create the search index.
6252

63-
## Add your data by uploading files
53+
When using these options for the first time, you might see this red notice asking you to turn on Cross-origin resource sharing (CORS). This is a notice asking you to enable CORS, so that Azure OpenAI can access your blob storage account. To fix the warning, select **Turn on CORS**.
6454

65-
You can manually upload your image files and enter metadata of them manually, using the Azure OpenAI. This is especially useful if you are experimenting with a small set of images and would like to build your data source.
6655

67-
1. Navigate to the **Select a data source** button in Azure OpenAI as [described above](#add-your-data-source). Select **Upload files**.
56+
## Add your data by uploading files
6857

69-
1. If you have not enabled CORS yet, you might see this red notice asking you to turn on CORS. For Azure OpenAI to access your blob storage account, you need to turn on Cross-origin resource sharing (CORS). If [CORS](#turn-on-cors) isn't already turned on for your resource, you will see a warning. To fix the warning, select **Turn on CORS**.
58+
You can manually upload your image files and enter metadata of them manually, using Azure OpenAI. This is especially useful if you are experimenting with a small set of images and would like to build your data source.
7059

60+
1. Navigate to the **Select a data source** button in Azure OpenAI as [described above](#add-your-data-source). Select **Upload files**.
7161

7262
1. Select your subscription. Select an Azure Blob storage to which your uploaded image files will be stored to. Select an Azure AI Search resource in which your new image search index will be created. Enter the image search index name of your choice.
7363

7464
Once you have filled out all the fields, check the two boxes at the bottom acknowledging the incurring usage, and select **Next**.
7565

7666
:::image type="content" source="../media/use-your-image-data/completed-data-source-file-upload.png" alt-text="A screenshot showing the completed fields for Azure Blob storage." lightbox="../media/use-your-image-data/completed-data-source-file-upload.png":::
7767

68+
The following file types are supported for your image files:
69+
* .jpg
70+
* .png
71+
* .gif
72+
* .bmp
73+
* .tiff
74+
7875
1. Select **Browse for a file** to select image files you would like to use from your local directory.
7976

8077
1. Once you select your image files, you'll see the image files selected in the right table. Select **Upload files**. Once you have uploaded the files, you'll see the status for each is **Uploaded**. Select **Next**.
@@ -87,9 +84,29 @@ You can manually upload your image files and enter metadata of them manually, us
8784

8885
1. Review that all the information is correct. Select **Save and close**.
8986

87+
## Add your data using Azure AI Search
88+
89+
If you have an existing [Azure AI search](/azure/search/search-what-is-azure-search) index, you can use it as a data source. If you don't already have a search index created for your images, you can create one using the [AI Search vector search repository on GitHub](https://github.com/Azure/cognitive-search-vector-pr), which provides you with scripts to create an index with your image files. This option is also great if you would like to create your data source using your own files like the option above, and then come back to the playground experience to select that data source you already have created but have not added yet.
90+
91+
1. Navigate to the **Select a data source** button in Azure OpenAI as [described above](#add-your-data-source). Select **Azure AI Search**.
92+
93+
> [!TIP]
94+
> You can select an image search index that you have created with the Azure Blob Storage or Upload files options.
95+
96+
1. Select your subscription, and the Azure AI Search service you used to create the image search index.
97+
98+
1. Select your Azure AI Search index you have created with your images.
99+
100+
1. After you have filled in all fields, select the two checkboxes at the bottom asking you to acknowledge the charges incurred from using GPT-4 Turbo with Vision vector embeddings and Azure AI Search. Select **Next**. If [CORS](#turn-on-cors) isn't already turned on for the AI Search resource, you will see a warning. To fix the warning, select **Turn on CORS**.
101+
102+
103+
:::image type="content" source="../media/use-your-image-data/completed-data-source-cognitive-search.png" alt-text="A screenshot showing the completed fields for using an Azure AI Search index." lightbox="../media/use-your-image-data/completed-data-source-cognitive-search.png":::
104+
105+
1. Review the details, then select **Save and close**.
106+
90107
## Add your data using Azure Blob Storage
91108

92-
If you have an existing Azure Blob Storage container, you can use it to create an image search index. If you want to create a new blob storage, see the [Azure Blob storage](/azure/storage/blobs/storage-quickstart-blobs-portal) documentation.
109+
If you have an existing [Azure Blob Storage](/azure/storage/blobs/storage-blobs-introduction) container, you can use it to create an image search index. If you want to create a new blob storage, see the [Azure Blob storage quickstart](/azure/storage/blobs/storage-quickstart-blobs-portal) documentation.
93110

94111
Your blob storage should contain image files and a JSON file with the image file paths and metadata. This option is especially useful if you have a large number of image files and don't want to manually upload each one.
95112

@@ -138,31 +155,17 @@ After you have a blob storage populated with image files and at least one metada
138155

139156
1. Review the details, then select **Save and close**.
140157

141-
## Add your data using Azure AI Search
142-
143-
If you have an existing Azure AI search index, you can use it as a data source. If you don't already have a search index created for your images, you can create one using the [AI Search vector search repository on GitHub](https://github.com/Azure/cognitive-search-vector-pr), which provides you with scripts to create an index with your image files.
144-
145-
1. Navigate to the **Select a data source** button in Azure OpenAI as [described above](#add-your-data-source). Select **Azure AI Search**.
146-
147-
> [!TIP]
148-
> You can select an image search index that you have created with the Azure Blob Storage or Upload files options.
149-
150-
1. Select your subscription, and the Azure AI Search service you used to create the image search index.
151-
152-
1. Select your Azure AI Search index you have created with your images.
153158

154-
1. After you have filled in all fields, select the two checkboxes at the bottom asking you to acknowledge the charges incurred from using GPT-4 Turbo with Vision vector embeddings and Azure AI Search. Select **Next**. If [CORS](#turn-on-cors) isn't already turned on for the AI Search resource, you will see a warning. To fix the warning, select **Turn on CORS**.
155159

160+
## Using your ingested data with your GPT-4 Turbo with Vision model
156161

157-
:::image type="content" source="../media/use-your-image-data/completed-data-source-cognitive-search.png" alt-text="A screenshot showing the completed fields for using an Azure AI Search index." lightbox="../media/use-your-image-data/completed-data-source-cognitive-search.png":::
162+
After you connect your data source using any of the three methods listed above, It will take some time for the data ingestion process to finish. You will see an icon and a **Ingestion in progress** message as the process progresses. Once the ingestion has been completed, you'll see that a data source has been created.
158163

159-
1. Review the details, then select **Save and close**.
164+
:::image type="content" source="../media/use-your-image-data/completed-data-source.png" alt-text="A screenshot showing the completed data source ingestion." lightbox="../media/use-your-image-data/completed-data-source.png":::
160165

161-
## Wait for your data to be ingested
166+
Once the data source has finished being ingested, you will see your data source details as well as the image search index name. Now this ingested data is ready to be used as the grounding data for your deployed GPT-4 Turbo with Vision model. Your model will use the top retrieval data from your image search index and generate a response specifically adhered to your ingested data.
162167

163-
After you connect your data source, It will take some time for the ingestion process to finish. You will see an icon and a **Ingestion in progress** message as the process progresses. Once the ingestion has been completed, you'll see that a data source has been created.
164-
165-
:::image type="content" source="../media/use-your-image-data/completed-data-source.png" alt-text="A screenshot showing the completed data source ingestion." lightbox="../media/use-your-image-data/completed-data-source.png":::
168+
:::image type="content" source="../media/use-your-image-data/tent-chat-example.png" alt-text="A screenshot showing a chat example with tent image." lightbox="../media/use-your-image-data/tent-chat-example.png":::
166169

167170
## Turn on CORS
168171

@@ -173,9 +176,9 @@ If CORS isn't already turned on for your data source, you will see the following
173176
If you see this message, select **Turn on CORS** when you connect your data source.
174177

175178

179+
## Additional Tips
176180

177-
## Remove your data source
178-
181+
### Adding and Removing Data Sources
179182
Azure OpenAI currently allows only one data source to be used per a chat session. If you would like to add a new data source, you must remove the existing data source first. This can be done by selecting **Remove data source** under your data source information.
180183

181184
When you remove a data source, you'll see a warning message. Removing a data source clears the chat session and resets all playground settings.
@@ -187,4 +190,4 @@ When you remove a data source, you'll see a warning message. Removing a data sou
187190
188191
## Next steps
189192

190-
You can also chat on Azure OpenAI text models. See [Use your text data](./use-your-data.md) for more information.
193+
You can also chat on Azure OpenAI text models. See [Use your text data](./use-your-data.md) for more information.
158 KB
Loading
37.8 KB
Loading
26.2 KB
Loading
32.2 KB
Loading
4.14 KB
Loading
Binary file not shown.
455 KB
Loading

0 commit comments

Comments
 (0)