Before
- Open attachment
- Find load and stop data
- Retype every charge
- Spot-check the total
Queue grows with document volume.
A case study in fail-loud document extraction
A production-minded rate-confirmation pipeline that adapts to broker layouts and stops uncertain dollar amounts before they contaminate operations. Open source; every number below is generated by the test suite.
Read the codeThe problem
Broker PDFs drift: headers move, labels change, scans add noise, and multi-stop loads break assumptions. A generic copy-and-paste workflow turns that drift into manual review or, worse, quiet bad data.
Before / after
Queue grows with document volume.
Clean records flow; uncertainty stops.
The approach
Each broker layout has a small, testable adapter. The output is one stable JSON schema for load IDs, parties, stops, dates, equipment, references, and rates.
Every numeric field must match an unambiguous money token, and the stated total must equal its components. A weak result raises an explicit failure; the pipeline never guesses a dollar amount.
Measured, not claimed
| Sample | Adapter | Fields matched | Accuracy |
|---|---|---|---|
| 01_cindercone_classic | cindercone-classic | 25/25 | 100.00% |
| 02_bluekestrel_modern | blue-kestrel-modern | 24/24 | 100.00% |
| 03_moonridge_compact | moonridge-compact | 25/25 | 100.00% |
| 04_cindercone_scanned_noise | cindercone-classic | 24/24 | 100.00% |
| 05_bluekestrel_missing_fields | blue-kestrel-modern | 23/23 | 100.00% |
| 06_moonridge_multistop | moonridge-compact | 36/36 | 100.00% |
| Six-sample total | 157/157 | 100.00% | |
All six PDFs and every entity shown in this case study are synthetic. This fixture score is a regression baseline, not a claim about untested client documents.
About this project
Clone the repository and run make demo to reproduce every number on this page from the six synthetic PDFs. An interactive in-browser version — drop a PDF, watch the extraction, nothing uploaded anywhere — is the next milestone; the build spec lives in the repo's AGENTS.md. Built by Mark Ortega.