Bitzu

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

Single choice

Which Python package contains ContentUnderstandingClient?

  1. azure-ai-formrecognizer
  2. azure-ai-vision-imageanalysis
  3. azure-ai-contentunderstanding
  4. 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.

Select all that apply

Which statements describe the REST flow for an analysis request?

  1. The POST returns an Operation-Location header to poll
  2. You poll until status becomes Succeeded
  3. Extracted fields are under result.contents[].fields
  4. The finished fields arrive directly in the POST response body
  5. 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

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.

Download on the App StoreGet it on Google Play

More AI-901 topics in this module