Your profile

One profile for every MSDEVBUILD site. Only you can see it, and the site owner if you write in.

Lesson 39 of 39

Extract Documents with Content Understanding

Module 5: Information Extraction ⏱ 13 min read Updated

Your note

My notes for this lesson

Select any text in the lesson to highlight it or add a note. Saved in this browser.

    No highlights yet. Select a sentence in the lesson, then pick a colour or add a note.

    All my bookmarks and notes

    Reading settings

    For every lesson, saved in this browser.

    Text size
    Line spacing
    Font

    With IaaS you rent the virtual machine. Microsoft looks after the building, power and hardware; you patch the operating system.

    30-second answer

    Azure Content Understanding in Foundry Tools turns documents, images, audio and video into Markdown and fields. A prebuilt analyzer (such as prebuilt-layout or prebuilt-documentSearch) works with no setup. A custom analyzer extends prebuilt-document with a field schema where each field uses a method: extract (text on the page), classify (a fixed list) or generate (the model writes it). Results include a confidence score and a source, so you can send low-confidence values to a person. It runs on your Foundry resource with your own model deployments.

    Simulate it » No Azure account needed

    Exam objective: 5.2.1 Extract information by using multimodal pipelines that combine OCR, layout analysis and field extraction. 5.2.2 Produce clean, grounded representations for agents and RAG by using Content Understanding. 5.2.3 Implement analyzers that generate structured or markdown outputs for downstream reasoning. (Skills measured as of April 16, 2026)

    Simulations

    Feel it before you read it. No account needed, nothing leaves this page.

    Azure portal: Create a Content Understanding analyzer for claim forms Create an analyzer with extract, classify and generate fields and read its results.
    </> Embed

    Embed this simulation

    Free for trainers, teachers and bloggers. Paste this into your page:

    Loading the portal…

    In <strong>Discover ➜ Foundry Tools</strong> open <strong>Content Understanding</strong>. It runs on the same Foundry resource as your models.

    👆 Click the glowing item in the portal to continue

    Read the steps as text
    1. In Discover ➜ Foundry Tools open Content Understanding. It runs on the same Foundry resource as your models.
    2. First set the default model deployments. Without them, analyzers that need a model can't run.
    3. Create an analyzer based on prebuilt-document. A custom analyzer inherits OCR and layout, and adds your field schema.
    4. Define the field schema: a name, a type, a method and a description that tells the model what to look for.
    5. Test on water-claim.pdf. Each field has a confidence and a source so you can see where it came from. The handwritten number is the weak one.
    6. The same call also returns clean Markdown. Use it to ground an agent or fill a search index, and use the fields to drive your claims system.

    🧪 Simulation for learning. Screens are simplified versions of the Azure portal; names, prices and IDs are examples. Nothing here touches real Azure.

    😟 THE PROBLEM

    Claim forms arrive as PDFs and photos, OCR text loses the tables, and nobody knows which extracted numbers to trust.

    😊 THE SOLUTION

    Create a Content Understanding analyzer that returns Markdown and fields with confidence and source.

    • Tables flattened into text✓ Layout-aware Markdown output
    • Values typed in by hand✓ A field schema with extract, classify and generate methods
    • A blurry handwritten number✓ Confidence score, then human review below a threshold
    🛠️ Solved with: Content Understanding analyzers

    Start with a question

    Claim forms arrive as PDFs with photos and handwriting. How do you turn them into data a claims system and an agent can trust?

    Picture a clerk who reads every claim. A scanner only gives her a photocopy of the words. A good clerk does more: she copies the claim number into the right box, ticks “water damage” from a list, writes a two-line summary for the adjuster, and puts a small question mark next to the number she couldn’t read.

    Content Understanding is that clerk. The photocopy is OCR. The boxes are fields. The ticks are classify, the summary is generate, and the question mark is a low confidence score.

    Explain it like I’m 10

    The technical explanation

    Content Understanding is a Foundry Tool, part of your Microsoft Foundry resource. It reads documents, images, audio and video and returns output in a shape you choose: Markdown for reasoning and search, and fields for automation. This lesson focuses on documents.

    Prebuilt analyzers

    AnalyzerUse it for
    prebuilt-read / prebuilt-layoutOCR, paragraphs, tables and structure, no fields
    prebuilt-documentSearchRAG: Markdown, table structure, figure descriptions, handwritten annotations and a summary
    Industry analyzers (invoice, contract and others)Common documents with fields already defined
    prebuilt-documentThe base you extend for a custom analyzer

    Start here. If a prebuilt analyzer returns what you need, don’t build a custom one.

    Custom analyzers and the field schema

    When you need your own fields, you create an analyzer with a base, the models it should use, a config, and a fieldSchema:

    {
      "analyzerId": "insurance-claim",
      "baseAnalyzerId": "prebuilt-document",
      "models": { "completion": "gpt-4.1-mini", "embedding": "text-embedding-3-small" },
      "config": { "returnDetails": true, "estimateFieldSourceAndConfidence": true, "tableFormat": "markdown" },
      "fieldSchema": { "fields": {
        "ClaimNumber":  { "type": "string", "method": "extract",  "description": "Claim reference, starts with CLM-" },
        "TotalClaimed": { "type": "number", "method": "extract",  "description": "Total amount claimed" },
        "IncidentType": { "type": "string", "method": "classify", "enum": ["water damage", "fire", "theft", "collision", "other"] },
        "Summary":      { "type": "string", "method": "generate", "description": "Two-sentence summary for the adjuster" }
      } }
    }
    MethodReturnsExample
    extractA value written in the contentClaim number, total
    classifyOne value from a list you giveType of incident
    generateA value the model writesSummary, a yes or no judgement

    Good descriptions matter: they act as the instruction for each field. Use the least creative method that works, because extract can be checked against the page and generate can’t.

    Setting up on your Foundry resource

    1. Deploy a chat model and an embedding model on the resource, for example gpt-4.1-mini and text-embedding-3-small.
    2. Map them once as the resource’s default model deployments.
    3. Create the analyzer (PUT .../contentunderstanding/analyzers/{id}).
    4. Analyze a file (POST ...:analyze). It’s a long-running operation, so you poll or use the SDK’s poller.
    client = ContentUnderstandingClient(endpoint=endpoint, credential=DefaultAzureCredential())
    result = client.begin_analyze(analyzer_id="insurance-claim",
                                  inputs=[AnalysisInput(url=blob_url)]).result()
    content = result.contents[0]
    print(content.markdown)                       # clean text for RAG and agents
    for name, f in content.fields.items():
        print(name, f.value, f.confidence, f.source)

    The GA API version is 2025-11-01 (checked 25 November 2026). A 2026-06-01-preview version adds newer features such as an agentic mode for complex documents, so confirm which one your SDK targets.

    Confidence and grounding

    With estimateFieldSourceAndConfidence on, each field comes with a confidence and a source (where it was found). That lets you build straight-through processing: values above your threshold flow straight into the claims system, and anything below goes to a person who sees the exact spot on the page. A handwritten policy number at 0.61 is exactly the value you don’t want to trust blindly.

    Feeding agents and RAG

    • Markdown is the clean representation for a model: headings, tables and figure descriptions stay intact. Index it in Azure AI Search, or use the Content Understanding skill inside the indexer’s skillset.
    • Fields feed workflows and tools, such as an agent that opens a claim only when the fields are confident.
    • One analyzer can produce both in the same call.
    1. 1 Read

      OCR and layout analysis read text, tables and figures.

    2. 2 Extract

      The model fills extract fields from the text on the page.

    3. 3 Classify

      Classify fields pick one value from your list.

    4. 4 Generate

      Generate fields get a model-written value, such as a summary.

    5. 5 Check

      Low-confidence fields go to a person. The rest flow on.

    A claim form through Content Understanding
    Architect level Classification, segmentation and limits

    Analyzers can classify whole files or split a multi-document PDF into segments by category (for example invoice, contract, other) and send each segment to a category-specific analyzer. Always include an “other” category so unmatched content doesn’t get forced into a wrong one.

    Plan for limits: file size, page counts and language support differ by modality and version, so check the service limits page for the type you process. Cost has two parts: the content processed (pages or minutes) and the model tokens used for field extraction on your deployments. Test on a sample set and measure accuracy per field before you switch off human review.

    Real-world business scenario

    Insurance

    Litware Insurance (fictional)

    The problem
    Adjusters retyped claim numbers, dates and totals from PDFs and photos. Mistakes in handwritten policy numbers caused payouts to the wrong policy.
    What they used
    A Content Understanding custom analyzer based on prebuilt-document with extract fields for numbers and dates, a classify field for incident type, a generate summary field, and confidence plus source turned on. Fields above 0.8 go to the claims system and the rest go to a review queue.
    Why that choice
    Extract keeps values tied to the page, classify keeps categories consistent, and confidence stops unclear handwriting from reaching payment.
    The result
    Most claims flow through without retyping, and reviewers only see the handful of fields the service wasn't sure about, with the page location highlighted.

    When to use it and when not to

    ✓ Use it when…

    • You need named fields from invoices, claims, contracts or forms, with confidence.
    • You want layout-aware Markdown with table structure and figure descriptions for RAG.
    • You process mixed content, such as documents, call recordings and video, with one approach.

    ✕ Think twice when…

    • You only need to search across many documents. Index them with Azure AI Search.
    • The task is plain text analysis, such as sentiment or translation. Use Azure Language or Translator.
    • A value that must never be wrong is read from a blurry image with no human review.

    ↔ Alternatives to consider

    • Azure AI Search with OCR and Text Split for simple retrieval.
    • A multimodal model with a JSON schema for quick one-off extraction.
    • Azure Language for entities and PII in text you already have.
    Ready for more?The full lesson adds the technical explanation, when to use it, interview questions and revision notes.

    Test yourself with exercises

    5 original practice questions in the AI-103 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.

    Question 1

    Question 1 of 5

    You create a Content Understanding analyzer field that must return one of five fixed incident types. Which method should you use?

    Question 2

    Question 2 of 5

    A claims team wants an agent to read forms and open a claim only when values are reliable. A handwritten policy number is often unclear. What should you do?

    Question 3

    Question 3 of 5

    You need clean Markdown with table structure and figure descriptions from reports to ground a RAG application. You do not need custom fields. Which analyzer fits best?

    Question 4

    Question 4 of 5

    Creating a custom analyzer fails because no model deployment is configured. Which prerequisite is missing?

    Question 5

    Question 5 of 5 · Select 2

    A custom document analyzer needs an invoice number, a total, and a two-sentence summary for adjusters. Which two field definitions are appropriate?

    Interview preparation

    Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

    Beginner What does Content Understanding give you that plain OCR doesn't?

    Model answer

    OCR gives you text. Content Understanding gives you structure and meaning: clean Markdown with tables and figure descriptions, plus named fields such as total or claim number, each with a confidence score and where it was found.

    Intermediate When do you use extract, classify and generate for a field?

    Model answer

    Extract for values that are written in the document, like an invoice number. Classify when the answer must be one of a fixed list, such as the type of claim. Generate when the value isn't written anywhere and the model has to produce it, like a short summary.

    Interviewer follows up

    Why prefer extract over generate when both could work?

    You

    Extract stays tied to the text on the page, so it's more predictable and easier to verify with its source. Generate can paraphrase or invent.

    Experienced developer A handwritten policy number comes back with confidence 0.61. What do you do?

    Model answer

    I set a threshold for the field, say 0.8, and route anything below it to a person for review instead of trusting it. I'd also check the source location so the reviewer sees the exact spot, and measure how often the low-confidence fields were actually wrong.

    Scenario Your analyzer creation fails with a model deployment error. What's missing?

    Model answer

    The default model deployments for the resource. Content Understanding needs a chat model and an embedding model deployed on the Foundry resource, mapped as defaults, and the analyzer's models section has to name them.

    Architecture & design How do Content Understanding and Azure AI Search work together for RAG?

    Model answer

    Content Understanding converts each file to layout-aware Markdown with figure descriptions, and Search indexes it. You can analyse first and index the Markdown, or use the Content Understanding skill inside the indexer's skillset. The same analyzer can also produce fields to drive a workflow.

    Quick revision

    Key points

    • Content Understanding is a Foundry Tool that runs on your Foundry resource with your own model deployments.
    • It handles documents, images, audio and video. Outputs are Markdown plus fields.
    • Prebuilt analyzers need no schema. Custom analyzers extend a base such as prebuilt-document.
    • Field methods are extract, classify and generate.
    • Turn on confidence and source estimation, then route low-confidence fields to a person.
    • GA API version is 2025-11-01. A 2026-06-01-preview adds newer features such as agentic mode.

    Important terminology

    Analyzer
    A reusable definition that says how to process a type of content and what output to produce.
    Prebuilt analyzer
    A ready-made analyzer such as prebuilt-layout, prebuilt-documentSearch or an industry analyzer. No schema needed.
    Field schema
    The list of fields a custom analyzer returns, each with a type, a method and a description.
    Extract, classify, generate
    The three field methods. Extract reads values written in the content, classify picks from a list you give, generate lets the model write the value.
    Confidence score
    A number from 0 to 1 that says how sure the service is about a field value.
    Grounding (source)
    The location in the content that a field value came from, such as the page and position.
    Default model deployments
    The chat and embedding deployments on your Foundry resource that Content Understanding uses for field extraction.

    Common mistakes

    • Using generate for a value that is written on the page.
    • Trusting handwritten or blurry fields without a confidence threshold.
    • Creating an analyzer before the default model deployments exist.

    Exam tips

    • "Clean text for RAG with tables and figures" = prebuilt-documentSearch Markdown.
    • "Typed fields with confidence from forms" = a custom analyzer with a field schema.
    • "Choose from a fixed list" = classify. "Write a summary" = generate.

    Five quick revision questions

    1. 1.Which method reads values that are written in the document?Show

      Extract.

    2. 2.Which base analyzer do custom document analyzers extend?Show

      prebuilt-document.

    3. 3.What tells you whether to trust a field?Show

      Its confidence score (and source).

    4. 4.What must exist on the Foundry resource before field extraction works?Show

      Default chat and embedding model deployments.

    5. 5.Which prebuilt analyzer is tuned for RAG on documents?Show

      prebuilt-documentSearch.

    Official references

    Finished this lesson? Tick it off. Your progress is saved in this browser.

    Studying with a friend? Send them this lesson

    It's free and needs no sign-up. Their progress saves in their own browser.

    Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges. Play ❯

    Install MSDEVBUILD Azure

    Free · no account · works offline

    Save the whole course for offline ›

    Hi, I’m your Nimbus

    Your study buddy. Pick what we do next.

    MSDEVBUILD · Multi-Stack Dev Build

    Sign in to MSDEVBUILD

    One account for Azure certifications and the blog: sign in here and you are signed in on both. Your XP, streak, practice deck and certificate stay in sync on every device. Optional: everything works without an account.