BrainyBeeBrainyBee
ExploreBlogStart Studying
HomeDeveloping AI Apps and Agents on Azure (AI-103)Extract information by using multimodal pipelines that combine OCR, layout analysis, and field extraction
Lesson2,807 words

Extract information by using multimodal pipelines that combine OCR, layout analysis, and field extraction

AI-103 › Unit 5: Implement information extraction solutions › Extract content from documents › Extract information by using multimodal pipelines that combine OCR, layout analysis, and field extraction

Extract information by using multimodal pipelines that combine OCR, layout analysis, and field extraction

Document extraction stacks three capabilities that are often confused. OCR turns pixels into characters. Layout analysis turns characters into structure — paragraphs, tables, selection marks, and paragraph roles. Field extraction turns structure into typed values. Each answers a different question, and choosing the wrong layer produces a pipeline that reads a document without understanding it.

Why This Matters

Reading is not understanding. prebuilt-read gives text; prebuilt-layout gives the structure that downstream logic actually consumes.

Paragraph roles are the examinable list. title, sectionHeading, footnote, pageHeader, pageFooter, pageNumber — with different file-type support per role.

v4.0 changed the markdown representation. Tables became HTML tables, and selection marks became the Unicode characters ☒ and ☐.

Three layers, three models

prebuilt-read — text, and the only model producing a searchable PDF. prebuilt-layout — paragraphs, tables, selection marks, paragraph roles, figures, sections, plus Markdown via outputContentFormat=markdown. prebuilt-invoice / prebuilt-contract — strongly typed fields. Add-ons such as font/style are enabled at analyze time.

Prerequisites

  • Document cracking and the normalized images branch.
  • That only JSON is indexable.
  • Content Understanding's field methods, with extract documents-only.
  • Chunking on structure rather than character count.

Learning Objectives

By the end of this lesson you will be able to:

  1. Distinguish read, layout, and field extraction models.
  2. Use paragraph roles and know their file-type support.
  3. Read selection marks and tables, including the v4.0 markdown changes.
  4. Apply page-unit rules across file formats.
  5. Combine the layers into a working pipeline.

Building Blocks

Version. Document Intelligence v4.0: 2024-11-30 (GA), with prebuilt-layout available through the Studio, REST API, and the C#, Python, Java, and JavaScript SDKs.

What layout extracts. Pages, Paragraphs, Text, lines, and words, Selection marks, Tables, Markdown output, Figures, and Sections.

Paragraph roles. "The new page object detection based on machine learning extracts logical roles like titles, section headings, page headers, page footers, and more… It's best to use paragraph roles with unstructured documents to help understand the layout of the extracted content for a richer semantic analysis."

RoleDescriptionSupported file types
title"The main headings on the page"PDF, Image, DOCX, PPTX, XLSX, HTML
sectionHeading"One or more subheadings on the page"PDF, Image, DOCX, XLSX, HTML
footnote"Text near the bottom of the page"PDF, Image
pageHeader"Text near the top edge of the page"PDF, Image, DOCX
pageFooter"Text near the bottom edge of the page"PDF, Image, DOCX, PPTX, HTML
pageNumber"Page number"PDF, Image

Selection marks. They "appear within the pages collection for each page" and include "the bounding polygon, confidence, and selection state (selected/unselected)". The text representation :selected: and :unselected: is included "as the starting index (offset) and length".

Positioning. spans "points to the text fragment within the top-level content property"; boundingRegions gives position. For 2024-11-30 GA, "the bounding regions for figures and tables cover only the core content and exclude the associated caption and footnotes".

Markdown output. "Use the outputContentFormat=markdown to specify the output format." For v4.0 2024-11-30 GA, "the representation of tables is changed to HTML tables to enable rendering of items like merged cells and multirow headers", and "use the Unicode checkbox characters ☒ and ☐ for selection marks instead of :selected: and :unselected:".

Page units. Images = 1 page unit each; PDF = each page; TIFF = each image; DOCX = up to 3,000 characters; XLSX = each worksheet; PPTX = each slide. For Office formats, "embedded or linked images aren't supported".

