πŸ”’ Guided

Pre-launch preview. Authorised access only.

Incorrect code

Guided by A Guide to Cloud
Explore AB-900 AI-901
Guided AI-901 Domain 2
Domain 2 β€” Module 14 of 15 93%
25 of 26 overall

AI-901 Study Guide

Domain 1: AI Concepts and Capabilities

  • What is AI? Your First 10 Minutes Free
  • Responsible AI: The Six Principles Free
  • How Generative AI Actually Works Free
  • Choosing the Right AI Model Free
  • Deploying AI Models: Options & Settings
  • AI Workloads at a Glance
  • Text Analysis: Keywords, Entities & Sentiment
  • Speech: Recognition & Synthesis
  • Computer Vision: Seeing the World
  • Image Generation: Creating with AI
  • Information Extraction: From Chaos to Structure

Domain 2: Implement AI Solutions Using Foundry

  • Prompting Fundamentals: System & User Prompts
  • Microsoft Foundry: Your AI Command Center Free
  • Building a Chat App with the Foundry SDK
  • Agents in Foundry: Create & Test
  • Building an Agent Client App
  • Building a Text Analysis App
  • Multimodal: Responding to Speech
  • Azure Speech in Foundry Tools
  • Visual Prompts: Images as Input
  • Generating Images with AI
  • Building a Vision App
  • Content Understanding: Documents & Forms
  • Multimodal Extraction: Images, Audio & Video
  • Building an Extraction App
  • Exam Prep: Putting It All Together

AI-901 Study Guide

Domain 1: AI Concepts and Capabilities

  • What is AI? Your First 10 Minutes Free
  • Responsible AI: The Six Principles Free
  • How Generative AI Actually Works Free
  • Choosing the Right AI Model Free
  • Deploying AI Models: Options & Settings
  • AI Workloads at a Glance
  • Text Analysis: Keywords, Entities & Sentiment
  • Speech: Recognition & Synthesis
  • Computer Vision: Seeing the World
  • Image Generation: Creating with AI
  • Information Extraction: From Chaos to Structure

Domain 2: Implement AI Solutions Using Foundry

  • Prompting Fundamentals: System & User Prompts
  • Microsoft Foundry: Your AI Command Center Free
  • Building a Chat App with the Foundry SDK
  • Agents in Foundry: Create & Test
  • Building an Agent Client App
  • Building a Text Analysis App
  • Multimodal: Responding to Speech
  • Azure Speech in Foundry Tools
  • Visual Prompts: Images as Input
  • Generating Images with AI
  • Building a Vision App
  • Content Understanding: Documents & Forms
  • Multimodal Extraction: Images, Audio & Video
  • Building an Extraction App
  • Exam Prep: Putting It All Together
Domain 2: Implement AI Solutions Using Foundry Premium ⏱ ~14 min read

Building an Extraction App

Build a complete information extraction application using Azure Content Understanding β€” processing documents, routing by confidence, and handling multiple document types.

Building a complete extraction pipeline

β˜• Simple explanation

You’ve learned what Content Understanding can extract. Now let’s build a real app that processes documents automatically.

GreenLeaf receives hundreds of documents daily β€” invoices, delivery notes, quality reports. Instead of manual data entry, their app automatically: reads each document, extracts the important fields, checks confidence scores, routes low-confidence items for human review, and saves everything to their database.

A production extraction application needs more than just API calls. It requires document classification (what type is this?), model selection (which pre-built or custom model to use), confidence-based routing (accept, review, or reject), error handling, and integration with downstream systems.

Architecture of an extraction app

Documents arrive β†’ Classify type β†’ Select analyzer β†’ Extract fields β†’ Check confidence β†’ Route
                                                                       ↓
                                                    High confidence: Save to database
                                                    Low confidence: Queue for human review
                                                    Error: Log and alert

Building the app: step by step

Step 1: Process a document

from azure.ai.documentintelligence import DocumentIntelligenceClient
from azure.core.credentials import AzureKeyCredential

client = DocumentIntelligenceClient(
    endpoint="https://your-resource.cognitiveservices.azure.com/",
    credential=AzureKeyCredential("your-key")
)

