SaveMyCert
Log in
2 of 2 free questions left today·for 5 a day
Implement information extraction solutions

AI-103: Extract Content from Documents with Azure Content Understanding

20 min readAI-103 · Implement information extraction solutionsUpdated

Extracting content from documents for AI-103 means turning PDFs, Office files and scans into clean, grounded output that agents and RAG pipelines can reason over: layout-preserving markdown, structured fields with confidence scores, and the source location of every value. This lesson covers task 5.2 with Azure Content Understanding in Foundry Tools: choosing between the read, layout, digitalParse and documentSearch analyzers, configuring OCR, layout, formula and figure options, how the markdown encodes tables, checkboxes and pages, defining field schemas, using confidence and grounding, improving analyzers with labeled samples, splitting mixed files, and calling analyzers from REST and Python. It also covers when Document Intelligence is the better choice.

What you’ll learn

  • Choose between Content Understanding content extraction, RAG, domain and custom analyzers and Document Intelligence models by document type, labeling budget, connectivity and cost.
  • Configure document content options (OCR, layout, formulas, barcodes, figure description and analysis, table format) knowing which default on and which default off.
  • Interpret Content Understanding markdown: headings, HTML tables, selection marks, page-metadata comments, LaTeX formulas and figure output.
  • Design field schemas with the right extract, classify or generate method and descriptions that follow Microsoft's best practices.
  • Use confidence scores and source/spans grounding to route low-confidence values to human review, and improve weak layouts with labeled samples.
  • Classify and split multi-document files, call analyzers asynchronously through REST or the Python SDK, and keep production analyzers stable.

The 10 parts · about 14 min of reading

  1. Which Foundry Tools option fits a document extraction job?Start hereContent Understanding fits most extraction jobs; Document Intelligence covers labelled structured forms and on-premises containers.2 min
  2. Which content extraction analyzer should you call?Choose prebuilt-read for words, prebuilt-layout for structure and prebuilt-digitalParse for born-digital files and metadata.1 min
  3. Which content options control OCR, layout, formulas and figures?OCR, layout, formula and barcode options default on and figure options off; switch each off or on by the output you need.2 min
  4. How does Content Understanding markdown represent document structure?Markdown carries headings, HTML tables, Unicode checkboxes and page data in HTML comments; figure analysis adds Chart.js and Mermaid.2 min
  5. How do you produce RAG-ready output with prebuilt-documentSearch?prebuilt-documentSearch returns RAG-ready markdown, figure analysis and a summary; custom fields need a prebuilt-document base.1 min
  6. How do you define fields for structured output?Each fieldSchema field picks extract, classify or generate, and detailed descriptions with aliases and the document's language extract best.2 min
  7. How do confidence scores and grounding make output trustworthy?Per-field confidence and grounding are opt-in; source gives page and polygon while spans give offset and length in the markdown.1 min
  8. When do labeled samples improve a custom analyzer?Label one sample per weak layout after refining descriptions; samples can't fix generate fields, OCR misreads or non-document analyzers.1 min
  9. How do you classify and split files that contain several documents?contentCategories with enableSegment splits a file and routes each segment; an Other category catches pages that fit nothing.1 min
  10. How do you call an analyzer and read its result?The GA analyze call returns 202 and an Operation-Location to poll; read contents[0].markdown and fields, and copy prebuilts for production.1 min

Mind map

Content Understanding for mostscenariosZero-shot custom analyzer, no labelsDocument Intelligence for labelledformsContainers for on-premises orair-gappedSelf-reported confidence isn'tcalibrated1✓Choosing the serviceread: words, formulas, barcodeslayout: adds tables, headings, figuresdigitalParse: born-digital, no OCRCheapest analyzer that meets the need2✓Content extractionanalyzersOCR, layout, formula, barcode defaultonFigure description and analysis offTurn off OCR for born-digital filesreturnDetails changes the responseonly3✓Content optionsTables as HTML, keeping merged cellsCheckboxes as ☒ and ☐Page data in HTML commentsFigure analysis: Chart.js and Mermaid4✓Markdown outputdocumentSearch: markdown, figures,summaryNeeds model deployments, costs moreCustom bases: document, image, audio,videoEnable figure options onprebuilt-document5✓RAG-ready outputextract, classify or generate perfieldDescription acts as the promptList aliases and location hintsDescribe fields in the document'slanguageArrays of typed objects for line items6✓Field schemasConfidence from 0 to 1 per fieldWorks for generate fields tooField-level switch saves tokenssource: page and polygon; spans:offsets7✓Confidence and groundingRefine descriptions firstOne sample per weak layoutMeasure on a fixed test setCan't fix generate fields or OCRmisreads8✓Labeled samplesenableSegment splits and routesEach category can have an analyzerIdOther category catches stray pagessegmentPerPage: one segment per page9✓Classify and split202 plus Operation-Location to pollRead contents[0].markdown and fieldsSDK begin_analyze returns a pollerCopy prebuilts for stable production10✓Calling an analyzerDocument extractionwith ContentUnderstanding
Mind map

AI-103: Extract Content from Documents with Azure Content Understanding