Caveat. "Table analysis isn't supported if the input file is XLSX."

The three layers

Attribute
Answers

What characters are here?

How is it organised?

What is the value of X?

Returns

Text, lines, words

Paragraphs, tables, marks, roles

Typed fields

Model

prebuilt-read

prebuilt-layout

prebuilt-invoice, prebuilt-contract, custom

Unique property

Searchable PDF

Markdown output

Strongly typed values

Deep Dive

Read, layout, and why the difference matters

The three layers are cumulative, and the jump people skip is the middle one.

prebuilt-read extracts text — lines, words, handwritten styles. Its distinctive deliverable is the searchable PDF, which is a document artefact rather than an index entry: a scanned file that can now be searched in a viewer.

prebuilt-layout adds structure: paragraphs, tables, selection marks, paragraph roles, figures, and sections. This is what downstream logic consumes. A table returned as rows and cells can be summed; the same table flattened into a text blob cannot. A checkbox with a state of selected is a boolean; the same checkbox as characters is a guess.

Field extraction — prebuilt-invoice, prebuilt-contract, or a custom model — returns strongly typed values for known document types, so an invoice total arrives as a number rather than as text you must parse.

The design question is what the downstream step needs. Grounding a model for retrieval needs text, and layout markdown makes it better. Computing, validating, or routing on values needs structure or typed fields, and text alone will not do — which is why "extract the tables" is a layout requirement, not an OCR one.

Building the extraction pipeline

  1. 1

    Decide what downstream needs

    Text → read. Structure → layout. Typed values → field extraction.

Paragraph roles and what they unlock

The roles are a short, memorisable list, and their value is described precisely: "It's best to use paragraph roles with unstructured documents to help understand the layout of the extracted content for a richer semantic analysis."

Three uses follow.

Chunk boundaries. title and sectionHeading mark where a document's own structure changes — vastly better boundaries than "every 5,000 characters", and the direct answer to chunking that severs facts from their qualifiers.

Noise removal. pageHeader, pageFooter, and pageNumber identify repeated furniture that adds nothing to retrieval and dilutes embeddings when included in every chunk. Knowing their role lets you drop them.

Context injection. The enclosing sectionHeading can be carried into each chunk, making it self-sufficient for a model that sees nothing else.

The file-type support column is the examinable detail, because it is uneven. footnote and pageNumber are PDF and Image only — they are not produced for DOCX, PPTX, XLSX, or HTML. sectionHeading covers PDF, Image, DOCX, XLSX, and HTML but not PPTX. A pipeline relying on a role for a format that does not produce it degrades silently.

Tables, selection marks, and the v4.0 markdown change

Two structures carry most of the value in real documents, and both changed representation in v4.0.

Tables are extracted as structure with cells and spans — and in markdown output, "the representation of tables is changed to HTML tables to enable rendering of items like merged cells and multirow headers". That is a meaningful upgrade: pipe-delimited markdown tables cannot express a merged cell, so a document with a multirow header was previously mangled. Any parser written against the older representation breaks here, which is exactly why it is examinable.

Selection marks — checkboxes and radio buttons — come with a state of selected or unselected, a confidence, and a bounding polygon. In markdown, v4.0 uses "the Unicode checkbox characters ☒ and ☐… instead of :selected: and :unselected:". The documentation notes a subtlety worth knowing: "the content of selection-mark fields contains :selected: even though their spans refer to Unicode characters in the top-level span" — the two representations coexist.

The practical point: a form's meaning lives in its checkboxes, and a pipeline that flattens a document to plain text loses every one of them. Consent given, option chosen, box ticked — all invisible without selection-mark extraction.

Format support is uneven, and failures are silent

Tables are not analysed for XLSX. footnote and pageNumber roles are PDF and Image only. Embedded or linked images aren't supported for DOCX, XLSX, and PPTX, and DOCX counts 3,000 characters as one page unit. None of these raise an error — the pipeline simply returns less than you expected for those formats, which is why a mixed-format corpus needs sampling per format, not just per pipeline.

Combining the layers

