
Proposed design and demonstration. Not executed; no client results or compliance assurance claimed.
The engineering problem
A claim file may contain forms, photographs, correspondence and scans. Extracting a neat JSON object is useful only when a reviewer can tell where each field came from and what the system could not read reliably.
Design the data contract
Build a proposed pipeline that retains source documents, records page and document identifiers, runs OCR where needed and validates extracted fields against an explicit schema. Attach evidence references to extracted values. Route missing, conflicting or low-confidence information to human review.
Keep extraction separate from the final claims or underwriting decision. A model-generated interpretation of a clause is not an authorised coverage determination. Use fictional documents and avoid exposing medical or identity information in examples. Apply case-level permissions to both document retrieval and derived indexes.
Proposed architecture

Proposed demonstration
- Prepare synthetic documents with clear, illegible and conflicting fields.
- Extract into a fixed schema while retaining page references.
- Compare each field with a manually labelled expected value.
- Test case-level access and ensure unsupported fields remain unresolved.
Use fictional records in a disposable environment. Record the source version, configuration, expected outputs and any limitations before executing the exercise.
What to measure
- Field-level extraction correctness
- Evidence-reference validity
- Review workload and missed ambiguities
Keep failures in the results and compare repeated runs against a defined baseline. This first draft contains no executed benchmark or production result.
Evidence to keep
Show extraction errors as well as successes. No reduction in settlement time or underwriting error is claimed before a representative evaluation exists.
The next step is a reproducible implementation, sanitised screenshots and a measured validation record. Any regulatory applicability must be assessed for the institution, activity and jurisdiction; EU frameworks do not automatically apply to every New Zealand bank or insurer.
Worked example and design decisions
A scanned claim form contains one loss date while an attached email states another. Choosing the more legible value is not sufficient. The pipeline should retain both evidence references and mark the field as conflicting for review.
Use this scenario to write the expected result before building the pipeline or agent. Identify the exact source facts, the permitted transformations and the outcome that a reviewer should see. Keep the reference result independent of the implementation under test.
A concrete data or asset contract
The following is a proposed application contract, not an assertion that these are native vendor API fields. Adapt names and types to the selected platform while preserving their intended meaning.
| Proposed field | Meaning and implementation concern |
|---|---|
document_id | Stable fictional document reference |
page_ref | Page or region supporting the extraction |
field_name | Schema field being extracted |
extracted_value | Candidate value, not an automatic fact |
validation_state | Accepted, conflicting or unresolved |
review_ref | Human review outcome where required |
Document null semantics, stable identifiers and schema ownership with the contract. A missing observation, a zero amount and a denied lookup are different states and should not collapse into the same empty response.
Implementation blueprint
1. Preserve document identity
Version the original document and its pages before extraction. A revised scan should not overwrite the provenance of an earlier decision.
2. Separate OCR and semantic extraction
Keep text recognition errors distinguishable from interpretation errors. The two stages can fail differently and need different tests.
3. Validate field candidates
Check types, allowed values and cross-field consistency. Require evidence references for important fields and retain unresolved values explicitly.
4. Route review and publish approved fields
Give reviewers the relevant page context and a clear correction path. Publish approved structured values with their evidence rather than an untraceable flattened summary.
Failure analysis: test the uncomfortable case
A plausible policy number is extracted from a neighbouring form and attached to the wrong claim. Include document-to-case identity tests, not just field accuracy on isolated pages.
Build this condition into the synthetic test set. Capture the observed output, the control that should detect the issue and the recovery decision. If the system returns a polished but unsupported result, record that as a failure rather than a successful request.
Operational ownership and runbook
Track field-level errors, unresolved conflicts and review queues. Re-evaluate when document templates, OCR engines or extraction prompts change.
A useful incident record identifies the affected product or capability, the relevant run or request, the business time represented and the owner of the next action. Distinguish restoring infrastructure from restoring correct service output. Preserve enough versioned evidence to explain the recovered state.
Evidence required before a production claim
The core design controls for this topic are: Document versions; page evidence; candidate validation; identity checks; and accountable human review.
- Contract review: confirm field meaning, intended use, owner and access boundaries.
- Positive and negative tests: include the worked example, invalid inputs, restricted access and the failure case described above.
- Repeatable measurements: retain configuration, workload size, timing method, failures and the baseline used for comparison.
- Recovery evidence: demonstrate the documented recovery route and validate the resulting data or application behaviour.
This expanded article remains a proposed technical design. Environment-specific configuration, screenshots and measured outcomes should be added only after the implementation is executed and reviewed.
References and scope
References checked 29 October 2026. Sources provide context; the architecture and exercise are proposed editorial examples, not vendor-certified implementations.
