Skip to content

Commit fd3419a

Browse files
docs: review notebooks/management.ipynb
1 parent f8f406b commit fd3419a

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

notebooks/management.ipynb

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"metadata": {},
2020
"source": [
2121
"## Prerequisites\n",
22-
"1. Ensure your Azure AI service is configured following the [configuration steps](../README.md#configure-azure-ai-service-resource).\n",
22+
"1. Please ensure your Azure AI service is configured by following the [configuration steps](../README.md#configure-azure-ai-service-resource).\n",
2323
"2. Install the required packages to run this sample."
2424
]
2525
},
@@ -40,12 +40,12 @@
4040
"\n",
4141
"> The [AzureContentUnderstandingClient](../python/content_understanding_client.py) is a utility class that provides functions to interact with the Content Understanding API. Before the official release of the Content Understanding SDK, this client serves as a lightweight SDK.\n",
4242
"\n",
43-
"> Fill the constants **AZURE_AI_ENDPOINT**, **AZURE_AI_API_VERSION**, and **AZURE_AI_API_KEY** with your Azure AI Service details.\n",
43+
"> Please fill the constants **AZURE_AI_ENDPOINT**, **AZURE_AI_API_VERSION**, and **AZURE_AI_API_KEY** with your Azure AI Service details.\n",
4444
"\n",
4545
"> ⚠️ Important:\n",
4646
"Update the code below to match your Azure authentication method.\n",
4747
"Look for the `# IMPORTANT` comments and modify those sections accordingly.\n",
48-
"If you skip this step, the sample might not run correctly.\n",
48+
"Skipping this step might cause the sample not to run correctly.\n",
4949
"\n",
5050
"> ⚠️ Note: Using a subscription key works, but using Azure Active Directory (AAD) token-based authentication is more secure and highly recommended for production environments."
5151
]
@@ -112,20 +112,21 @@
112112
"source": [
113113
"## Configure Model Deployments for Prebuilt Analyzers\n",
114114
"\n",
115-
"> **💡 Note:** This step is only required **once per Azure Content Understanding resource**, unless the GPT deployment has been changed. You can skip this section if:\n",
115+
"> **💡 Note:** This step is required **only once per Azure Content Understanding resource**, unless the GPT deployment has been changed.\n",
116+
"You can skip this section if:\n",
116117
"> - This configuration has already been run once for your resource, or\n",
117-
"> - Your administrator has already configured the model deployments for you\n",
118+
"> - Your administrator has already configured the model deployments for you.\n",
118119
"\n",
119-
"Before using prebuilt analyzers, you need to configure the default model deployment mappings. This tells Content Understanding which model deployments to use.\n",
120+
"Before using prebuilt analyzers, please configure the default model deployment mappings. This tells Content Understanding which model deployments to use.\n",
120121
"\n",
121122
"**Model Requirements:**\n",
122-
"- **GPT-4.1** - Required for most prebuilt analyzers (e.g., `prebuilt-invoice`, `prebuilt-receipt`, `prebuilt-idDocument`)\n",
123-
"- **GPT-4.1-mini** - Required for RAG analyzers (e.g., `prebuilt-documentSearch`, `prebuilt-audioSearch`, `prebuilt-videoSearch`)\n",
124-
"- **text-embedding-3-large** - Required for all prebuilt analyzers that use embeddings\n",
123+
"- **GPT-4.1** - Required for most prebuilt analyzers (e.g., `prebuilt-invoice`, `prebuilt-receipt`, `prebuilt-idDocument`).\n",
124+
"- **GPT-4.1-mini** - Required for RAG analyzers (e.g., `prebuilt-documentSearch`, `prebuilt-audioSearch`, `prebuilt-videoSearch`).\n",
125+
"- **text-embedding-3-large** - Required for all prebuilt analyzers that use embeddings.\n",
125126
"\n",
126127
"**Prerequisites:**\n",
127-
"1. Deploy **GPT-4.1**, **GPT-4.1-mini**, and **text-embedding-3-large** models in Azure AI Foundry\n",
128-
"2. Set `GPT_4_1_DEPLOYMENT`, `GPT_4_1_MINI_DEPLOYMENT`, and `TEXT_EMBEDDING_3_LARGE_DEPLOYMENT` in your `.env` file with the deployment names"
128+
"1. Deploy **GPT-4.1**, **GPT-4.1-mini**, and **text-embedding-3-large** models in Azure AI Foundry.\n",
129+
"2. Set environment variables `GPT_4_1_DEPLOYMENT`, `GPT_4_1_MINI_DEPLOYMENT`, and `TEXT_EMBEDDING_3_LARGE_DEPLOYMENT` in your `.env` file with the respective deployment names."
129130
]
130131
},
131132
{
@@ -154,12 +155,12 @@
154155
" print(f\" - {deployment}\")\n",
155156
" print(\"\\n Prebuilt analyzers require GPT-4.1, GPT-4.1-mini, and text-embedding-3-large deployments.\")\n",
156157
" print(\" Please:\")\n",
157-
" print(\" 1. Deploy all three models in Azure AI Foundry\")\n",
158+
" print(\" 1. Deploy all three models in Azure AI Foundry.\")\n",
158159
" print(\" 2. Add the following to notebooks/.env:\")\n",
159160
" print(\" GPT_4_1_DEPLOYMENT=<your-gpt-4.1-deployment-name>\")\n",
160161
" print(\" GPT_4_1_MINI_DEPLOYMENT=<your-gpt-4.1-mini-deployment-name>\")\n",
161162
" print(\" TEXT_EMBEDDING_3_LARGE_DEPLOYMENT=<your-text-embedding-3-large-deployment-name>\")\n",
162-
" print(\" 3. Restart the kernel and run this cell again\")\n",
163+
" print(\" 3. Restart the kernel and run this cell again.\")\n",
163164
"else:\n",
164165
" print(f\"📋 Configuring default model deployments...\")\n",
165166
" print(f\" GPT-4.1 deployment: {GPT_4_1_DEPLOYMENT}\")\n",
@@ -181,8 +182,8 @@
181182
" except Exception as e:\n",
182183
" print(f\"❌ Failed to configure defaults: {e}\")\n",
183184
" print(f\" This may happen if:\")\n",
184-
" print(f\" - One or more deployment names don't exist in your Azure AI Foundry project\")\n",
185-
" print(f\" - You don't have permission to update defaults\")\n",
185+
" print(f\" - One or more deployment names don't exist in your Azure AI Foundry project.\")\n",
186+
" print(f\" - You don't have permission to update defaults.\")\n",
186187
" raise\n"
187188
]
188189
},
@@ -211,7 +212,7 @@
211212
" for model_name, deployment_name in model_deployments.items():\n",
212213
" print(f\" {model_name}: {deployment_name}\")\n",
213214
" else:\n",
214-
" print(\"\\n No model deployments configured\")\n",
215+
" print(\"\\n No model deployments configured.\")\n",
215216
" \n",
216217
"except Exception as e:\n",
217218
" print(f\"⚠️ Error retrieving defaults: {e}\")\n",
@@ -224,7 +225,7 @@
224225
"source": [
225226
"## Create a Simple Analyzer\n",
226227
"\n",
227-
"> **💡 Note:** This section demonstrates analyzer creation for learning purposes only. For actual invoice field extraction, we recommend using the **`prebuilt-invoice`** analyzer, which is optimized for invoice processing. See the `field_extraction.ipynb` notebook for examples of using prebuilt analyzers.\n",
228+
"> **💡 Note:** This section demonstrates analyzer creation for learning purposes only. For actual invoice field extraction, we recommend using the **`prebuilt-invoice`** analyzer, which is optimized for invoice processing. Please see the `field_extraction.ipynb` notebook for examples of using prebuilt analyzers.\n",
228229
"\n",
229230
"First, we create an analyzer from a template to extract invoice fields."
230231
]
@@ -347,7 +348,7 @@
347348
"cell_type": "markdown",
348349
"metadata": {},
349350
"source": [
350-
"After successfully creating an analyzer, you can use it to analyze our input files. You can also list all analyzers available in your resource."
351+
"After successfully creating an analyzer, you can use it to analyze your input files. You can also list all analyzers available in your resource."
351352
]
352353
},
353354
{
@@ -387,7 +388,7 @@
387388
"source": [
388389
"## Get Analyzer Details by ID\n",
389390
"\n",
390-
"Keep track of the analyzer ID when you create it. Use the ID to retrieve detailed analyzer definitions later."
391+
"Keep track of the analyzer ID when you create it. You can use the ID to retrieve detailed analyzer definitions later."
391392
]
392393
},
393394
{
@@ -414,7 +415,7 @@
414415
"metadata": {},
415416
"source": [
416417
"## Delete an Analyzer\n",
417-
"If you no longer need an analyzer, delete it using its ID."
418+
"If you no longer need an analyzer, you can delete it using its ID."
418419
]
419420
},
420421
{
@@ -452,4 +453,4 @@
452453
},
453454
"nbformat": 4,
454455
"nbformat_minor": 2
455-
}
456+
}

0 commit comments

Comments
 (0)