A working multimodal pipeline usually stacks all three, plus the cracking step that precedes them.

Cracking exposes /document/content and /document/normalized_images/*, so scanned pages and embedded figures are reachable.

OCR or read turns those images into text — without which scanned content is absent entirely.

Layout structures it: paragraphs with roles, tables as cells, selection marks with state, figures identified.

Field extraction types the values that matter, where the document type is known.

Then the output is shaped for its consumer: markdown for retrieval and grounding, JSON fields for automation, and positions — spans and boundingRegions — carried forward so an answer can cite a location. Remember that for 2024-11-30 GA the bounding regions for figures and tables "cover only the core content" and exclude captions and footnotes, so a citation drawn from them points at the table rather than its caption.

Worked Examples

Example 1 — a form's meaning is missing. Scanned consent forms are indexed as text, and questions about which options were selected return nothing useful.

Plain text loses selection marks. Use prebuilt-layout, which returns each mark's state (selected/unselected), confidence, and bounding polygon. In markdown output, v4.0 renders them as the Unicode ☒ and ☐ rather than :selected: / :unselected:.

Example 2 — chunks that sever context. A long policy document is chunked every 5,000 characters and retrieved passages lose the rule they qualify.

Chunk on paragraph roles instead — title and sectionHeading mark the document's own boundaries — and drop pageHeader, pageFooter, and pageNumber as furniture. Carry the enclosing sectionHeading into each chunk so it is self-sufficient. Note footnote and pageNumber are PDF and Image only.

Example 3 — a spreadsheet with no tables. A pipeline extracts tables successfully from PDFs and returns none from XLSX files.

"Table analysis isn't supported if the input file is XLSX." There is no error — the format simply does not produce them. Handle spreadsheets on a different path, and note the related format rules: XLSX counts each worksheet as one page unit, and embedded or linked images aren't supported for Office formats.

Visual Explanations

The three layers stacking:

Loading Diagram...
Figure 1 — Mermaid diagram

Paragraph roles by use:

Loading Diagram...
Figure 2 — Mermaid diagram

Common Mistakes

Using read where layout is needed. Tables and marks require layout.

Flattening forms to text. Selection-mark state is the meaning.

Chunking by character count where paragraph roles exist.

Assuming every role applies to every format. footnote and pageNumber are PDF and Image only.

Expecting tables from XLSX. Not supported.

Parsing markdown tables as pipe-delimited. v4.0 emits HTML tables.

Expecting :selected: in v4.0 markdown. It uses ☒ and ☐.

Assuming Office formats yield embedded images.

Expecting figure bounding regions to include captions. They exclude captions and footnotes.

Practice Exercises

  1. Distinguish the three layers by the question each answers.
  2. List the six paragraph roles and name those limited to PDF and Image.
  3. What changed in v4.0's markdown output, and why does each change matter?
  4. What does a selection mark return, and why is it lost in plain text?
  5. Give three format-specific behaviours that fail silently.
▶Answers
  1. OCR / read — "what characters are here?" — returning text, lines, and words, plus the searchable PDF. Layout — "how is it organised?" — returning paragraphs with roles, tables, selection marks, figures, and sections. Field extraction — "what is the value of X?" — returning strongly typed values.
  2. title, sectionHeading, footnote, pageHeader, pageFooter, pageNumber. footnote and pageNumber are PDF and Image only; sectionHeading covers PDF, Image, DOCX, XLSX, and HTML but not PPTX.
  3. Tables became HTML tables "to enable rendering of items like merged cells and multirow headers" — pipe-delimited markdown cannot express a merged cell, so multirow headers were previously mangled. Selection marks became the Unicode ☒ and ☐ instead of :selected: / :unselected: — so parsers written against the old strings break.
  4. The bounding polygon, a confidence, and a state of selected or unselected. Plain text loses it because the state is the meaning — consent given, option chosen, box ticked — and a flattened document carries characters without that boolean.
  5. Table analysis is unsupported for XLSX; footnote and pageNumber roles are produced only for PDF and Image; and embedded or linked images aren't supported for DOCX, XLSX, and PPTX (where DOCX counts 3,000 characters as one page unit). None raise an error.

Summary & Concept Map

Document extraction stacks three layers. prebuilt-read answers what characters are present and uniquely produces a searchable PDF. prebuilt-layout answers how the document is organised, returning paragraphs with roles, tables, selection marks with state and confidence, figures, and sections — and, with outputContentFormat=markdown, a representation that in v4.0 uses HTML tables for merged cells and multirow headers and the Unicode ☒ and ☐ for marks. Field extraction answers what a value is, returning strongly typed fields for known document types. The six paragraph roles — title, sectionHeading, footnote, pageHeader, pageFooter, pageNumber — give chunk boundaries, identify furniture to drop, and supply context to inject, with uneven file-type support that fails silently. So does XLSX table analysis and Office-format image handling — which is why a mixed-format corpus is sampled per format.

Loading Diagram...
Figure 3 — Mermaid diagram
Loading flashcards…

Sources and freshness

Written against current Microsoft Learn documentation for the AI-103 skills measured (16 April 2026), reviewed 2026-08-20. Microsoft Learn controls every changing product contract — availability, preview status, quotas, limits, regional support, naming, and retirement dates all move independently of this lesson. Where a scenario turns on a specific number or a GA/preview boundary, confirm it against the product's own page before relying on it.

All Developing AI Apps and Agents on Azure (AI-103) Study Resources

Related Notes

  • Choose an appropriate method for retrieval and indexing2,778 words
  • Quick Note — Choose an appropriate method for retrieval and indexing888 words
  • Choose an appropriate model for each task, including LLMs, small language models, multimodal models, and Foundry Tools3,097 words
  • Quick Note — Choose an appropriate model for each task, including LLMs, small language models, multimodal models, and Foundry Tools1,041 words
  • Choose appropriate memory, tool, and knowledge integration services for agent solutions2,815 words
  • Quick Note — Choose appropriate memory, tool, and knowledge integration services for agent solutions949 words
  • Choose the appropriate Foundry services for generative tasks, grounding, vector search, agent workflows, or multimodal processing2,733 words
  • Quick Note — Choose the appropriate Foundry services for generative tasks, grounding, vector search, agent workflows, or multimodal processing901 words
  • Apply responsible AI instrumentation, including evaluators, safety evaluations, and explanation tooling2,891 words
  • Configure safety filters, guardrails, risk detection, and content moderation2,795 words
  • Govern agent behavior with oversight modes, constraints, and tool-access controls2,863 words
  • Implement auditing through trace logging, provenance metadata, and approval workflows2,624 words

Ready to study Developing AI Apps and Agents on Azure (AI-103)?

Practice tests, flashcards, and all study notes — free, no sign-up.

Start Studying

Ready to study Developing AI Apps and Agents on Azure (AI-103)?

Practice tests, flashcards, and all study notes — free, no sign-up needed.

Start Studying — Free
Developing AI Apps and Agents on Azure (AI-103) ResourcesExplore All HivesBlogHome

© 2026 BrainyBee. Free AI-powered exam prep.

Loading Diagram...
Flowchart, left to right. Document connects to Cracking:<br/>content + normalized_images. CR connects to READ / OCR:<br/>text, lines, words<br/>+ searchable PDF. OCR connects to LAYOUT:<br/>paragraphs + ROLES,<br/>tables, selection marks,<br/>figures, sections. LAY connects to FIELD EXTRACTION:<br/>typed values<br/>invoice / contract / custom. LAY connects to Markdown output:<br/>HTML tables, ☒ / ☐. MD connects to Retrieval and grounding. FLD connects to Automation and validation.
Loading Diagram...
Flowchart, top to bottom. Paragraph roles connects to Chunk boundaries. Paragraph roles] --> B[Chunk boundaries connects to Noise to drop. Paragraph roles] --> B[Chunk boundaries connects to Context to inject. B connects to title - all major formats. B connects to sectionHeading - not PPTX. N connects to pageHeader, pageFooter. N connects to pageNumber - PDF and Image ONLY. N connects to footnote - PDF and Image ONLY. 1 more statements.
Loading Diagram...
Flowchart, top to bottom. Document extraction connects to Read / OCR. Document extraction] --> L1[Read / OCR connects to Layout. Document extraction] --> L1[Read / OCR connects to Field extraction. Document extraction] --> L1[Read / OCR connects to Format traps. L1 connects to Text, lines, words. L1 connects to Only model with SEARCHABLE PDF. L2 connects to Paragraphs + 6 ROLES. L2 connects to Tables, selection marks, figures. 9 more statements.

Document extraction — retrieval

Card 1 of 6

Front of flashcard 1 of 6

The six paragraph roles

hard

title, sectionHeading, footnote, pageHeader, pageFooter, pageNumber. footnote and pageNumber are PDF and Image only; sectionHeading omits PPTX. Best used "with unstructured documents… for a richer semantic analysis".

layout

Document extraction — retrieval

Card 1

Front

The six paragraph roles

Back

title, sectionHeading, footnote, pageHeader, pageFooter, pageNumber. footnote and pageNumber are PDF and Image only; sectionHeading omits PPTX. Best used "with unstructured documents… for a richer semantic analysis".

Card 2

Front

What changed in v4.0 markdown

Back

Tables became HTML tables "to enable rendering of items like merged cells and multirow headers", and selection marks use the Unicode characters ☒ and ☐ instead of :selected: / :unselected:. Parsers written for the old representation break.

Card 3

Front

What a selection mark returns

Back

A bounding polygon, a confidence, and a selection state of selected or unselected. Plain text loses this because the state is the meaning — consent, chosen option, ticked box.

Card 4

Front

Read vs layout vs field extraction

Back

prebuilt-read — characters; the only model producing a searchable PDF. prebuilt-layout — structure: paragraphs with roles, tables, marks, figures, sections, markdown. Field extraction (prebuilt-invoice, prebuilt-contract, custom) — strongly typed values.

Card 5

Front

Silent format behaviours

Back

Table analysis isn't supported for XLSX. footnote and pageNumber are PDF/Image only. Embedded or linked images aren't supported for DOCX, XLSX, PPTX, where DOCX counts 3,000 characters as one page unit. No errors — sample per format.

Card 6

Front

Using paragraph roles for chunking

Back

title and sectionHeading give the document's own boundaries — far better than a character count. pageHeader, pageFooter, pageNumber are furniture to drop. Carry the enclosing sectionHeading into each chunk so it is self-sufficient.

Document extraction — retrieval

Card 1

Front

The six paragraph roles

Back

title, sectionHeading, footnote, pageHeader, pageFooter, pageNumber. footnote and pageNumber are PDF and Image only; sectionHeading omits PPTX. Best used "with unstructured documents… for a richer semantic analysis".

Card 2

Front

What changed in v4.0 markdown

Back

Tables became HTML tables "to enable rendering of items like merged cells and multirow headers", and selection marks use the Unicode characters ☒ and ☐ instead of :selected: / :unselected:. Parsers written for the old representation break.

Card 3

Front

What a selection mark returns

Back

A bounding polygon, a confidence, and a selection state of selected or unselected. Plain text loses this because the state is the meaning — consent, chosen option, ticked box.

Card 4

Front

Read vs layout vs field extraction

Back

prebuilt-read — characters; the only model producing a searchable PDF. prebuilt-layout — structure: paragraphs with roles, tables, marks, figures, sections, markdown. Field extraction (prebuilt-invoice, prebuilt-contract, custom) — strongly typed values.

Card 5

Front

Silent format behaviours

Back

Table analysis isn't supported for XLSX. footnote and pageNumber are PDF/Image only. Embedded or linked images aren't supported for DOCX, XLSX, PPTX, where DOCX counts 3,000 characters as one page unit. No errors — sample per format.

Card 6

Front

Using paragraph roles for chunking

Back

title and sectionHeading give the document's own boundaries — far better than a character count. pageHeader, pageFooter, pageNumber are furniture to drop. Carry the enclosing sectionHeading into each chunk so it is self-sufficient.