Home › Studies › AI-103 › Information Extraction › Document Extraction

Document Extraction

OCR · layout · schema-based field extraction · analyzers · confidence and grounding · RAG-ready Markdown · agentic mode

By the tools4free.dev team · Last reviewed November 13, 2026

Practice questions for this topic →

From OCR to schema-based extraction

Basic OCR recognizes printed text and focuses on text extraction. It doesn't understand meaning, context or relationships between words. Content Understanding goes beyond OCR-based text extraction with schema-based extraction of fields and their values.

AnalyzerUse it for
prebuilt-readBasic OCR: words, paragraphs, formulas, barcodes. No layout analysis.
prebuilt-layoutWords, figures, paragraphs, tables, sections, hyperlinks, annotations in digital PDFs. Doesn't need a language or embedding model.
prebuilt-digitalParseMachine-readable content from the file's internal structure. For scanned or image-based documents use prebuilt-read or prebuilt-layout.
prebuilt-documentSearchRAG ingestion: Markdown, figure descriptions, summary, chunked output.
prebuilt-invoice, prebuilt-receipt, prebuilt-idDocumentDomain-specific field extraction.

Field extraction, confidence and grounding

MethodMeaning
extractValues as they appear in the content (documents only).
classifyPick from predefined categories.
generateFree generation or inference, such as a summary or a risk level.
Config propertyDefaultEffect
enableOcrtrueOCR for scans and image-based PDFs. Can be disabled for native digital PDFs to improve performance.
enableLayouttrueParagraphs, lines, words, reading order, structure.
enableFormulatrueFormulas in LaTeX.
enableBarcodetrueBarcodes and QR codes.
tableFormathtmlTable output: html or markdown.
enableFigureDescriptionfalseText descriptions for figures, diagrams and images.
enableFigureAnalysisfalseChart data extraction and diagram components.
returnDetailsfalse (varies by analyzer)More metadata: confidence scores, bounding boxes, text spans.

extractionMode chooses how document content is analyzed: layout-aware extraction for structured documents where tables, sections and reading order matter, or faster text-only extraction to produce clean Markdown for RAG and ingestion.

Clean representations for agents and RAG

Agentic mode (preview)

Content Understanding or Document Intelligence

ScenarioChoice
OCR or layout extraction onlyprebuilt-read or prebuilt-layout (lower cost, richer layout)
Mostly unstructured documents such as contractsprebuilt-contract analyzer; it can infer fields that aren't written in the document
Custom extraction without labels, unstructured documentsContent Understanding custom analyzer (zero-shot or with a knowledge source)
Custom extraction with labels for highly structured documentsDocument Intelligence custom model (as few as 5 labeled samples)
On-premises or air-gapped deploymentDocument Intelligence containers: the only option today
Multimodal analysis or RAG-ready preprocessingContent Understanding prebuilt or custom analyzers

If you already run Document Intelligence in production, its APIs, endpoints, SDKs and billing are unchanged and no migration is required.

Build and run an analyzer

CLI and PowerShell

TaskAzure CLIPowerShell
Analyze a document with the Python SDK (long-running operation)poller = client.begin_analyze( analyzer_id="prebuilt-invoice", inputs=[AnalysisInput(url=invoice_url)], ) result: AnalysisResult = poller.result()-
Install the Content Understanding Python SDKpython -m pip install azure-ai-contentunderstanding-
Create a custom analyzer (REST)curl -i -X PUT "{endpoint}/contentunderstanding/analyzers/{analyzerId}?api-version=2025-11-01"-
Analyze with an analyzer (REST)curl -i -X POST "{endpoint}/contentunderstanding/analyzers/{analyzerId}:analyze?api-version=2025-11-01"-

Exam Tips

Tick each tip once you can answer it without looking.

“Invoices from many vendors label the same value differently; you want named fields” → Content Understanding analyzer with a schema (semantic field extraction). Trap: OCR alone returns text without meaning or relationships.

“Tables, paragraphs and sections from scanned files; no fields needed” → prebuilt-layout. Trap: prebuilt-read is basic OCR without layout; prebuilt-digitalParse is for digital files.

“Air-gapped or on-premises document processing” → Document Intelligence containers. Trap: Content Understanding isn't listed for this; the page calls containers the only option today.

“Contracts where an end date must be derived from start date and duration” → prebuilt-contract (or a custom Content Understanding analyzer). Trap: Document Intelligence prebuilt models suit standard structured forms.

“Field value chosen from a fixed list, or needs inference” → classify for fixed lists, generate for inference or summary, extract for values written in the content. Trap: extract is supported only for document analyzers.

“Need a 0 to 1 confidence and the source region for each field” → Set estimateFieldSourceAndConfidence = true. Trap: Opt-in, for all field methods. Not on by default.

“Read D(3,1.5,2.0,4.0,0.5)” → Page 3 (one indexed), left, top, width, height. Trap: Five values means the axis-aligned box; the polygon form has eight coordinates.

“Best analyzer to feed a RAG index from PDFs with charts” → prebuilt-documentSearch. Trap: prebuilt-layout and prebuilt-read don't produce figure descriptions or chunks.

“Faster clean Markdown for RAG, no layout-aware analysis” → extractionMode text-only. Trap: tableFormat only sets table output format.

“Analysis Succeeded with warnings and some fields are empty” → Guardrails on the model deployment suppressed field generation; extracted Markdown can remain. Trap: Succeeded doesn't guarantee every field has a value.

“Answer must be calculated or validated from evidence across a document” → Agentic mode: config.workflow = "agentic" (2026-06-01-preview). Trap: For straightforward field extraction use a standard analyzer; agentic costs more tokens and time.

“Custom analyzer for PDFs: which baseAnalyzerId” → prebuilt-document. Trap: Only four base analyzers exist; prebuilt-documentSearch isn't one.

“Which model do you put in the analyzer models property” → A Foundry catalog model name; deployments are mapped by defaults or modelDeployments. Trap: Don't put deployment names there.

“Line items repeated per invoice” → Array of objects in the schema. Trap: Don't ask for JSON text in a string field.

“A 40-page PDF sent synchronously returns only part of the content” → Sync processes the first 5 pages unless a page range is set; use async (up to 2000 pages). Trap: Sync limit is 10 MB and 5 pages.

Sources

Checked against Microsoft Learn on November 13, 2026.

← Retrieval & Grounding PipelinesInformation Extraction overview →