Fatskills
Practice. Master. Repeat.
Study Guide: Cloud ML - Azure AI Engineer Associate (Exam AI-102): Analyze Receipts, Business Cards, and ID Documents
Source: https://www.fatskills.com/machine-learning-101/chapter/cloud-ml-cert-azure-ai-analyze-receipts-business-cards-and-id-documents

Cloud ML - Azure AI Engineer Associate (Exam AI-102): Analyze Receipts, Business Cards, and ID Documents

By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.

⏱️ ~7 min read

Azure_AI – Analyze Receipts, Business Cards, and ID Documents


Azure AI-102 Study Guide: Analyze Receipts, Business Cards, and ID Documents


What This Is

This topic covers Azure AI Document Intelligence (formerly Form Recognizer), a pre-built AI service that extracts text, tables, key-value pairs, and structured data from receipts, business cards, ID documents (passports, driver’s licenses), and invoices—without requiring custom ML models. It’s critical in automated document processing pipelines (e.g., expense reporting, KYC verification, or invoice automation) where manual data entry is slow, error-prone, or unscalable.

Real-world scenario:
A fintech company processes thousands of receipts daily for expense reimbursement. Instead of manual entry, they use Azure AI Document Intelligence to extract merchant names, dates, totals, and line items, then feed the structured data into Azure Logic Apps for approval workflows. This reduces processing time from hours to minutes and cuts errors by 90%.


Key Terms & Services

  • Azure AI Document Intelligence (formerly Form Recognizer):
    Azure’s pre-trained and customizable document analysis service. Extracts text, tables, key-value pairs, and structured fields from receipts, business cards, IDs, invoices, and forms. Supports OCR (Optical Character Recognition) and layout analysis to understand document structure.

  • Prebuilt Models (Azure AI Document Intelligence):
    Ready-to-use models for receipts, business cards, IDs (passports, driver’s licenses), invoices, and tax forms. No training required—just send an image/PDF and get structured JSON output.

  • Custom Models (Azure AI Document Intelligence):
    Train a custom document model when prebuilt models don’t fit (e.g., proprietary forms). Uses labeled data (5+ samples) to learn field locations and relationships.

  • Layout Model (Azure AI Document Intelligence):
    Extracts text, tables, and selection marks (checkboxes) from any document, even if no prebuilt model exists. Useful for unstructured documents (e.g., contracts, reports).

  • OCR (Optical Character Recognition):
    Converts scanned images/PDFs into machine-readable text. Azure’s OCR is language-agnostic (supports 100+ languages) and handles handwriting, low-quality scans, and skewed documents.

  • Key-Value Pair Extraction:
    Identifies labeled fields (e.g., "Total: $100") and returns them as structured data. Works best with forms, invoices, and receipts.

  • Azure Blob Storage:
    Cloud storage for documents (PDFs, images) before processing. Document Intelligence reads files directly from Blob Storage (no need to download locally).

  • Azure Logic Apps / Power Automate:
    Low-code workflow automation to process extracted data (e.g., send receipt data to an expense system, flag suspicious IDs for review).

  • Azure Cognitive Search:
    Full-text search over extracted document data. Useful for querying receipts by date, vendor, or amount (e.g., "Show all receipts from Starbucks in June").

  • Azure Functions:
    Serverless compute to trigger Document Intelligence when a new file is uploaded to Blob Storage. Scales automatically for high-volume processing.

  • Confidence Scores (Document Intelligence):
    Each extracted field includes a confidence score (0–1). Use this to filter low-confidence data (e.g., only process receipts with >90% confidence in the total amount).

  • Bounding Boxes (Document Intelligence):
    Coordinates (top, left, width, height) of extracted text/fields in the original document. Useful for highlighting fields in a UI or validating extraction accuracy.


Step-by-Step / Process Flow


1. Choose the Right Model

  • Prebuilt model? Use if your document type is supported (receipts, business cards, IDs, invoices).
  • Custom model? Train if your documents are non-standard (e.g., company-specific expense forms).
  • Layout model? Use for unstructured documents (e.g., contracts, reports) where you only need text/tables.

2. Set Up Azure Resources

  • Create an Azure AI Document Intelligence resource in the Azure Portal.
  • Note the endpoint and key (needed for API calls).
  • Upload documents to Azure Blob Storage (or use local files for testing).

3. Call the API (Prebuilt Model Example)

  • REST API (Python example):
    ```python from azure.ai.formrecognizer import DocumentAnalysisClient from azure.core.credentials import AzureKeyCredential

endpoint = "YOUR_ENDPOINT" key = "YOUR_KEY" document_url = "https://yourstorage.blob.core.windows.net/receipts/receipt1.jpg"

client = DocumentAnalysisClient(endpoint, AzureKeyCredential(key)) poller = client.begin_analyze_document_from_url("prebuilt-receipt", document_url) result = poller.result() print(result.fields["Total"].value) # Extracted total amount `` - Key parameters: -prebuilt-receipt(for receipts) -prebuilt-idDocument(for passports/driver’s licenses) -prebuilt-businessCard` (for business cards)

4. Process Extracted Data

  • Filter low-confidence fields (e.g., if field.confidence < 0.8: flag_for_review()).
  • Map fields to your database schema (e.g., receipt.total → expense_system.amount).
  • Store results in Azure SQL Database / Cosmos DB for querying.

