Microsoft AI-103: OCR, Layout, and Document Field Validation
A document-processing system can return every invoice field in valid JSON and still approve the wrong amount. OCR may misread a digit, a layout model may connect a value to the wrong label, or a language model may guess a missing field that the template expects. Azure Document Intelligence and Content Understanding provide tools for converting documents into text, structure and targeted values, but the output must be treated as evidence to verify, not automatically as an authorized business record. This guide builds an extraction workflow around page structure, traceable field provenance, deterministic validation and human review. It emphasizes the difference between a successful service call and a correct operational decision.
On this page
- Separate readable text, layout, and business fields
- Choose the model by document type and maturity
- Preprocess documents without destroying information
- Keep exact source locations for every important field
- Validate fields with business rules outside the model
- Route uncertain cases to useful human review
- Govern sensitive document content and retention
- Measure accuracy by field and document family
Separate readable text, layout, and business fields
OCR converts visible characters into text; document layout extraction adds reading order, table boundaries and associations; business-field extraction assigns meaning such as invoice amount, tax or due date. Treat these as different accuracy tests. A model can transcribe every number correctly but attach the total to the wrong invoice row, or identify a table while missing its currency. Retain coordinates, confidence information and source spans so a reviewer can trace each value. Validate field types and relationships before using an extracted amount in payment or accounting automation, and route doubtful documents to a controlled exception path.
Start with a specimen document set covering native PDFs, scanned invoices, forms, photographed receipts, multi-page agreements and poorly formatted files. Mark which fields are business-critical and what evidence supports each one. Consider whether prebuilt Document Intelligence models cover the document family or whether an approved custom analyzer is more appropriate. Avoid constructing one enormous generic schema that tries to capture every imaginable field. More optional fields can encourage unsupported guesses and complicate review. Preserve the original file and checksum as the source of truth for corrections.
Choose the model by document type and maturity
Azure Document Intelligence offers Read and Layout capabilities and prebuilt models for selected document families. Content Understanding can extract structured information across modalities, with production and preview capabilities depending on the API version. These offerings are related but not interchangeable, and model maturity, geography and pricing should be verified before architectural commitments. A prebuilt invoice extractor may be suitable for a recognizable invoice family while a bespoke scientific report requires custom fields and different review rules. The chosen service should match the required evidence, not simply have the most flexible marketing description.
Record endpoint, resource type, model identifier, API version, region and supported input formats in a deployment manifest. Test migration between API generations against real document samples. A field or coordinate format can change even when the result still looks like valid JSON. Consider whether an operation is synchronous or asynchronous for the selected file type. Avoid inferring availability from an older tutorial or from a preview demo. A service call that succeeds only in a test tenant or region is not sufficient evidence that a multi-region production plan will work.
Microsoft’s April 2026 Microsoft AI-103 skills outline still names Content Understanding single-task and pro-mode pipelines, but that terminology needs lifecycle context. Pro mode from the 2025-05-01-preview API is retired. Microsoft’s 2026-06-01-preview introduces agentic mode for document analyzers, but it is not a drop-in replacement: the initial preview accepts one input file per analysis request, does not support fields using the extract method, and does not support improving analyzers with labeled samples. For supported standard extraction needs, the 2025-11-01 generally available API remains the production baseline. Candidates should understand why the older pro-mode workflow handled complex document reasoning without mistaking a retired preview endpoint for a current implementation path.
Preprocess documents without destroying information
Validate the file’s MIME type, size, page count and password status before processing. A scanned page may need rotation or deskewing, but aggressive image cleanup can erase thin decimal points, annotations or check-box marks. Preserve both original and transformed files when changes could affect the evidence. Keep page order and document boundaries stable. Splitting a purchase order into unrelated pages can cause values from one document to be assigned to another. Use an ingestion identifier and file checksum so retries can be recognized without creating duplicate business records.
When batching documents, distinguish one multi-page record from several records concatenated in one PDF. A service may extract text accurately from every page yet not know which pages belong to the same invoice. Use approved classification or segmentation capabilities where suitable, then validate document identity before field extraction. Avoid treating an LLM’s inferred boundary as incontrovertible evidence; a reviewer may need to inspect attachment separators and header continuity. Make ingestion recoverable so a malformed file does not block all valid files in a job.
Keep exact source locations for every important field
For each extracted field, store the original document ID, page number and, where available, a span, bounding region or related source element. A human reviewer should be able to open the page and see why the model selected a date or amount. If a field’s confidence is low or the document contains contradictory values, show that uncertainty rather than selecting a plausible number. OCR can confuse a letter O with zero, and tables with repeated labels can be especially difficult. Add business reference checks instead of expecting one model output to resolve every ambiguity.
Treat source evidence as a separate data object from the normalized final value. A raw string like “03/04/26” might be ambiguous until document locale or business context is considered. Record the parsing rule that converted it to a date. Monetary fields should retain currency symbols and units during validation. If a computed total does not agree with subtotal and tax fields, open a review exception; do not silently adjust the values to make the equation balance. An automated correction without supporting evidence can be more dangerous than a visible extraction failure.
Validate fields with business rules outside the model
Implement deterministic checks for field types, required presence, allowed ranges, currency consistency, entity identifiers, cross-field arithmetic and dates. Decide which fields are allowed to be missing. A schema that always requires a supplier identifier will tempt a generative extractor to fill a plausible but nonexistent value. Mark genuinely absent fields as unknown and let a reviewer supply them when authorized. Validate extracted names or addresses against approved records if those records are available, but do not automatically force a fuzzy match that could merge unrelated businesses.
For invoices, compare sums with tolerances appropriate to rounding rules, verify duplicate invoice numbers and flag payment instructions that differ from registered supplier details. A field-validation system should be conservative about financial account changes. For contracts, distinguish “effective date” from “signature date” and preserve which clause provided a term. Validation needs a record of which rule fired, not merely a red error icon. When rules or allowed-value lists change, version the configuration so historical decisions remain auditable.
Route uncertain cases to useful human review
Build a review interface around the disputed fields and their source locations. If the model’s invoice total is wrong, the reviewer should see the selected amount, alternative candidates and relevant page, not have to search an entire document blindly. Keep user corrections separate from the original automated output and record who approved the final field. A reviewer changing a payment destination should follow stronger authorization than one correcting punctuation. Review thresholds must reflect business impact rather than an arbitrary uniform confidence number.
Measure how often the human reviewer confirms or changes each extracted field and how long review takes. If one model regularly misses handwritten totals, adapt that document pathway instead of making every reviewer inspect every easy digital invoice. A selective review policy can reduce cost without hiding severe mistakes. Include source documentation about how model confidence should be interpreted; different APIs and models may expose confidence signals with different meanings. Do not describe a number as a calibrated probability unless supported and tested for the relevant field family.
Govern sensitive document content and retention
Invoices, contracts and identity forms frequently contain personal and financial data. Limit where original files, intermediate OCR, extracted fields and review screenshots are stored. A normalized vendor name or invoice number can still be sensitive when linked to a customer account. Use least-privilege identities for analysis, storage and downstream workflows. Derived text must respect the original document’s access and deletion rules; copying it to a broad search index can undo carefully applied file-level permissions. Avoid storing complete document contents in unprotected application logs.
Define retention by document category and regulatory obligations. A rejected draft invoice may need different handling from an approved legal agreement. Maintain a recoverable record of final decisions without keeping unnecessary duplicates of the raw data. When a document is deleted or its access changes, update cached summaries and extracted records appropriately. Apply redaction policies before showing sensitive source spans to reviewers who do not need them. Security controls should cover both automated processing accounts and people using the review UI.
Measure accuracy by field and document family
Build a labeled evaluation set with varied formats, fonts, languages and real exceptions, under proper data-use permission. Report OCR character errors, layout-table association errors, field precision and recall, unsupported-value invention and final business decision accuracy separately. Average document-level accuracy can hide a systematic mistake in a small but crucial class of payment fields. Include negative test cases where a required field is genuinely missing, a page is unreadable or two documents contain almost identical identifiers. The correct behavior may be to stop for review, not to return a complete result.
Take a packet with a purchase order, a scanned invoice and a handwritten delivery note. Even when the page OCR looks accurate, the system can associate a line-item quantity with the wrong product or mistake the order date for the delivery date. Compare each extracted field with its exact original page span and label the business rule that checks it. For instance, invoice line totals can be calculated deterministically from quantity and unit price, while a handwritten exception may require a reviewer to inspect the image. Do not average those two outcomes into one undifferentiated ‘document accuracy’ number.
Evaluate clean PDFs, rotated smartphone photographs, low-resolution scans and forms with missing fields separately. Keep document type and model version with each result so a sudden rise in errors after a scanner replacement is diagnosable. A confidence score is not permission to ignore an invalid payment amount; business-level controls may require a second operator to approve such fields regardless of OCR confidence. Store an audit trail from source upload through validation, reviewer correction and downstream action without copying sensitive full documents into broad-access logs.
Version the API, chosen model, document preprocessing, extraction schema and validation rules together. Recheck old samples after a model update; a small parsing improvement could conceal a new layout regression. Measure how much reviewer effort is saved and whether severe corrections occur before any real payment or compliance action. A successful Azure document-processing pipeline is one where every important value can be traced to source evidence, validated appropriately and corrected by accountable people. The operational goal is not the fullest JSON object; it is a reliable business record.