Decide how far to trust the structured result
Run document extraction and read confidence as a signal that separates automated handling from review.
Question for this chapter
Is the presence of extracted values enough to make an automated decision?
Why this matters now
A claim amount and diagnosis code can be present and still be wrong. Before sending them into the next automation step, you need a signal for judging the output's quality.
Try it
Open claim_extraction in the processed collection and select Run. When it finishes, open
extracted_fields and find CLM-2025-006.
Before the run, only intake metadata existed. After the run, values read from the document and a quality signal appear in the same row.
Success looks like this
Inspect these three values in the CLM-2025-006 row:
| Value | Result |
|---|---|
claim_amount | 1850.0 |
diagnosis_code | J20.9 |
confidence | 0.52 |

Interpret the result
confidence is neither the probability that the claim is valid nor the model's overall accuracy. In
this sample it is a quality signal for practicing whether automated handling should continue.
The threshold is 0.6. This claim's 0.52 is below it. Even though amount and diagnosis are present,
the safer action is to stop and ask a person to compare them with the source.
Deep dive — two paths that create the values
document_parser currently has two execution paths:
- When
pdf_direxists andpdfplumberis available, it reads claim amount and diagnosis code from the bundled PDF with regular expressions. - In the default Portal run without
pdf_dir, it uses a deterministic fallback keyed byclaim_idto reproduce the same result.
| Output field | Source |
|---|---|
claim_amount, diagnosis_code | PDF text or deterministic fallback |
claimant_name, policy_number | Copied intake metadata |
incident_date | Date portion of received_at |
currency | USD fixed in code |
confidence | Decision signal created by sample rules |
The default Portal path does not perform an S3 download, OCR call, or LLM call. This Workshop is a deterministic demonstration of the data contract and decision after document structuring.
Next decision
You found a low quality signal. Next, put it into an ordered rule that decides whether automation continues or hands the claim to a person.