← Develop AI Apps and Agents o… Latent Shelf · Ch.29

Module Study Guide · Path 4 · Visual data

Extract Data with Azure Document Intelligence

OCR reads the words; Document Intelligence reads the form — key-value pairs, tables, and selection marks, with a bounding box on every one.

— the module's value

Structured extraction from documents. This module covers Document Intelligence and its three model categories, the Studio, the prebuilt models for common document types, and custom models — template, neural, classifiers, and composed.

read & layoutprebuilt modelstemplate vs neural15 quiz questions
01The service

Three model categories

Azure Document Intelligence uses OCR and deep learning to extract structured data — text, key-value pairs, selection marks, tables — returning JSON that preserves structure via bounding-box coordinates. It reaches accuracy without building models from scratch, leaning on models pre-trained on thousands of forms.

The three model categories.
CategoryWhat it offers
Document analysisRead (text + language detection) and Layout (adds tables and structure).
PrebuiltReady-made extractors for common types (invoices, receipts, tax forms, IDs) — no training.
CustomTemplate, neural, composed models, and classifiers for your own document types.

Access via REST, SDKs (Python, C#, Java, JS), the Studio, or the Foundry portal. Input: JPEG/PNG/BMP/PDF/TIFF, under 500 MB (standard tier), 50×50 to 10,000×10,000 px, not password-protected.

02Studio & prebuilt

Explore visually, extract with prebuilt models

The Document Intelligence Studio (documentintelligence.ai.azure.com) is a visual tool to test models, review fields and confidence scores, and build custom models — auto-generating the required JSON files (ocr.json, labels.json, fields.json). Add-ons include high-resolution extraction, formula/font/barcode extraction, searchable PDF, and natural-language query fields (some are premium).

Key concept · Read, Layout, and the prebuilt catalog

The Read model extracts printed/handwritten text and detects language — best for documents with no fixed structure. The Layout model adds selection marks (checkboxes), complex tables (merged cells), structure, and optional key-value pairs. On top sit prebuilt models for financial/legal (invoice, receipt, bank statement, check, pay stub, contract), US tax (W-2, 1098/1099/1040), US mortgage (1003/1004/1008, closing disclosure), and identity (ID document, health insurance card, marriage certificate). Always check for an existing prebuilt model before building custom.

03Custom models

Template, neural, classifiers, composed

When no prebuilt fits, train a custom model on labeled samples (5–6+ recommended, stored in Blob Storage with a SAS URL, built via the Build model API).

Custom template vs. custom neural.
FactorTemplateNeural
Best forStructured forms, consistent layoutSemi/unstructured, varying layouts
Training timeMinutesLonger
CostLowerHigher
AccuracyHigh for fixed layoutsHigher overall, handles variation
Languages100+Fewer

Key concept · Classifiers and composed models

Custom classifiers identify a document's type before extraction, routing it to the right model. A composed model bundles several custom models into one — Document Intelligence classifies the incoming document and routes it to the best component, ideal for multi-form scenarios. Start with template models for consistent layouts; move to neural if accuracy is short or layouts vary.

★Test yourself

Chapter 29 quiz

Fifteen questions on the service, Studio/prebuilt, and custom models. Answer first, then expand Show answer.

Part A · Multiple choice

Q1

What does Document Intelligence preserve using bounding-box coordinates?

  • A The document's structure and object positions
  • B The file's compression
  • C The user's identity
  • D The billing tier
Show answer

A. Returned in JSON with coordinate tracking.

Q2

Which document-analysis model extracts text and detects language only?

  • A Read
  • B Layout
  • C Invoice
  • D Neural
Show answer

A — Read. Layout adds tables and structure.

Q3

Which model adds selection marks and complex table extraction?

  • A Layout
  • B Read
  • C Receipt
  • D Classifier
Show answer

A — Layout. It absorbed the old general-document model's features.

Q4

Which is a prebuilt model type?

  • A Invoice
  • B A model you must train yourself
  • C Sora-2
  • D FLUX
Show answer

A — Invoice. Along with receipt, W-2, ID document, and more.

Q5

Which custom model type is best for consistent, fixed layouts and trains in minutes?

  • A Custom template
  • B Custom neural
  • C Composed
  • D Read
Show answer

A — custom template. Neural handles varying layouts with higher accuracy.

Q6

What does a custom classifier do?

  • A Identify a document's type before invoking extraction
  • B Translate the document
  • C Compress the PDF
  • D Generate an image
Show answer

A. Routing documents to the right extraction model.

Q7

What does a composed model do?

  • A Bundles several custom models and auto-routes documents
  • B Merges two PDFs
  • C Fine-tunes GPT-4.1
  • D Nothing
Show answer

A. Classifies the input and routes to the best component model.

Part B · True or false

Q8

Document Intelligence can extract handwritten as well as printed text.

Show answer

True. The Read model classifies text as handwritten or printed.

Q9

Input documents can be password-protected.

Show answer

False. Password-protected files are not supported.

Q10

The Studio auto-generates ocr.json, labels.json, and fields.json for custom models.

Show answer

True. It automates the custom-model pipeline.

Q11

Custom template models support more languages than neural models.

Show answer

True. 100+ vs. fewer for neural.

Q12

You should build a custom model before checking whether a prebuilt one exists.

Show answer

False. Always check for an existing prebuilt model first.

Part C · Short answer

Q13

Name the three model categories.

Show answer

Document analysis (read/layout), prebuilt models, and custom models.

Q14

Name four things Document Intelligence can extract from a document.

Show answer

Any four: text, key-value pairs, selection marks, tables, fields, bounding boxes.

Q15

Roughly how many labeled samples are recommended to train a custom model?

Show answer

At least 5–6 — larger, more varied datasets improve accuracy.