Home › Use Cases › Reconcile a pipeline's monthly imbalance statement against the shipper's book
Use caseUC0337
🧪 Use-case kit · runnable

Reconcile a pipeline's monthly imbalance statement against the shipper's book

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 pipeline sends a shipper one imbalance statement a month: what it says was scheduled, what it says the meters measured, the cumulative position it is carrying and what that would cash out at. On 21 of the 62 months in this corpus the pipeline's own measured position is wrong, and the only record of why is a sentence printed under a meter line — a nomination cut, a delivery billed and never taken, a ticket keyed twice. Today a scheduler reads every line by hand, or believes the statement. the line-by-line hand check a scheduler does on a monthly imbalance statement before the cashout deadline

Audience

a gas scheduler or a contract analyst deciding whether a contract month needs looking at before the cashout deadline. The honest answer this report gives them is a qualified yes: it wins on the months where the ledger is wrong and LOSES on the months where it is clean. Every number on these pages came from one real run of this code, not from a vendor page.

The inputThe actual imbalance statements

The corpus is 62 imbalance statements, 0.23 MB (json 3 · md 2 · txt 62). Because a real imbalance statement is a shipper's own trading record, and the exact shapes this kit measures — a nomination cut at the pipeline's request, an allocation posted against the wrong contract, a gas manager asking for a scheduler to be named — are the lines a shipper would least want published. The compensation is a key DERIVED from the structure the files were rendered from, re-derived a second time by an independent checker at 0 disagreements over 1,056 checks, and red-proven seven ways. The mix was set AFTER the incumbent was measured: an earlier mix would have let copying the page score higher, and the published floor is the higher of the two free arms rather than the flattering one.

The corpus

  • The 62 imbalance statementsgenerated from a fixed seed, so no real record, person or institution appears in it.
  • Where each came fromdata/SOURCES.md states where every byte came from, the case mix and why it is this mix, the six note pools and their wordings, the distractors and the proof they establish nothing, and a section attacking the corpus on its own terms.

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

One imbalance statement, as the model receives itPIS-0001.txt · 1 of 62
==============================================================================
PIPELINE IMBALANCE STATEMENT                               PIS-0001
Shipper: SHP-4100 - Ashcombe Midstream (invented)
Contract: CBT-10000   Cottonwood Bend Transmission   Month: 2026-04   Procedure: PIR-2026
==============================================================================

CONTRACT AND MONTH AS THE SHIPPER'S BOOK HOLDS IT
  volume unit                             Dth
  fuel and L&U                           1.10   pct of receipts
  opening cumulative                 -120.000   Dth
  tolerance pct                          0.75   pct of admitted receipts
  trigger pct                            3.00   pct or more
  threshold cost                     5,570.00   or more
  maximum daily quantity            4,496.788   Dth per gas day
  gas days                                 30
  month                            full-month

CASHOUT TIER SCHEDULE AS THE CONTRACT FILE PRINTS IT
  TIER       BAND                                      PRICE
  T-1        up to 2.00 pct                             2.85
  T-2        up to 5.00 pct                             3.72
  T-3        everything above                           5.58

NOMINATION AND CONFIRMATION SCHEDULE AS CONFIRMED
  POINT      POINT NAME                       DIRECTION       NOMINATED      CONFIRMED
  PT-2000    Cottonwood Bend plant tailgate   receipt        59,019.337     59,019.337
  PT-2001    Marlberry processing outlet      receipt        59,021.337     59,021.337
  PT-2002    Harlow Junction citygate         delivery       58,387.613     58,350.613
  PT-2003    Barrowdale power station         delivery       58,354.614     58,354.614

METER AND ALLOCATION LEDGER AS THE PIPELINE POSTED IT

Abridged — the file continues.

The outcomeWhat a good result looks like

one row per contract month: the measured position the meters actually support, the deviation from the confirmation, the closing cumulative imbalance, the cashout under the tier schedule in force, the lines that differ from the statement quoted verbatim, and one verdict from a closed set of five.

And when it cannot

a month reported IN-BALANCE on a position a cut nomination invented, or a cashout valued at a tier price that was filed and never accepted. Both are counted by name: counted_line_that_never_flowed is 5 of 62 on the scored run and declined_amendment_applied is 0.

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 statements are mostly WRONG — cuts, unflowed deliveries, duplicate tickets — the paid arm
    13 of the 21 months where the pipeline's own figure is wrong, against 0 for copying the panel and 9 for the keyword rule
  • your statements are mostly CLEAN — the incumbent
    on the clean shapes the panel is perfect by construction — 5 of 5 on long, short and cashout — and the paid arm is 3, 4 and 4. There is nothing to read, so every citation it adds is a loss
  • your tariff amendments arrive as prose in the statement notes — the paid arm
    10 of 14 refused amendments against the regex's 2. A filed-and-suspended amendment carries a real date, a real tier and a real price, so only the sentence says no
  • your volume columns come in mixed units — pure code
    it is a multiplication. The free floor is right on 3 of 5 and the paid arm on 2, and the arm's hedging on it produced 72 of the run's 104 citations

And where nothing here is good enough:

  • you need the position ELECTED, traded or disputed — neither
    the answer contract offers no field any of it could be written into, asserted at import against a forbidden-name list. This kit names what differs and stops

At a glanceHow the whole thing runs

71%all five correct pct
1,939 msp50, end to end
$0.00per 1,000 imbalance statements · google/gemini-3-flash

Run once, for real, on 2026-09-09. 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?replace data/corpus/*.txt with your own statements in the same shape and data/contracts.json with your own register, then rebuild the key by labelling them. ⚠︎ the percentages stop applying the same moment. Corpus lens →
When is this the wrong choice?Avoid: The incumbent. That is the case against the best-fitting scenario (“your statements are mostly WRONG — cuts, unflowed deliveries, duplicate tickets”). 5 scenarios scored in all, each with its own. Eval lens →
Where does it stop working?a scanned or photographed statement — every panel here is fixed-layout columns. 6 recorded failure modes, each from a run rather than a guess. Corpus lens →
What was never verified?NO SECOND SCORED RUN. One was fired; the run-to-run spread on this corpus is unknown. 8 items this kit says it could not check. Eval lens →
Can I run this on a model I control?The shipped adapter is configured in .env; src/adapters/ is the only file that knows who serves the model; the Prompt lens states what swapping it costs. The published figures come from 1 model on the fast tier. 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-09 — r001-pipeline-imbalance. 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 — git clone, then python3 -m evals.run --run-id b000-pipeline-imbalance-panel --floor panel — 0.2 seconds to a scored result file. No pip install, no index, no key. python3 -m evals.check_labels and python3 tools/build_corpus.py --check both run on a machine with nothing installed.

A living map of modern AI — kept current every morning