Azure Document Intelligence capabilities

Megan Leverock 0 Reputation points
2026-10-23T13:54:10.3833333+00:00

Does Azure Document Intelligence allow you to compare the data extracted with either prebuilt models or custom models?

Azure Document Intelligence in Foundry Tools
0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2026-10-23T13:54:48.69+00:00

    Azure AI Document Intelligence can extract data with prebuilt or custom models, but comparing extracted values against another document, reference dataset, or model result must be implemented in your application or workflow.

    What Document Intelligence provides

    • Prebuilt models extract predefined fields for supported document types such as invoices and receipts.^1^
    • Custom extraction models extract fields that you label during training. Custom template models suit fixed layouts, while custom neural models handle structured, semi-structured, and unstructured documents.^2^
    • Analysis results are returned as structured JSON containing fields, values, tables, and related document elements.
    • Confidence scores estimate how likely an extraction is to be correct. They can drive acceptance thresholds or human review, but they do not indicate whether an extracted value matches a reference value.^3^

    There is no native Document Intelligence operation documented for business comparisons such as:

    • Does an invoice amount equal a purchase-order amount?
    • Did two documents produce identical values?
    • Does an extracted date fall within an allowed range?
    • Did a prebuilt model and custom model return the same result?
    1. Analyze the source document using the selected prebuilt or custom model.
    2. Read the fields and confidence values from the analysis JSON.
    3. Normalize values before comparison—for example, convert dates to one format and monetary strings to decimals.
    4. Compare them in application code, Azure Functions, Logic Apps, or Power Automate.
    5. Route low-confidence or mismatched results for human review.

    For example, after mapping each model’s output into a common field dictionary:

    from decimal import Decimal
    
    extracted = {"invoiceId": "INV-1007", "total": "1250.00"}
    reference = {"invoiceId": "INV-1007", "total": "1250.00"}
    
    result = {
        "invoiceIdMatches":
            extracted["invoiceId"].strip() == reference["invoiceId"].strip(),
        "totalMatches":
            Decimal(extracted["total"]) == Decimal(reference["total"]),
    }
    
    result["passed"] = all(result.values())
    print(result)
    

    If comparing the output of a prebuilt model with a custom model, first map semantically equivalent fields to the same names because their response schemas may differ. Also keep the model and API version fixed during testing; custom-model field-level confidence includes word confidence in API version 2024-11-30 (GA), which also adds confidence for tables, rows, and cells.^3^

    If the objective is only to extract a few additional fields rather than compare values, query fields can extend the extraction schema of a prebuilt or custom model. This is a premium extraction capability, not a comparison engine.^4^


    References

    1. Get started with Document Intelligence (programming-language-rest-api)
    2. Document Intelligence custom models
    3. Interpret and improve accuracy and confidence scores
    4. Document Intelligence add-on capabilities
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.