AI-901 ยท Information extraction with Content Understanding
What is the pattern for calling a Content Understanding analyzer from Python?
Reading Python that sends content to an analyzer, waits for the asynchronous operation, and reads fields, values and confidence from the result.
Key points
- Create a ContentUnderstandingClient (endpoint plus key or Entra credential from azure-ai-contentunderstanding), call begin_analyze(analyzer_id, inputs=[AnalysisInput(url=...)]), wait with poller.result(), then read result.contents[0].fields.
- Each field exposes .value and .confidence.
- Over REST the same flow is a POST that returns 202 with an Operation-Location header, followed by polling until status is Succeeded.
Source: https://learn.microsoft.com/en-us/azure/ai-services/content-understanding/quickstart/use-rest-api
Practice questions
Which Python package contains ContentUnderstandingClient?
- azure-ai-formrecognizer
- azure-ai-vision-imageanalysis
- azure-ai-contentunderstanding
- azure-ai-textanalytics
Show answer
Answer: C. azure-ai-contentunderstanding
azure-ai-contentunderstanding is the Content Understanding client library. Document Intelligence and Vision have their own packages.
Which statements describe the REST flow for an analysis request?
- The POST returns an Operation-Location header to poll
- You poll until status becomes Succeeded
- Extracted fields are under result.contents[].fields
- The finished fields arrive directly in the POST response body
- Confidence is an integer from 0 to 100
Show answer
Answer: A. The POST returns an Operation-Location header to poll, B. You poll until status becomes Succeeded, C. Extracted fields are under result.contents[].fields
The POST returns 202 with an Operation-Location header, you poll that URL until status is Succeeded, and extracted data lives in result.contents[].fields. Results are not returned in the POST body.
True or false: the analyze request returns the extracted fields immediately in the same HTTP response.
Show answer
Answer: False
False. Analysis is asynchronous: the response only points to an operation, and you poll (or let the SDK poller do it) until the result is ready.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
