Implement text analysis solutions 4.1 Apply language model text analysis

A legal team wants Azure Language to detect and redact PII in Word and PDF contracts…

Study guide skill: Configure detection of sentiment, tone, safety issues, and sensitive content

Question B7-013

A legal team wants Azure Language to detect and redact PII in Word and PDF contracts while keeping them as files, using the native document PII feature (its API version is in preview). Which two statements are correct? (Choose two.)

Select 2 answers.

  • A You must first convert each contract to plain text before sending it
  • B The redacted file is returned directly in the body of the POST response
  • C A multi-service Microsoft Foundry resource is required; a single-service Language resource isn't supported
  • D You submit the job asynchronously with a POST, check its status with a GET, and find the processed files in a target Azure Blob Storage container ✓ Correct answer
  • E Text inside images embedded in the documents, such as a scanned stamp with a name, isn't supported for detection ✓ Correct answer

Answer: D, E

Native document support works asynchronously: you POST the request, GET the status, and the processed documents land in your Blob Storage target container. Digital images with embedded text aren't supported, and native support removes the need to convert documents to text first. The prerequisites call for a single-service Language resource, not a multi-service Foundry resource.

Deep dive

How it works

Azure Language native document support lets PII detection work on files directly, Word (docx), PDF (including scanned PDFs) and plain text, with no text preprocessing step. Redacted output comes back as files.

The workflow is asynchronous:

  1. Put the source documents in an Azure Blob Storage source container, and create a target container for results.
  2. POST the job, with the document locations in the request body.
  3. GET the job status with the operation location until it completes.
  4. Read the processed, redacted documents from the target container.

A few limits worth knowing:

  • Text within images: digital images with embedded text aren't supported, so a name inside a scanned stamp image isn't detected.
  • Tables in scanned documents aren't supported.
  • Per request: up to 40 documents and 10 MB total content.

For the resource, the prerequisites call for a single-service Language resource, not a multi-service Foundry resource.

The other options, and when you'd use them

  • Convert each contract to plain text first: Native document support eliminates the need for text preprocessing.
  • Redacted file in the POST response body: It's asynchronous. The POST submits the job, a GET retrieves status, and results land in the Blob Storage target container.
  • A multi-service Foundry resource is required: The opposite. The prerequisites specify a single-service Language resource, not a multi-service Foundry resource.

Exam tip

Native document PII = async POST + GET, files in a Blob target container, docx/pdf/txt, single-service Language resource. Text inside images isn't detected.

References

Last reviewed:

Ready to test yourself? The quiz asks this and every other AI-103 question, with instant feedback. Practice this in a quiz →

All Text analysis questions · AI-103 study guide

Thanks for your feedback!