Extract Documents with Content Understanding
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 neededExam 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.
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
- In Discover ➜ Foundry Tools open Content Understanding. It runs on the same Foundry resource as your models.
- First set the default model deployments. Without them, analyzers that need a model can't run.
- Create an analyzer based on prebuilt-document. A custom analyzer inherits OCR and layout, and adds your field schema.
- Define the field schema: a name, a type, a method and a description that tells the model what to look for.
- 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.
- 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.
🖱️ Drag to rotate · scroll or pinch to zoom
Content Understanding analyzers
An analyzer turns a document into Markdown (layout, tables, figures) and into fields you define. Each field uses a method: extract (text on the page), classify (a fixed list) or generate (the model writes it). Fields come with a confidence score and a source location.
🤔 What happens if…
Read this tour as text
- Ingest and index content. An indexer reads files from a data source, runs a skillset (OCR, Text Split, an embedding model) and writes one search document per chunk into the index. Scanned images only become searchable when the OCR skill gets the images (imageAction: generateNormalizedImages).
- Keyword, vector, hybrid and semantic. Keyword search (BM25) matches words. Vector search compares embeddings, so it matches meaning. Hybrid runs both in parallel and merges them with Reciprocal Rank Fusion. The semantic ranker then re-reads the top 50 results with a language model and adds captions.
- Enrich with skills. A skillset is a chain of skills that adds fields to each document: built-in skills such as OCR, PII Detection and Key Phrase Extraction, a Web API custom skill for your own code, and the Content Understanding skill for layout-aware chunking. Outputs reach the index through output field mappings or index projections.
- Connect retrieval to an agent. A Foundry agent gets a knowledge base as a tool (an MCP endpoint). The project’s managed identity needs the Search Index Data Reader role. A retrieval reasoning effort of minimal, low or medium decides whether a model plans subqueries. Answers should come back with citations.
- Content Understanding analyzers. An analyzer turns a document into Markdown (layout, tables, figures) and into fields you define. Each field uses a method: extract (text on the page), classify (a fixed list) or generate (the model writes it). Fields come with a confidence score and a source location.
Contoso's claims team receives insurance claim forms as PDFs with photos and handwriting. Set up Content Understanding, compare layout output with a custom analyzer, and learn why confidence scores matter.
🎓 Education-only simulation. Your lab is saved in this browser, so you can leave and continue later.
😟 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
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
| Analyzer | Use it for |
|---|---|
| prebuilt-read / prebuilt-layout | OCR, paragraphs, tables and structure, no fields |
| prebuilt-documentSearch | RAG: Markdown, table structure, figure descriptions, handwritten annotations and a summary |
| Industry analyzers (invoice, contract and others) | Common documents with fields already defined |
| prebuilt-document | The 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" }
} }
}
| Method | Returns | Example |
|---|---|---|
| extract | A value written in the content | Claim number, total |
| classify | One value from a list you give | Type of incident |
| generate | A value the model writes | Summary, 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
- Deploy a chat model and an embedding model on the resource, for example
gpt-4.1-miniandtext-embedding-3-small. - Map them once as the resource’s default model deployments.
- Create the analyzer (
PUT .../contentunderstanding/analyzers/{id}). - 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 Read
OCR and layout analysis read text, tables and figures.
-
2 Extract
The model fills extract fields from the text on the page.
-
3 Classify
Classify fields pick one value from your list.
-
4 Generate
Generate fields get a model-written value, such as a summary.
-
5 Check
Low-confidence fields go to a person. The rest flow on.
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
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.
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.
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.Which method reads values that are written in the document?Show
Extract.
-
2.Which base analyzer do custom document analyzers extend?Show
prebuilt-document.
-
3.What tells you whether to trust a field?Show
Its confidence score (and source).
-
4.What must exist on the Foundry resource before field extraction works?Show
Default chat and embedding model deployments.
-
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.