prebuilt-payStub.us maps YTD taxes to CurrentPeriodTaxes and returns incorrect YearToDateNetPay

Aniket Patil 0 Reputation points
2026-11-25T11:31:58.3066667+00:00

We're using the prebuilt-payStub.us model with API version 2024-11-30, and see these issues on test pay stubs:

Issue 1: the document has no consolidated current-period taxes field, but the model returns a CurrentPeriodTaxes value. YearToDateNetPay is also incorrect.

Field Expected Actual
CurrentPeriodTaxes Not present Value returned
-------- -------- --------
CurrentPeriodTaxes Not present Value returned
YearToDateNetPay 3,855.14 629.97

Issue 2: the pay stub shows separate Current Taxes (523.10) and YTD Taxes (5,983.85). The model returns the YTD amount as CurrentPeriodTaxes, and no YTD taxes value is returned.

Field Expected Actual
CurrentPeriodTaxes 523.10 5,983.85
-------- -------- --------
CurrentPeriodTaxes 523.10 5,983.85
YTD Taxes 5,983.85 Not returned

Test pay stubs (synthetic data) with the relevant sections highlighted are attached.

Questions:

  1. Does the payStub model schema include a year-to-date taxes field? If not, what's the recommended way to extract it (e.g. query fields)?
  2. Are these known accuracy issues, and is there a newer model or API version that improves current vs YTD mapping?
  3. Any recommended approach for validating current vs YTD values in the response?
Azure Document Intelligence in Foundry Tools
0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2026-11-25T11:33:21.05+00:00

    prebuilt-payStub.us already defines YearToDateTaxes, so read that field directly; when it is absent or the YTD value is assigned to CurrentPeriodTaxes, treat the result as an extraction error and reject or review it rather than accepting the mislabeled value.

    Schema and version

    The 2024-11-30 payStub schema includes these distinct numeric fields:

    • CurrentPeriodTaxes
    • YearToDateTaxes
    • CurrentPeriodNetPay
    • YearToDateNetPay

    Therefore, query fields are not required merely to obtain YTD taxes. The documented GA combination is:

    • Model: prebuilt-payStub.us
    • API: 2024-11-30
    • Locale: en-us

    The official page points to the corresponding 2024-11-30-ga/pay-stub.md schema and does not document a newer GA payStub version.^1^

    For your examples:

    • A value printed beside YTD Taxes should be returned as YearToDateTaxes, not CurrentPeriodTaxes.
    • If the document has no consolidated current-period tax value, CurrentPeriodTaxes should not be trusted merely because the model populated it.
    • YearToDateNetPay is also a native schema field. The returned 629.97 versus the printed 3,855.14 is another field-level extraction mismatch, not evidence that the field is unsupported.

    Query-fields fallback

    As a mitigation, submit explicit query fields such as YearToDateTaxes, CurrentPeriodTaxes, and YearToDateNetPay. Query fields can extend a prebuilt schema or request fields under explicit names. They are a priced add-on, support at most 20 fields per request, and should be validated against your document formats.^2^

    For REST:

    curl -i -X POST \
      "{endpoint}/documentintelligence/documentModels/prebuilt-payStub.us:analyze?api-version=2024-11-30&features=queryFields&queryFields=YearToDateTaxes,CurrentPeriodTaxes,YearToDateNetPay" \
      -H "Content-Type: application/json" \
      -H "Ocp-Apim-Subscription-Key: {key}" \
      --data-ascii '{"urlSource":"{document-url}"}'
    

    The POST returns 202 with an Operation-Location; retrieve the completed JSON using the result URL or the Get Analyze Result operation.^3^

    Keep query-field results separate from native-schema results during evaluation. If both are returned, compare:

    1. Native YearToDateTaxes
    2. Queried YearToDateTaxes
    3. Native CurrentPeriodTaxes
    4. Queried CurrentPeriodTaxes
    5. Their source text, confidence, and location

    Query fields are an extraction fallback, not a guarantee that visually adjacent current/YTD columns will always be classified correctly.

    Validate semantic placement in addition to confidence:

    1. Inspect content
      Confirm the text associated with each field contains the expected amount.
    2. Inspect boundingRegions
      Verify that CurrentPeriodTaxes points to the current-period column and YearToDateTaxes points to the YTD column. Reject the field if its polygon falls under the wrong heading.
    3. Check field presence rules
      If the source contains no aggregate current-tax field, return null or flag the model-generated value for review rather than treating it as authoritative.
    4. Apply cross-field checks
      Where the pay-stub layout supports them, compare gross pay, deductions, taxes, and net pay. Use these checks to flag discrepancies, not to overwrite printed values automatically, because payroll layouts differ.
    5. Route ambiguous results for review
      Trigger review when a field is missing, has low confidence, overlaps the wrong column, duplicates another field’s amount, or fails your payroll arithmetic tolerances.

    Known-issue and escalation status

    The current Document Intelligence known-issues page does not list a payStub-specific issue for CurrentPeriodTaxes, YearToDateTaxes, or YearToDateNetPay.^4^ That does not make the observed mapping correct; it means there is no published service-confirmed issue or documented upgrade that can currently be cited as resolving it.

    If query fields and post-validation do not produce acceptable results, open an Azure support request and include:

    • Synthetic sample files
    • Complete analyze JSON responses
    • Resource region
    • Model ID and API version
    • Expected field-to-value mappings
    • The relevant field content, confidence, and boundingRegions
    • Reproduction results from Document Intelligence Studio and REST/SDK

    This gives the product team enough evidence to assess the samples as a payStub model-quality defect.


    References

    1. Document Intelligence payStub model - Foundry Tools | Microsoft Learn
    2. Document Intelligence add-on capabilities
    3. Get started with Document Intelligence (programming-language-rest-api)
    4. Azure Document Intelligence in Foundry Tools known issues - Foundry Tools | Microsoft Learn
    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.