You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -65,7 +65,120 @@ Analyzers are reusable components in Content Understanding that streamline the d
65
65
66
66
The following code samples demonstrate how to create analyzers for each modality, specifying the structured data to be extracted, such as key fields, summaries, or classifications. These analyzers will serve as the foundation for extracting and enriching content in your RAG solution.
67
67
68
-
**Starting off with the schema details for each modality:**
68
+
#### Load all environment variables and necessary libraries from Langchain
x_ms_useragent="azure-ai-content-understanding-python/content_extraction", # This header is used for sample usage telemetry, please comment out this line if you want to opt out.
155
+
)
156
+
157
+
# Iterate through each config and create an analyzer
158
+
for analyzer in analyzer_configs:
159
+
analyzer_id = analyzer["id"]
160
+
template_path = analyzer["template_path"]
161
+
162
+
try:
163
+
164
+
# Create the analyzer using the content understanding client
result = content_understanding_client.poll_result(response)
170
+
print(f"Successfully created analyzer: {analyzer_id}")
171
+
172
+
exceptExceptionas e:
173
+
print(f"Failed to create analyzer: {analyzer_id}")
174
+
print(f"Error: {e}")
175
+
176
+
```
177
+
---
178
+
179
+
**Note:** Field extraction schemas are optional and not required for performing content extraction. To execute content extraction and create analyzers without defining field schemas, simply provide the analyzer ID and the file to be analyzed.
180
+
181
+
**Here is a sample schema definition:**
69
182
70
183
# [Document](#tab/document)
71
184
@@ -198,117 +311,6 @@ To create a custom analyzer, you need to define a field schema that describes th
198
311
199
312
---
200
313
201
-
#### Load all environment variables and necessary libraries from Langchain
x_ms_useragent="azure-ai-content-understanding-python/content_extraction", # This header is used for sample usage telemetry, please comment out this line if you want to opt out.
288
-
)
289
-
290
-
# Iterate through each config and create an analyzer
291
-
for analyzer in analyzer_configs:
292
-
analyzer_id = analyzer["id"]
293
-
template_path = analyzer["template_path"]
294
-
295
-
try:
296
-
297
-
# Create the analyzer using the content understanding client
result = content_understanding_client.poll_result(response)
303
-
print(f"Successfully created analyzer: {analyzer_id}")
304
-
305
-
exceptExceptionas e:
306
-
print(f"Failed to create analyzer: {analyzer_id}")
307
-
print(f"Error: {e}")
308
-
309
-
```
310
-
---
311
-
312
314
## Perform Content and Field Analysis
313
315
**Content extraction** is the first step in the RAG implementation process. It transforms raw multimodal data—such as documents, images, audio, and video—into structured, searchable formats. This foundational step ensures that the content is organized and ready for indexing and retrieval. Content extraction provides the baseline for indexing and retrieval but may not fully address domain-specific needs or provide deeper contextual insights.
314
316
[Learn more]() about content extraction capabilities for each modality.
0 commit comments