@@ -64,7 +64,7 @@ The following instructions apply to Azure Storage which provides the sample data
1. [Create role assignments and specify a managed identity in a connection string](search-howto-managed-identities-storage.md):
- 1. Assign **Storage Blob Data Reader** for data retrieval by the indexer and **Storage Blob Data Contributor** to create and load the knowledge store. You can use either a system-assigned managed identity or a user-assigned managed identity for your search service role assignment.
+ 1. Assign **Storage Blob Data Reader** for data retrieval by the indexer. Assign **Storage Blob Data Contributor** and **Storage Table Data Contributor** to create and load the knowledge store. You can use either a system-assigned managed identity or a user-assigned managed identity for your search service role assignment.
1. For connections made using a system-assigned managed identity, get a connection string that contains a ResourceId, with no account key or password. The ResourceId must include the subscription ID of the storage account, the resource group of the storage account, and the storage account name. The connection string is similar to the following example:
@@ -122,11 +122,12 @@ For more information, see [Role-based access control for Azure OpenAI in Azure A
For this tutorial, your local REST client connection to Azure AI Search requires an endpoint and an API key. You can get these values from the Azure portal. For alternative connection methods, see [Connect to a search service](search-get-started-rbac.md).
-For other authenticated connections, the search service uses the role assignments you previously defined.
+For authenticated connections that occur during indexer and skillset processing, the search service uses the role assignments you previously defined.
1. Start Visual Studio Code and create a new file.
-1. Provide values for variables used in the request.
+1. Provide values for variables used in the request. For `@storageConnection`, make sure your connection string doesn't have a trailing semicolon or quotation marks. For `@imageProjectionContainer`, provide a container name that's unique in blob storage. Azure AI Search creates this container for you during skills processing.
+
```http
@searchUrl = PUT-YOUR-SEARCH-SERVICE-ENDPOINT-HERE
@searchApiKey = PUT-YOUR-ADMIN-API-KEY-HERE
@@ -135,7 +136,7 @@ For other authenticated connections, the search service uses the role assignment
@openAIKey = PUT-YOUR-OPENAI-KEY-HERE
@chatCompletionResourceUri = PUT-YOUR-CHAT-COMPLETION-URI-HERE
@chatCompletionKey = PUT-YOUR-CHAT-COMPLETION-KEY-HERE
- @imageProjectionContainer=PUT-YOUR-IMAGE-PROJECTION-CONTAINER-HERE (Azure AI Search creates this container for you during skills processing)
+ @imageProjectionContainer=sustainable-ai-pdf-images
```
1. Save the file using a `.rest` or `.http` file extension. For help with the REST client, see [Quickstart: Full-text search using REST](search-get-started-text.md).
@@ -163,11 +164,11 @@ POST {{searchUrl}}/datasources?api-version=2025-05-01-preview HTTP/1.1
"description": "A data source to store multi-modality documents",
"type": "azureblob",
"subtype": null,
- "credentials": {
- "connectionString": "ResourceId=/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MY-DEMO-RESOURCE-GROUP/providers/Microsoft.Storage/storageAccounts/MY-DEMO-STORAGE-ACCOUNT/;"
+ "credentials":{
+ "connectionString":"{{storageConnection}}"
},
"container": {
- "name": "doc-intelligence-multimodality-container",
+ "name": "sustainable-ai-pdf",
"query": null
},
"dataChangeDetectionPolicy": null,
@@ -178,6 +179,42 @@ POST {{searchUrl}}/datasources?api-version=2025-05-01-preview HTTP/1.1
```
+Send the request. The response should look like:
+
+```json
+HTTP/1.1 201 Created
+Transfer-Encoding: chunked
+Content-Type: application/json; odata.metadata=minimal; odata.streaming=true; charset=utf-8
+Location: https://<YOUR-SEARCH-SERVICE-NAME>.search.windows-int.net:443/datasources('doc-extraction-multimodal-embedding-ds')?api-version=2025-05-01-preview -Preview
+Server: Microsoft-IIS/10.0
+Strict-Transport-Security: max-age=2592000, max-age=15724800; includeSubDomains
+Preference-Applied: odata.include-annotations="*"
+OData-Version: 4.0
+request-id: 4eb8bcc3-27b5-44af-834e-295ed078e8ed
+elapsed-time: 346
+Date: Sat, 26 Apr 2025 21:25:24 GMT
+Connection: close
+
+{
+ "name": "doc-extraction-multimodal-embedding-ds",
+ "description": null,
+ "type": "azureblob",
+ "subtype": null,
+ "indexerPermissionOptions": [],
+ "credentials": {
+ "connectionString": null
+ },
+ "container": {
+ "name": "sustainable-ai-pdf",
+ "query": null
+ },
+ "dataChangeDetectionPolicy": null,
+ "dataDeletionDetectionPolicy": null,
+ "encryptionKey": null,
+ "identity": null
+}
+```
+
## Create an index
[Create Index (REST)](/rest/api/searchservice/indexes/create) creates a search index on your search service. An index specifies all the parameters and their attributes.
@@ -274,7 +311,7 @@ POST {{searchUrl}}/indexes?api-version=2025-05-01-preview HTTP/1.1
{
"name": "hnsw",
"algorithm": "defaulthnsw",
- "vectorizer": "{{vectorizer}}"
+ "vectorizer": "demo-vectorizer"
}
],
"algorithms": [
@@ -290,12 +327,12 @@ POST {{searchUrl}}/indexes?api-version=2025-05-01-preview HTTP/1.1
],
"vectorizers": [
{
- "name": "{{vectorizer}}",
+ "name": "demo-vectorizer",
"kind": "azureOpenAI",
"azureOpenAIParameters": {
"resourceUri": "{{openAIResourceUri}}",
"deploymentId": "text-embedding-3-large",
- "searchApiKey": "{{openAIKey}}",
+ "apiKey": "{{openAIKey}}",
"modelName": "text-embedding-3-large"
}
}
@@ -344,6 +381,7 @@ POST {{searchUrl}}/skillsets?api-version=2025-05-01-preview HTTP/1.1
api-key: {{searchApiKey}}
{
+ "name": "doc-intelligence-image-verbalization-skillset",
"description": "A sample skillset for multi-modality using image verbalization",
"skills": [
{
@@ -395,15 +433,15 @@ POST {{searchUrl}}/skillsets?api-version=2025-05-01-preview HTTP/1.1
],
"resourceUri": "{{openAIResourceUri}}",
"deploymentId": "text-embedding-3-large",
- "searchApiKey": "",
+ "apiKey": "{{openAIKey}}",
"dimensions": 3072,
"modelName": "text-embedding-3-large"
},
{
"@odata.type": "#Microsoft.Skills.Custom.ChatCompletionSkill",
"uri": "{{chatCompletionResourceUri}}",
"timeout": "PT1M",
- "searchApiKey": "",
+ "apiKey": "{{chatCompletionKey}}",
"name": "genAI-prompt-skill",
"description": "GenAI Prompt skill for image verbalization",
"context": "/document/normalized_images/*",
@@ -448,7 +486,7 @@ POST {{searchUrl}}/skillsets?api-version=2025-05-01-preview HTTP/1.1
],
"resourceUri": "{{openAIResourceUri}}",
"deploymentId": "text-embedding-3-large",
- "searchApiKey": "",
+ "apiKey": "{{openAIKey}}",
"dimensions": 3072,
"modelName": "text-embedding-3-large"
},
@@ -479,7 +517,7 @@ POST {{searchUrl}}/skillsets?api-version=2025-05-01-preview HTTP/1.1
"indexProjections": {
"selectors": [
{
- "targetIndexName": "{{index}}",
+ "targetIndexName": "doc-intelligence-image-verbalization-index",
"parentKeyFieldName": "text_document_id",
"sourceContext": "/document/text_sections/*",
"mappings": [
@@ -502,7 +540,7 @@ POST {{searchUrl}}/skillsets?api-version=2025-05-01-preview HTTP/1.1
]
},
{
- "targetIndexName": "{{index}}",
+ "targetIndexName": "doc-intelligence-image-verbalization-index",
"parentKeyFieldName": "image_document_id",
"sourceContext": "/document/normalized_images/*",
"mappings": [
@@ -535,6 +573,7 @@ POST {{searchUrl}}/skillsets?api-version=2025-05-01-preview HTTP/1.1
},
"knowledgeStore": {
"storageConnectionString": "{{storageConnection}}",
+ "identity": null,
"projections": [
{
"files": [