Home › Use Cases › Reconcile a processor's statement against the principal's own goods movement notes
Use caseUC0309
🧪 Use-case kit · runnable

Reconcile a processor's statement against the principal's own goods movement notes

A small, forkable project that does one job end to end. Run once for real, and every figure on these pages captured from that run.

The business caseThe problem this solves

A principal sends material to a contract processor, the processor converts it and sends back output, and once a period the processor submits a STATEMENT: how much was provided, consumed, returned, lost and produced, per batch. Checking it means putting that statement beside the principal's OWN goods movement notes and recomputing every figure — and the notes are paperwork. One prints a quantity that its own correction line restates. One records the load in pounds and states the equivalent in a sentence. One movement was weighed twice and the balance is on a continuation note with no reference on it. And one movement the processor books has no note at all, which is not a parsing problem but the finding itself. Reading a processing statement line by line against a folder of goods movement notes, adding the notes up by movement kind, and re-running the mass balance and the yield by hand for every batch on the period.

Audience

The principal's own commercial or materials-accounting desk — the person who has to sign off a processing period, or query it, before it is settled. Not the processor, and not anybody who prices or pays anything. Every number on these pages came from one real run of this code, not from a vendor page.

The inputThe actual statement reconciliation packets

The corpus is 58 statement reconciliation packets, 0.70 MB (txt 58). A processing period in which most batches reconcile is what the job actually looks like, so 207 of the 232 batches are WITHIN-TERMS and the corpus was NOT rebalanced to flatter a model — that is exactly why the published headline is the STATEMENT and not the batch. The ten case shapes are the things a real goods movement file contains that a clean parser does not survive, one shape per statement on one of its four batches: a correction line, a foreign unit with a stated equivalent, a continuation note with no reference, a movement with no note, a loss over allowance, an unreconciled booking, a yield outside each end of the band, and the netting pair whose batch total is right and both references are wrong.

The corpus

  • The 58 statement reconciliation packetsgenerated from a fixed seed, so no real record, person or institution appears in it.
  • Where each came fromNowhere — every one of the 58 packets, the contract file and the whole answer key are generated. Nothing here is fetched, scraped, licensed or derived from anything that was.

Swap this folder for your own material and the kit is pointed at your statement reconciliation packets. That is the whole change — there is no database to migrate.

One statement reconciliation packet, as the model receives itTYR-0001.txt · 1 of 58
==============================================================================
CONTRACT PROCESSING STATEMENT RECONCILIATION PACKET          TYR-0001
Principal: Ashgrove Materials (invented)
Processor: Northline Processing Works - Plant 02
Statement period: 2026-02     Material: MAT-3000     Contract unit: kg     Procedure: TYR-2026
==============================================================================

CONTRACT TERMS AS PRINTED ON THE STATEMENT
  Yield band             87.75 to 93.50 pct of the quantity consumed
  Loss allowance         0.90 pct of the quantity authorised for release
  Contract status        in force

STATEMENT AS SUBMITTED BY THE PROCESSOR
  BATCH       PROVIDED  CONSUMED  RETURNED  ACCOUNTED LOSS    OUTPUT
  B-4000         19066     18488       435             143     17206
  B-4007          8554      8125       368              61      7309
  B-4014         16349     15882       399              68     14698
  B-4021         18823     18215       537              71     16449

MOVEMENT DETAIL AS BOOKED BY THE PROCESSOR
  Every movement the processor books against each batch. Each batch row above is a column total.
  BATCH      REFERENCE     KIND        QUANTITY
  B-4000     ISS-10000     issue           4764
  B-4000     ISS-10001     issue           5299
  B-4000     ISS-10002     issue           4544
  B-4000     ISS-10003     issue           4459
  B-4000     RET-30000     return           435
  B-4000     OUT-50000     output         11333
  B-4000     OUT-50001     output          5843
  B-4000     OUT-50002     output            30
  B-4007     ISS-10020     issue           2713
  B-4007     ISS-10021     issue           2978
  B-4007     ISS-10022     issue           2863
  B-4007     RET-30020     return           368

Abridged — the file continues.

The outcomeWhat a good result looks like

One reviewer's row per batch, with the three recomputed quantities, the signed balance, one verdict from six and every disagreeing movement reference quoted from the note it came from — so a query to the processor names the reference and the line rather than saying the period looks wrong.

And when it cannot

