Your profile

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

Lesson 27 of 30
❮Prev Next❯

Content Understanding for Documents and Forms

Module 2: Microsoft Foundry ⏱ 9 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 and forms into structured data. You pick an analyzer: a prebuilt one such as prebuilt-invoice, prebuilt-receipt, prebuilt-layout or prebuilt-documentSearch, or a custom analyzer built on prebuilt-document with your own fields using extract, classify or generate. Each field comes back with a confidence score from 0 to 1 and a grounding link to where it was found on the page.

    Simulate it » No Azure account needed

    Exam objective: 2.4.1 Extract information from documents and forms by using Azure Content Understanding in Foundry Tools. (Skills measured as of April 15, 2026)

    Simulations

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

    Azure portal: Extract fields from an invoice Analyse an invoice with a prebuilt analyzer, then add your own field.
    </> Embed

    Embed this simulation

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

    Loading the portal…

    Open <strong>Content Understanding</strong>. An <strong>analyzer</strong> decides what to extract. Start with <strong>prebuilt-invoice</strong>.

    👆 Click the glowing item in the portal to continue

    Read the steps as text
    1. Open Content Understanding. An analyzer decides what to extract. Start with prebuilt-invoice.
    2. Upload the invoice. Each field comes back with a confidence score. Route anything under your threshold (say 0.80) to a person.
    3. Need more fields? Build a custom analyzer: extract copies values from the page, classify picks a category, generate writes a value such as a summary.
    4. The same analysis in Python with begin_analyze.

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

    😟 THE PROBLEM

    Invoices come in 40 different layouts.

    😊 THE SOLUTION

    Prebuilt and custom analyzers return the same fields for every layout.

    • Every vendor’s format differs✓ One analyzer, same fields
    • Which values are shaky?✓ Confidence scores
    • Need extra fields✓ Custom analyzer
    🛠️ Solved with: Content Understanding

    Start with a question

    Why does someone still type invoice numbers into a spreadsheet by hand?

    Meena works in accounts at a manufacturing company in Coimbatore. Every month about 2,000 supplier invoices arrive as PDFs and phone photos, all in different layouts. She types the supplier, invoice number, date and total into the ERP system, one by one.

    Azure Content Understanding reads each invoice and hands back those values as clean fields, with a score saying how sure it is. Meena only looks at the few it isn’t sure about.

    Explain it like I’m 10

    The technical explanation

    Azure Content Understanding in Foundry Tools uses generative AI to turn unstructured content into structured output you define. For documents it returns two things: the content as Markdown (text, tables, layout) and the fields you asked for as JSON. Everything runs through an analyzer.

    1. 1 Input

      PDF, scanned image, Office file or photo of a form.

    2. 2 Content extraction

      OCR and layout turn the pages into Markdown and tables.

    3. 3 Field extraction

      Generative models fill your fields using extract, classify or generate.

    4. 4 Output

      JSON fields with confidence scores and grounding.

    How a document becomes fields

    Prebuilt analyzers for documents

    AnalyzerWhat you get
    prebuilt-readText (OCR) only
    prebuilt-layoutText plus tables, selection marks and structure
    prebuilt-documentSearchMarkdown and a summary, ready for search and RAG
    prebuilt-invoiceVendor, customer, invoice number, dates, line items, totals
    prebuilt-receiptMerchant, date, items, tax, total
    OthersID documents, tax forms, contracts and more

    Before any analyzer works, the Foundry resource needs its default model deployments set (a completion model such as GPT-4.1 and an embedding model). Content Understanding calls those models for you, and you pay for their tokens as well as for content extraction.

    Custom fields

    When the prebuilt fields aren’t enough, you create a custom analyzer. You set baseAnalyzerId to prebuilt-document (or start from a prebuilt like prebuilt-invoice) and add a field schema. Each field has a name, a type, a plain-English description and a method:

    MethodUse it whenExample field
    ExtractThe value is printed in the document (documents only)PONumber
    ClassifyThe answer is one of a fixed listSpendCategory: Utilities, Travel, Raw materials
    GenerateThe value has to be written from the contentPaymentTermsSummary in one sentence
    {
      "baseAnalyzerId": "prebuilt-document",
      "fieldSchema": {
        "fields": {
          "PONumber":      { "type": "string", "method": "extract",  "description": "Purchase order number printed on the invoice" },
          "SpendCategory": { "type": "string", "method": "classify", "enum": ["Utilities", "Travel", "Raw materials"] },
          "TermsSummary":  { "type": "string", "method": "generate", "description": "One-sentence summary of the payment terms" }
        }
      }
    }

    The JSON above is simplified to show the idea. In the Foundry portal you do the same thing in a form: add a field, pick its type and method, write a description, then test on a sample file.

    Confidence and grounding

    Every extracted value carries a confidence score between 0 and 1 and grounding: the page and region it came from. Your app compares the score to a threshold you choose. High scores flow straight through; low ones go to a person, who can see the highlighted spot on the page instead of hunting for it.

    Architect level Content Understanding and Document Intelligence

    Azure Document Intelligence (formerly Form Recognizer) is the older service for forms and invoices, built on task-specific models. Content Understanding covers documents, images, audio and video with one analyzer model, and uses generative AI so you can describe fields instead of labelling training data. Existing Document Intelligence apps keep working, but new AI-901 scenarios point to Content Understanding. The GA API version is 2025-11-01.

    Real-world business scenario

    Manufacturing

    Northwind Components, Coimbatore

    The problem
    Accounts staff typed 2,000 supplier invoices a month into the ERP system by hand, and typos caused late payments and supplier complaints.
    What they used
    Ran prebuilt-invoice in Content Understanding, then a custom analyzer added a classify field for spend category. Values with confidence above 0.85 post straight to the ERP; the rest go to a review screen that shows the grounding.
    Why that choice
    Prebuilt invoice fields handle hundreds of layouts without training, and confidence scores decide what needs a person.
    The result
    Most invoices now post without anyone touching them, and staff spend their time on the few flagged values and supplier queries.

    When to use it and when not to

    ✓ Use it when…

    • Invoices, receipts, ID documents and forms where you need the same fields every time.
    • Mixed layouts from many senders, where templates would break.
    • Workflows that need a confidence score and a link back to the source for review.

    ✕ Think twice when…

    • Plain text you already have as a string. Azure Language or a chat model is simpler.
    • One-off questions about a single document. Asking a chat model with the file attached is quicker.
    • Fully automatic posting of high-value payments with no human review of low-confidence values.

    ↔ Alternatives to consider

    • **Azure Document Intelligence** for existing form-processing apps.
    • **A multimodal chat model** for ad hoc questions about a document.
    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-901 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

    An accounts payable team receives supplier invoices in hundreds of different layouts. The team needs the vendor name, invoice date and invoice total from each invoice without training a model.

    What should the team use?

    Question 2

    Question 2 of 5

    You create a custom Content Understanding analyzer for purchase orders. The PO number is printed on every document. Which field extraction method should you use for the PONumber field?

    Question 3

    Question 3 of 5 · Select 2

    Which TWO pieces of information does Content Understanding return with an extracted field value to support human review?

    Question 4

    Question 4 of 5

    A legal team wants each contract tagged as NDA, Service agreement or Lease. Which field method should the custom analyzer use?

    Question 5

    Question 5 of 5

    You try to run a prebuilt Content Understanding analyzer on a new Foundry resource and the request fails. What must be configured on the resource before analyzers can run?

    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 is Azure Content Understanding used for with documents?

    Model answer

    It reads documents like invoices, receipts and forms and gives back the fields I care about as JSON, such as vendor name, invoice total and due date, plus a Markdown version of the whole document. I can start with a prebuilt analyzer and no training at all.

    Interviewer follows up

    Do you need to train a model first?

    You

    No. Prebuilt analyzers work straight away, and custom fields are defined by describing them in a schema rather than labelling hundreds of samples.

    Intermediate What's the difference between extract, classify and generate?

    Model answer

    Extract copies a value that's printed in the document, like the invoice number. Classify picks one value from a list I give, like Utilities, Travel or Office supplies. Generate writes a new value from the content, like a one-line summary of the contract. Extract only works for documents; classify and generate work for every content type.

    Experienced developer How do you decide which extracted values need a human to check them?

    Model answer

    I use the confidence score on each field. Values above a threshold I've tested, say 0.85, go straight into the system; anything lower goes to a review queue with the grounding so the reviewer sees exactly where on the page the value came from. I tune the threshold on a sample of real documents.

    Scenario A finance team gets invoices from 300 suppliers in different layouts and also wants each one tagged with a spend category. What would you set up?

    Model answer

    Start with prebuilt-invoice for the standard fields since it handles varied layouts. For the category, create a custom analyzer based on prebuilt-invoice or prebuilt-document and add a SpendCategory field with the classify method and a fixed list of categories. Low-confidence values go to a person.

    Quick revision

    Key points

    • Content Understanding uses generative AI to turn documents into Markdown plus JSON fields you define.
    • Prebuilt analyzers include prebuilt-invoice, prebuilt-receipt, prebuilt-layout, prebuilt-read and prebuilt-documentSearch.
    • Custom document analyzers start from prebuilt-document (set as the base analyzer) and add a field schema.
    • Field methods are extract (documents only), classify and generate.
    • Every field has a confidence score (0 to 1) and grounding back to the source.

    Important terminology

    Analyzer
    A Content Understanding configuration that says how to process content and which fields to return.
    Prebuilt analyzer
    A ready-made analyzer from Microsoft, such as prebuilt-invoice or prebuilt-receipt, that needs no setup beyond model deployments.
    Field schema
    The list of fields you want back from a custom analyzer, each with a name, type, description and method.
    Extract, classify, generate
    Field methods. Extract copies a value that appears in the document, classify picks from a list, generate creates a value such as a summary.
    Confidence score
    A number from 0 to 1 that says how sure the service is about an extracted value.
    Grounding
    The page and location in the source document a value came from, so a person can check it.

    Common mistakes

    • Thinking you must label and train on hundreds of samples. Prebuilt analyzers and described fields work without training.
    • Using generate when the value is printed on the page. Use extract so the value is copied, not written.

    Exam tips

    • "Pull totals and dates from invoices with no training" = prebuilt-invoice in Content Understanding.
    • "Decide which values need human review" = confidence scores.

    Five quick revision questions

    1. 1.Which prebuilt analyzer reads invoices?Show

      prebuilt-invoice.

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

      prebuilt-document.

    3. 3.Which field method copies a value printed in the document?Show

      Extract.

    4. 4.What range does a confidence score use?Show

      0 to 1.

    5. 5.What does grounding tell you?Show

      Where in the source document the value was found.

    Official references

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

    Next up: Content Understanding for Images

    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.