# Using Confidence Scores in Document Extraction

- Canonical: https://schematax.com/blog/confidence-scores-in-document-extraction
- Author: Schema Tax (https://schematax.com)
- Published: 2025-11-08T04:43:50.000Z
- Updated: 2025-11-08T04:43:50.000Z

Confidence scores in document extraction tell you how sure the model was about each value it read, not whether the value is right. Use them to decide which fields a person checks: set a cut-off per field type, send anything below it to review, run math and pattern checks on everything, and log corrections to tune the cut-offs.

## What do confidence scores in document extraction measure?

A confidence score in document extraction is a number, often between 0 and 1, that a model attaches to a value it read. It reflects how certain the model was about that reading. It does not measure whether the value matches the paper, and a score of 0.98 is not a 98% chance of being correct.

The score comes from inside the model. When a reader decides that a smudged character is a 7 rather than a 1, it weighs several options and picks one. The confidence is a summary of how lopsided that choice was. A crisp, printed digit gives a lopsided choice and a high score. A faint stamp or a handwritten figure gives a closer call and a lower score.

Scores can attach at several levels. A character score covers one glyph. A field score covers a whole value, such as an amount in a box. Some services also score the page classification, meaning how sure they are that a page is a W-2 and not a 1099-MISC. For review decisions, the field score is the one that matters most.

Scores from different services are not comparable. One vendor's 0.9 can behave like another's 0.7, and a model update can shift scores for the same document. A cut-off that worked last season needs checking after any change to the extraction service.

Not every service exposes a number at all. Some return a simple status per field, such as confirmed or needs review, and make the threshold decision internally. Schema Tax takes the status approach from the user's side: boxes it is unsure about are flagged on an editable view of the form for you to confirm instead of guessed. How flags and statuses appear in a response is covered in the post on [what a tax form extraction API returns](/blog/what-a-tax-form-extraction-api-returns).

## Setting a review threshold for confidence scores in document extraction

A review threshold for confidence scores in document extraction is the cut-off below which a field goes to a person. Set it per field type, based on what an error costs. A wrong taxpayer ID or withholding amount costs more than a misspelled street name, so those fields deserve a higher cut-off and more review.

One threshold for every field is the usual starting mistake. It either sends too many low-stakes fields to review or lets high-stakes errors through. Grouping fields by type and cost gives you a handful of thresholds that are easy to reason about.

Start from cost, not from the score distribution. Ask what happens downstream if this field is wrong. A wrong amount flows into totals and returns. A wrong TIN attaches a form to the wrong person. A wrong name is usually caught by a human glance. A wrong Box 12 code on a W-2 changes what an amount means.

### Example thresholds by field type

The cut-offs below are examples to show the method. They are not recommendations for any particular service, and they are not Schema Tax settings; Schema Tax flags the boxes it is unsure about for you to confirm.

| Field type | Example fields | Example cut-off | What happens below it |
| --- | --- | --- | --- |
| Amounts | Wages, withholding, interest, proceeds | 0.95 | Flag for review; hold totals that include it |
| TINs | Recipient SSN (masked), payer EIN | 0.97 | Flag; also run the pattern check; block matching until confirmed |
| Names and addresses | Recipient name, payer address | 0.80 | Flag only if it fails a match to the account |
| Codes | W-2 Box 12 codes, K-1 line item codes, state codes | 0.90 | Flag; check the code against the allowed list |
| Checkboxes | Any checked or unchecked box on the form | 0.90 | Flag; show the cropped image beside the choice |

Each row pairs a number with an action. A threshold without a defined action is a log line nobody reads.

Classification needs a threshold of its own. If the service is unsure whether a page is a 1099-MISC or a 1099-NEC, every field on that page is suspect, however confident each reading looks, because the box meanings depend on the form. Treat a low classification score or a classification flag as a reason to review the whole form, not one box.

Expect to move these numbers. Pick a starting point, measure how many flagged fields were actually wrong and how many unflagged fields were later corrected, and adjust. The last section of this post covers that loop.

## Who fixes a flagged box in a human in the loop document API?

In a human in the loop document API, a flagged box is fixed by a person, and the choice is which person: an in-house reviewer, the end user who uploaded the form, or a review queue staffed by the service or a partner. Each option trades speed, cost and accuracy differently, and many products use more than one.

The term "human in the loop" means the system routes some decisions to a person before results count as final. The API's part is to say which fields need a person and to accept the corrected value back.

### In-house reviewers

A team inside your company sees every flagged field. This suits back-office flows, such as a lender reviewing income documents, where staff are trained and accountable. The cost is staff time, and the queue can back up at peak season.

### End users

The person who uploaded the form often has the paper in hand. Showing them the flagged box next to an image crop and asking them to confirm is fast and costs you nothing per field. The risk is that users click through without looking. The section on [letting users correct flagged fields in a fintech upload screen](/blog/tax-document-upload-for-fintech-apps#letting-users-correct-flagged-fields-in-a-fintech-upload-screen) covers the screen design that makes users actually check.

### A review queue

Some services run a queue of their own reviewers, or let you route flags to an outside team. This removes the work from both you and your users, at a price and with some delay.

Whoever fixes the box, record the original value, the corrected value and who changed it. The post on [human review of OCR results](/blog/human-review-ocr) goes deeper into reviewer workflows and the tools that make them fast.

## Why can a high confidence score in document extraction still be wrong?

A high confidence score in document extraction can still be wrong because the model can be confidently mistaken. It may read a clean digit perfectly from the wrong box, misread a form that looks like another, or read a value the issuer printed in error. Math and pattern checks catch what confidence alone misses.

The common mistake is to skip validation for fields above the threshold. Confidence describes the reading, not the meaning. A crisp $4,180.00 read from Box 4 when it belongs to Box 2 will score high and still be wrong.

Recomputing relationships between boxes catches many of these. The [IRS General Instructions for Forms W-2 and W-3](https://www.irs.gov/instructions/iw2w3) include an example in which Box 4, social security tax withheld, is "6.2% of the amount in box 3", social security wages. If an extracted Box 4 is far from 6.2% of Box 3, one of the two values, or the form, needs a look, whatever their scores.

Pattern checks catch identifier errors. The same W-2 instructions give the EIN format as XX-XXXXXXX. A value read with high confidence that has eight digits, or a letter where a digit belongs, fails the pattern and should be flagged anyway.

Cross-box rules catch misplacement. The [IRS Instructions for Form 1099-INT](https://www.irs.gov/instructions/i1099int) tell payers to enter in Box 1 "taxable interest not included in box 3." A result where Box 1 and Box 3 hold the same amount suggests a value was read into both boxes.

Some errors are on the paper itself. An issuer can print the wrong figure, and the model will read it perfectly. Only a comparison with outside records, such as pay stubs or invoices, finds those.

Schema Tax runs this kind of validation on every form: it recomputes totals, checks rates and tests TINs against their patterns, and keeps the checks each value passed. You can see those checks on a sample form in the [interactive demo on the homepage](/#demo). The [accuracy and security category](/blog/category/accuracy-and-security) covers math, rate and TIN pattern checks in depth.

## Logging confidence scores from document extraction to tune review

Logging confidence scores from document extraction means storing each field's score, or its flag, together with whether a person later changed the value. Over time that log shows where your threshold is too strict, where it is too loose, and which fields the model struggles with, so you can move cut-offs on evidence.

Log one row per field per document. Useful columns are the document ID, form type, tax year, field name, extracted value, score or flag, whether it was reviewed, the final value, and who confirmed it. Keep masked identifiers masked in this log, the same as everywhere else.

Two numbers come out of the log. The first is how many flagged fields were actually changed. If reviewers change almost none of them, the threshold for that field type is sending too much to review. The second is how many unflagged fields were corrected later. If that number is not near zero for amounts or TINs, the threshold is too loose.

Here is a fictional example. Over one batch, 400 amount fields came back flagged and reviewers changed 12 of them. Of 6,000 unflagged amount fields, users later corrected 9. The flagged pile is mostly correct values, but the 9 slips are amounts, which are costly. A team might leave the cut-off where it is and add a math check that would have caught the 9, rather than lower the threshold.

Break the numbers down by field and by source. Phone photos may need a stricter cut-off than portal PDFs. One issuer's layout may trip the model more than others. A per-field breakdown also tells you which fields deserve their own check.

Store field names consistently so the log can be grouped. The post on [designing a tax form JSON schema](/blog/designing-a-tax-form-json-schema) covers naming fields so that Box 1 on a W-2 and Box 1 on a 1099-INT never land in the same column.

Review the thresholds at fixed points: before tax season, after a model update, and when a new form type or source starts arriving. Thresholds set once and left alone drift out of step with the documents.
