CASE STUDY 02

DocuCheck — Reliable extraction from changing logistics documents

A document-intelligence workflow for structured data extraction where imperfect scans and layout drift make naive template matching unreliable.

Problem

Shipping and logistics documents often contain recurring information but do not remain geometrically identical between files or document revisions.

OCR quality can also vary significantly.

A reliable system therefore needs to tolerate controlled layout drift without silently attaching a field to the wrong nearby text.

Core workflow

DocuCheck extraction workflow A document is read by an OCR and extraction stage, then matched against known field anchors. A landmark resolver decides whether it is confident or uncertain: confident matches produce a proposal, while uncertain matches are not applied and are routed to human confirmation. Document OCR / extraction Known field anchors Landmark resolver confident Proposal uncertain No apply Human confirmation
  1. Document
  2. OCR / extraction
  3. Known field anchors
  4. Landmark resolver
  5. Proposal confident re-anchoring
  6. No apply uncertain re-anchoring
  7. Human confirmation
Confident re-anchoring produces a proposal. Uncertain re-anchoring is never silently applied; it is routed to human confirmation.

Key engineering decision

Propose, do not silently apply

The resolver may suggest a re-anchored field location, but uncertain re-anchoring is surfaced for confirmation rather than automatically mutating the document mapping.

Layout drift

Because the same field can appear under slightly different layouts, the resolver works with landmark families — groups of expected anchors — rather than a single absolute coordinate.

When the neighbouring structure of an anchor differs from what the family expects, that difference is treated as a drift signal. The field is not re-attached to whichever text happens to be closest.

Deterministic versus semantic AI

I evaluated whether an AI semantic locator would improve this slice, but kept the deterministic landmark approach where it provided better predictability and testability.

A semantic model can help interpret ambiguous prose, but when the question is whether a value belongs to a specific field, a rule that can be reproduced in a test is easier to trust and to audit.

Reliability

The reliability work around this workflow is deliberately conservative:

Regression fixtures

Extracted results are pinned against fixtures so a change in resolution logic is visible before it ships.

Reproducible failure cases

Documents that previously resolved incorrectly are kept as deterministic test inputs.

False-positive prevention

The system prefers leaving a field unresolved over attaching it to a plausible but incorrect location.

OCR degradation

Low-quality OCR is a known operational failure mode and is included in manual/acceptance verification rather than assumed reliable.

Conservative defaults

When confidence is not established, the workflow falls back to human confirmation.

Feature gating

Newer resolution behaviour can be introduced behind a gate instead of changing every document path at once.

Backward compatibility

Changes to mapping behaviour are treated as risky because downstream fields may already depend on them.

Privacy

Real business documents are treated as confidential. Public portfolio material uses synthetic or sanitized examples.

What this project demonstrates

  • document intelligence
  • OCR-aware systems
  • deterministic extraction
  • human-in-the-loop design
  • regression-driven debugging
  • privacy-aware product engineering
  • judgment about AI versus deterministic methods