def process_invoice(file_path):
    with open(file_path, "rb") as f:
        result = client.begin_analyze_document(
            analyzer_id="prebuilt-invoice",
            body=f.read()
        ).result()

    extracted = {}
    for doc in result.documents:
        for field_name, field in doc.fields.items():
            extracted[field_name] = {
                "value": field.content,
                "confidence": field.confidence
            }

    return extracted

Step 2: Route by confidence

CONFIDENCE_THRESHOLD = 0.85

def route_document(extracted_data):
    low_confidence_fields = []

    for field_name, field_data in extracted_data.items():
        if field_data["confidence"] < CONFIDENCE_THRESHOLD:
            low_confidence_fields.append(field_name)

    if low_confidence_fields:
        return "human_review", low_confidence_fields
    else:
        return "auto_accept", []

Step 3: Handle multiple document types

def process_document(file_path, doc_type):
    model_map = {
        "invoice": "prebuilt-invoice",
        "receipt": "prebuilt-receipt",
        "id_card": "prebuilt-idDocument",
        "crop_report": "custom-crop-report"  # Custom model
    }

    model_id = model_map.get(doc_type, "prebuilt-layout")

    with open(file_path, "rb") as f:
        result = client.begin_analyze_document(
            analyzer_id=model_id,
            body=f.read()
        ).result()

    return result

Production best practices

PracticeWhy
Set confidence thresholdsRoute uncertain extractions for human review
Handle errors gracefullyCorrupted files, unsupported formats, API timeouts
Log everythingTrack extraction accuracy, common failures, throughput
Batch processingProcess documents in parallel for high volume
Validate extracted dataCheck formats (dates, numbers, emails) before saving
Version your custom analyzersTrack model performance over time, roll back if needed
πŸ’‘ Human-in-the-loop pattern

The human-in-the-loop pattern is critical for production extraction apps:

  1. AI extracts data automatically (fast, cheap)
  2. High-confidence results are accepted automatically
  3. Low-confidence results are queued for human review
  4. Humans correct errors and confirm uncertain extractions
  5. Corrected data can be used to improve the model (custom training)

This pattern balances automation speed with human accuracy β€” connecting directly to the reliability and safety responsible AI principle.

Exam relevance: Expect questions about when human review is needed and how confidence thresholds work.

🎬 Video walkthrough

🎬 Video coming soon

Building an Extraction App β€” AI-901 Module 25

Building an Extraction App β€” AI-901 Module 25

~14 min

Flashcards

Question

What is the human-in-the-loop pattern in extraction apps?

Click or press Enter to reveal answer

Answer

AI extracts data automatically. High-confidence results are accepted, low-confidence results go to humans for review. Balances automation speed with human accuracy. Connects to the reliability and safety AI principle.

Click to flip back

Question

What should an extraction app do when a field has low confidence?

Click or press Enter to reveal answer

Answer

Queue the document for human review rather than accepting potentially incorrect data. Set a confidence threshold (typically 0.85+), and flag fields below it.

Click to flip back

Question

How do you process different document types in one extraction app?

Click or press Enter to reveal answer

Answer

Map document types to model IDs: invoices β†’ prebuilt-invoice, receipts β†’ prebuilt-receipt, custom documents β†’ your custom model. Detect or specify the document type, then use the appropriate model.

Click to flip back

Knowledge Check

Knowledge Check

GreenLeaf's extraction app processes an invoice. The vendor name has confidence 0.95 but the total amount has confidence 0.72. What should the app do?

Knowledge Check

MediSpark receives three document types: patient intake forms (custom format), standard invoices, and photo IDs. How should they set up their extraction app?


Next up: Exam Prep β€” reviewing everything you’ve learned and getting ready for the AI-901 exam.

← Previous

Multimodal Extraction: Images, Audio & Video

Next β†’

Exam Prep: Putting It All Together

Guided

I learn, I simplify, I share.

A Guide to Cloud YouTube Feedback

© 2026 Sutheesh. All rights reserved.

Guided is an independent study resource and is not affiliated with, endorsed by, or officially connected to Microsoft. Microsoft, Azure, and related trademarks are property of Microsoft Corporation. Always verify information against Microsoft Learn.