Home › Use Cases › Warehouse Receipt Obligation Tracking Against Licensed Capacity
Use caseUC0089
🧪 Use-case kit · runnable

Warehouse Receipt Obligation Tracking Against Licensed Capacity

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 grain warehouse licence is not a capacity number. It is a capacity number plus a handful of sentences about TIME -- a first day over capacity is a notice, the third is a referral to the state for licence suspension, an open notice does not close until the facility has been back inside capacity for two days running. Two facilities filing exactly the same bushels against exactly the same capacity need different actions, because one of them was over yesterday and the other was not. Nothing in the day you are holding tells you which. And the clauses themselves differ facility by facility, including one -- whether company-owned grain counts toward the storage obligation -- that decides whether a facility is over capacity at all. So somebody opens every record, every day, and goes back through the filings by hand. Somebody opening every licensed facility's daily position record, working out from the facility's OWN licence which obligation total governs, and then going back through the previous filings to count how many consecutive business days it has been over -- because the day you are holding does not say.

Audience

Grain warehouse compliance and elevator operations -- anyone who files or reviews a daily position record against a state licence, and anyone deciding whether a language model has any business near one. The honest answer here is a qualified yes with one field carved out: on the days it answered, the model got every status and every action right and lost to free code on naming the largest obligation category. Every number on these pages came from one real run of this code, not from a vendor page.

The inputThe actual daily position records

The corpus is 150 daily position records, 0.48 MB (txt 150). Generated rather than collected, because a real daily position record names a licence, a bonded surety and a licensed manager who is personally liable under it -- publishing thirty facilities' worth of those, redacted or not, is not something a public kit gets to do. Generating it also buys the two things this kit is measuring: 25 of the 30 facilities carry licence terms other than the majority set, which is what makes reading the clauses worth anything, and the day patterns are chosen rather than sampled so that every clause fires somewhere -- 66 of 150 days turn on a consecutive-day count, 23 on the inclusion clause, and 10 sit after the middle day of a reset trap.

The corpus

  • The 150 daily position recordsgenerated from a fixed seed, so no real record, person or institution appears in it.
  • Where each came fromwritten for this kit rather than collected — the corpus is generated in the kit's own repository, so there is no third-party data in it.

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

One daily position record, as the model receives itWH-0417-D1.txt · 1 of 150
Synthetic Record
----------------------------------------------------------------
This is a GENERATED daily position record for a grain warehouse that does not exist. The
licence number, the facility, the people and every bushel figure on this page were produced
by tools/build_corpus.py from a fixed seed. It is not a filing and reproduces no real one.

Facility
----------------------------------------------------------------
Licence no      : WH-0417
Facility        : Prairie Bend Grain Co-operative
Business day    : 2026-08-17
Filed by        : the licensed manager, at close of business

Licence Terms
----------------------------------------------------------------
Licensed capacity          : 750,000 bu
Obligation basis           : storage obligations INCLUDE company-owned grain held in store
Suspension referral        : refer the licence for suspension after 3 consecutive
                             business days over licensed capacity
Notice release             : release an open capacity notice after 2 consecutive
                             business days back within licensed capacity

The licence requires, on each business day and in this order:
  1. On the FIRST business day storage obligations exceed licensed capacity, issue a
     capacity notice. A notice stays open until it is released.
  2. Once a notice is open, refer the licence for suspension on the day the count of
     consecutive business days over capacity reaches the figure above. Refer once.
  3. While a notice is open and obligations are back within capacity, hold the notice
     pending release until the consecutive-day figure above is reached, then release it.
  4. Otherwise take no action. One action per facility per business day.

Abridged — the file continues.

The outcomeWhat a good result looks like

Per facility per business day: the status to report after the licence's clauses have been applied, the single action the licence requires today, and the largest obligation category counted under that licence -- plus four carried counters the next run is judged against, written by code from the parsed totals and never from the model's reply.

And when it cannot

It answers with a status and an action that are wrong, in a well-formed JSON object, and nothing raises an error. There is no confidence score and no abstention: the scorer's 'absent' verdict exists for a call that never returned, and nothing downstream reads it. On this run the failure that actually happened was not a wrong answer at all -- it was nine calls the provider refused, which the harness recorded by name and the scorer counted as misses.

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 licence terms are the same at every facility and never change — b001, the coded rule -- free
    The whole gap between the free rule and the model on this corpus is the three varying clauses. With one set of terms, b001 IS src/licence.py and scores what the answer key scores.
  • Terms vary by facility, by state or by licence renewal — the model arm, r001's configuration
    94.0 pct against 77.33 pct on action accuracy over all 150 days, and 95.65 pct against 4.35 pct on the days the inclusion clause inverts the verdict -- which is the failure that produces a wrong answer rather than a late one.
  • You only need to know which obligation category is largest — a free argmax over the printed table
    98.58 pct for nothing against 97.87 pct for a model call, on the same 141 days -- and the STATELESS arm of this very kit scores 99.29 pct, better than both. Removing the carried state IMPROVES this field, which is the sharpest statement available that it does not want a model or a memory.
  • You cannot guarantee the job runs every business day — fix the schedule first, then this kit
    MEASURED TWICE, AND THE MODEL IS THE WORSE OF THE TWO. One skipped business day out of five costs the free coded rule 17.5 points of action accuracy (a000 against b001, 37 of 47 moved cells right to wrong); it costs the MODEL 49.06 points -- 100.0 pct to 50.94 pct over the 53 days both arms answered, with 43 of 43 moved cells right to wrong and NOT ONE the other way (a001 against r001). A model does not absorb a broken clock, it compounds it, and no prompt change recovers a day nobody read.

At a glanceHow the whole thing runs

94%action accuracy pct
7,774 msp50, end to end
$3.94per 1,000 daily position records · Google Gemini 3 Flash

Run once, for real, on 2026-08-23. 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?Drop your own records into data/corpus/ named <FACILITY>-D<n>.txt in business-day order and write data/gold.jsonl with the same keys. The moment your records carry a carry-in balance, this kit's central measurement stops transferring. Corpus lens →
When is this the wrong choice?Avoid: Do not pay for a model to re-read a rulebook you already encoded. On a single-terms population this kit's measured advantage is zero by construction. That is the case against the best-fitting scenario (“Your licence terms are the same at every facility and never change”). 4 scenarios scored in all, each with its own. Eval lens →
Where does it stop working?A record with no Licence Terms section -- a facility operating under a blanket state licence, which is entirely ordinary. Every field's hints match sections that all 150 records carry, so today the selector's fallback is never reached; src/select.py's subtraction is unconditional precisely so that when it IS reached the licensed manager's name does not go out with it. 5 recorded failure modes, each from a run rather than a guess. Corpus lens →
What was never verified?WHETHER THE THREE WRONG CATEGORY NAMES WOULD REPRODUCE. There is no repeat probe on this kit -- no configuration ran twice -- so 3 of 150 is one observation and not a rate. 5 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, with the carried state, 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 4 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-08-23 — r001-grain-position. 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 — A fresh clone with no key configured reproduces every figure on this page that did not need a model: the pre-flight and both of its red-proofs, both free floors, the cadence ablation, and the two comparisons that read the committed results back -- five of the seven recorded runs. The corpus and the answer key are regenerated byte-for-byte by python3 -m tools.build_corpus. What it cannot reproduce without a key is r001-grain-position and the calibration.

A living map of modern AI — kept current every morning