⚠︎ THE FAILURE IS A PERIOD CLOSED OVER AN OPEN BALANCE, AND IT LOOKS EXACTLY LIKE A CORRECT ANSWER. Hand the engine a quantity wrong by one drum and it applies all six rules faultlessly, produces a well-formed row with a plausible confidence and clears a batch that should have been queried. Measured on r001: 9 of 232 batches were called WITHIN-TERMS raw when the contract does not clear them; the pure-code station brought that to 4, and the 4 it could not fix are readings that were never done. The other shape is the netting batch — the processor books one movement high and another low by the same quantity, so the batch total is right, the balance closes, the verdict is WITHIN-TERMS and CORRECT, and both references are wrong. 6 of the 232 batches in this corpus are that shape and the only field that can carry it is cites.

Where it fitsWhat did work

Every line below is a measured result from this kit's own runs, with the figure that supports it. The headline above is not softened by any of them.

  • Your goods movement notes are clean and machine-shaped — the free NOTES floor, alone
    it scores 10 of 10 clean statements and 41 of 58 overall for $0.00 with no network. There is no measured case on this corpus for spending anything where the notes print one number and mean it.
  • Your notes carry corrections, foreign units or continuation pages — the paid call, and keep the floor beside it
    this is the whole margin and it is measurable: unit_note 0 of 6 for the floor against 6 of 6 paid, split_note 0 of 5 against 5 of 5, correction 0 of 6 against 2 of 6.
  • The processor writes free prose you pass through to the model — the pure-code station, and a quantity-movement alarm on top of it
    8 of 31 right verdicts were lost to one sentence and 6 were still wrong after the station, because the sentence moved the RECOMPUTED QUANTITY rather than the verdict. The station re-derives the verdict from that quantity and cannot see it.

And where nothing here is good enough:

  • You need one number you can defend in a contract review — neither, on one run
    two runs of the identical corpus at the identical tier with the identical settings came back 46 and 41 of 58 — 8.6 points apart, with zero parse failures in either to explain it. Quote the pair or quote nothing.

At a glanceHow the whole thing runs

71–79%rechecked statement all correct pct
2,373 msp50, end to end
$0.00per 1,000 statement reconciliation packets · google/gemini-3-flash

Run once, for real, on 2026-09-06. Every figure on these pages was captured from that run — nothing is written from intent.

14 steps, grouped by the question that sends you to them rather than by build order. Each tile carries the one figure that step is about, and opens the page behind it.

Should you use this?What you bring, where it stops, and when not to use it

Before you commit an afternoon to this, these are the answers that decide it. Each one is rendered from the record it lives in — and links the page that holds it in full.

What do I have to bring?Put your own packets in data/corpus/ in the same layout and write the matching contract rows into data/contract.json — the contract file is what supplies the authorised release quantity TY-1 needs and that figure is not printed on the packet. ⚠︎ WITHOUT AN ANSWER KEY YOU GET AN ANSWER, NOT A SCORE. Corpus lens →
When is this the wrong choice?Avoid: Paying for a call whose answer a regex already produced. That is the case against the best-fitting scenario (“Your goods movement notes are clean and machine-shaped”). 4 scenarios scored in all, each with its own. Eval lens →
Where does it stop working?A note that is not in the canonical layout at all — a scan, a photograph, a free-text email. There is no OCR and no layout analysis anywhere in this kit. 5 recorded failure modes, each from a run rather than a guess. Corpus lens →
What was never verified?Whether reasoning ON would raise the headline. It was sent DISABLED on every call by policy — reasoning on is a measured, customer-funded exception and is not this kit's call to make — so the comparison does not exist here. 7 items this kit says it could not check. Eval lens →
Can I run this on a model I control?Yes — any OpenAI-compatible endpoint, including one on your own hardware. The shipped adapter takes its host from BASE_URL and its model from MODEL, so nothing in src/ changes. The published figures come from 1 model on the fast tier, one provider, one key. Prompt lens →
And if it fits — what do I stand up?6 artifacts with a stated home and a stated egress, and 3 decisions each with what you provision past its ceiling — plus what was not measured. That is the next page, not this one. step 14 — Run it in your environment →

Not asked of this kit — 2 questions: clone (a fresh clone of this kit runs with nothing fetched); judge (nothing here is graded by a model).

Last verified 2026-09-06 — r001-toll-yield-recon. Every figure on these pages was captured from that run.

Run itHow this reaches your data

Every result on this page was produced by pure code over checked-in files, with no API key — which is why you can read the numbers before anyone spends anything.

Run this on your own data

  • The pipeline, its eval harness and the runs behind every numberdeployed inside your environment, on your own model endpoints, against your own documents.
  • The corpus above is the shape, not the limitit is a folder swap, and there is no database to migrate.

Talk to us →

Checked before this shipped — Clone, python3 -m src.app, open the printed URL. No install, no key, no network. The 58 packets, the answer key, both free floors' results, both paid runs' results and the adversarial run all ship in the repo, and every one of them replays for $0.00.

A living map of modern AI — kept current every morning