Content Understanding for mostscenariosZero-shot custom analyzer, no labelsDocument Intelligence for labelledformsContainers for on-premises orair-gappedSelf-reported confidence isn'tcalibrated1✓Choosing the serviceread: words, formulas, barcodeslayout: adds tables, headings, figuresdigitalParse: born-digital, no OCRCheapest analyzer that meets the need2✓Content extractionanalyzersOCR, layout, formula, barcode defaultonFigure description and analysis offTurn off OCR for born-digital filesreturnDetails changes the responseonly3✓Content optionsTables as HTML, keeping merged cellsCheckboxes as ☒ and ☐Page data in HTML commentsFigure analysis: Chart.js and Mermaid4✓Markdown outputdocumentSearch: markdown, figures,summaryNeeds model deployments, costs moreCustom bases: document, image, audio,videoEnable figure options onprebuilt-document5✓RAG-ready outputextract, classify or generate perfieldDescription acts as the promptList aliases and location hintsDescribe fields in the document'slanguageArrays of typed objects for line items6✓Field schemasConfidence from 0 to 1 per fieldWorks for generate fields tooField-level switch saves tokenssource: page and polygon; spans:offsets7✓Confidence and groundingRefine descriptions firstOne sample per weak layoutMeasure on a fixed test setCan't fix generate fields or OCRmisreads8✓Labeled samplesenableSegment splits and routesEach category can have an analyzerIdOther category catches stray pagessegmentPerPage: one segment per page9✓Classify and split202 plus Operation-Location to pollRead contents[0].markdown and fieldsSDK begin_analyze returns a pollerCopy prebuilts for stable production10✓Calling an analyzerDocument extractionwith ContentUnderstanding

How the exam tests this

Expect short scenarios such as a records office, an insurer, an accounts-payable team or a RAG ingestion job, each with one deciding requirement: lowest cost, no model deployed, born-digital files, an air-gapped site, no labeled data, least development effort, a stable schema across API versions, or a reviewer who must jump to the value on the page. Questions ask which analyzer to call, which content option to switch on or off (and what an empty config does), how the markdown represents checkboxes, pages, tables and figures, which field method fits each value, which grounding property a feature needs, what labeled samples can and can't fix, how to configure classification and splitting, and which line or property completes a Python SDK or REST call. Several are select-TWO items, and wrong options are usually real settings that fail only on the stated constraint, so know each option's default and exact effect.

Key takeaways

  1. Content extraction analyzers need no generative model: prebuilt-read for text and barcodes, prebuilt-layout for structure, prebuilt-digitalParse for born-digital files and, in the GA API, embedded metadata.
  2. prebuilt-documentSearch is the RAG ingestion analyzer: markdown plus figure descriptions, Chart.js and Mermaid analysis, annotations and a summary, with no schema to write.
  3. Custom analyzers derive only from prebuilt-document, prebuilt-image, prebuilt-audio or prebuilt-video; turn on the figure options yourself to get documentSearch-style figures.
  4. enableOcr, enableLayout, enableFormula and enableBarcode default to true; enableFigureDescription and enableFigureAnalysis default to false; tableFormat defaults to html.
  5. Markdown encodes checkboxes as ☒/☐, page numbers, headers, footers and breaks as HTML comments, sections as headings and formulas as LaTeX.
  6. extract returns printed values, classify returns one enum value, generate infers; write detailed, affirmative, same-language descriptions with aliases, and use arrays of objects for repeated rows.
  7. Confidence and grounding come from estimateFieldSourceAndConfidence (analyzer) or estimateSourceAndConfidence (field); source locates the value on the page, spans in the markdown.
  8. Labeled samples come after refined descriptions, one per underperforming layout, measured on a fixed test set; they can't fix generate fields or OCR misreads.
  9. contentCategories with enableSegment splits and routes mixed files; add an 'other' category, use segmentPerPage for one form per page and omitContent for routed results only.
  10. Analyze is asynchronous (202 plus Operation-Location to poll); read contents[0].markdown and fields, and copy prebuilt analyzers into your own for production.
0/10
Ready to start

Part 1: Which Foundry Tools option fits a document extraction job?

Content Understanding fits most extraction jobs; Document Intelligence covers labelled structured forms and on-premises containers.

2 min read · 10 parts, about 14 min in allStart lesson

Frequently asked questions

What is the difference between prebuilt-read and prebuilt-layout in Azure Content Understanding?

prebuilt-read performs OCR and returns the words, paragraphs, formulas and barcode values of a document, without layout analysis. prebuilt-layout adds layout analysis on top, returning tables, sections and headings, figures, hyperlinks and the structural reading order. Neither needs a generative model; read is billed on the cheaper basic meter for scanned pages, while layout analysis uses the standard meter.

When should I use Document Intelligence instead of Content Understanding?

Use Document Intelligence when documents must be processed on premises or in an air-gapped environment, which its containers support, or when you have highly structured forms and can label samples to train a custom model. Content Understanding custom analyzers suit unstructured documents and fields that must be inferred without labeled data.

How do I get chart data and flowcharts into Content Understanding markdown?

Turn on enableFigureAnalysis in the document analyzer's config. It extracts the data behind charts in Chart.js form and writes diagrams such as flowcharts in Mermaid syntax after the image. enableFigureDescription, a separate option, adds a short natural-language description. Both default to false on prebuilt-document; prebuilt-documentSearch already includes them.

Sign up free to mark lessons complete, bookmark topics and track your exam readiness.

Spotted a mistake in this lesson?