5. Automate the Pipeline

  • Trigger processing with Azure Functions (when a new file is uploaded to Blob Storage).
  • Use Logic Apps to route data (e.g., send receipts to an expense system, flag suspicious IDs for manual review).
  • Index extracted data in Azure Cognitive Search for fast querying.

6. Monitor & Improve

  • Log errors (e.g., low-confidence extractions) in Azure Application Insights.
  • Retrain custom models with new labeled data if accuracy drops.
  • Set up alerts for failed processing (e.g., "No text detected in document").


Common Mistakes


Mistake 1: Using the Wrong Model for the Job

  • Example: Using the layout model for receipts (when the prebuilt-receipt model exists).
  • Correction: Always check if a prebuilt model exists before using layout or custom models. Prebuilt models are faster, cheaper, and more accurate for standard documents.

Mistake 2: Ignoring Confidence Scores

  • Example: Blindly trusting all extracted fields without checking confidence scores.
  • Correction: Filter fields with low confidence (<0.8) and route them for human review. This prevents errors in downstream systems (e.g., expense fraud).

Mistake 3: Not Handling Multi-Page Documents

  • Example: Assuming all receipts are single-page (some invoices span multiple pages).
  • Correction: Use begin_analyze_document (not begin_analyze_document_from_url) for multi-page PDFs. The API handles pagination automatically.

Mistake 4: Overlooking Bounding Boxes for Validation

  • Example: Not using bounding boxes to verify field locations (e.g., "Total" should be near the bottom of a receipt).
  • Correction: Use bounding boxes to visually validate extractions (e.g., highlight fields in a UI) or reject misaligned fields.

Mistake 5: Forgetting to Optimize for Cost

  • Example: Processing thousands of receipts in real-time when batch processing would suffice.
  • Correction: For high-volume, non-urgent processing, use batch mode (cheaper than real-time API calls). For real-time (e.g., mobile expense apps), use the async API.


Certification Exam Insights


1. Prebuilt vs. Custom Models

  • Exam Trap: The exam tests whether you know when to use prebuilt models (e.g., receipts, IDs) vs. custom models (e.g., proprietary forms).
  • Key Rule:
  • Prebuilt = Standard documents (receipts, business cards, IDs, invoices).
  • Custom = Non-standard documents (e.g., company-specific expense forms).
  • Layout = Unstructured documents (e.g., contracts, reports).

2. Document Intelligence vs. Azure Cognitive Search

  • Exam Trap: Candidates confuse Document Intelligence (extracts structured data) with Cognitive Search (indexes/searches unstructured text).
  • Key Rule:
  • Use Document Intelligence to extract fields (e.g., "Total: $100").
  • Use Cognitive Search to search across extracted data (e.g., "Find all receipts over $50 from Starbucks").

3. Handling Low-Quality Documents

  • Exam Trap: The exam asks how to improve accuracy for blurry, skewed, or handwritten documents.
  • Key Rule:
  • Preprocessing: Use Azure Computer Vision (for image enhancement) before sending to Document Intelligence.
  • Postprocessing: Filter low-confidence fields and route for human review.

4. Cost Optimization

  • Exam Trap: The exam tests whether you know the cheapest way to process documents.
  • Key Rule:
  • Batch processing (async API) is cheaper than real-time (sync API).
  • Free tier allows 500 pages/month (good for testing).


Quick Check Questions


Question 1

A retail company wants to automate expense reporting by extracting data from employee receipts. The receipts are standard (e.g., restaurant, gas station) and include merchant name, date, total, and line items. Which Azure service should they use for maximum accuracy and minimal setup?

Answer: Azure AI Document Intelligence (prebuilt-receipt model).
Explanation: The prebuilt-receipt model is optimized for standard receipts and requires no training, making it the fastest and most accurate option.


Question 2

A bank needs to verify customer IDs (passports and driver’s licenses) for KYC compliance. The system must extract name, date of birth, and ID number and flag suspicious documents for review. Which Azure service should they use, and what additional step is needed for validation?

Answer: Azure AI Document Intelligence (prebuilt-idDocument model) + confidence score filtering.
Explanation: The prebuilt-idDocument model extracts ID fields, but low-confidence extractions should be flagged for human review to prevent fraud.


Question 3

A logistics company processes thousands of invoices daily but struggles with multi-page PDFs where the "Total Due" field appears on the last page. Which Azure service and API method should they use to handle this?

Answer: Azure AI Document Intelligence (prebuilt-invoice model) + begin_analyze_document (not begin_analyze_document_from_url).
Explanation: begin_analyze_document handles multi-page PDFs, while begin_analyze_document_from_url is for single-page documents.


Last-Minute Cram Sheet

  1. Prebuilt models = Receipts, business cards, IDs, invoices → no training needed.
  2. Custom models = Proprietary forms → requires 5+ labeled samples.
  3. Layout model = Unstructured documents (contracts, reports) → extracts text/tables only.
  4. Confidence scores = Filter fields with <0.8 confidence for human review.
  5. Bounding boxes = Coordinates of extracted fields → use for validation/UI highlighting.
  6. Async API = Cheaper for batch processing (e.g., nightly invoice runs).
  7. Sync API = Faster for real-time (e.g., mobile expense apps).
  8. Free tier = 500 pages/month (good for testing).
  9. ⚠️ Document Intelligence ≠ Cognitive Search → Extracts data vs. searches data.
  10. ⚠️ Multi-page PDFs → Use begin_analyze_document, not begin_analyze_document_from_url.


ADVERTISEMENT