Home › Use Cases › Amendment diff
Use caseUC0369
🧪 Use-case kit · runnable

Amendment diff

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

An amendment arrives against an agreement already in force. Somebody has to read both and say what actually moved, in the words the documents use, and then answer the question the billing desk asks: which of these changes hit the rate database, and on what date were they approved into it. Today that is a person with two documents side by side. Reading an amendment against the agreement in force by hand to list what changed and pull the rate-affecting items for the rate desk.

Audience

A contract administrator or rate desk deciding what to load, and what to tell billing. The report's own answer on the hardest band is a qualified yes: the model reads prose amendments the free parser cannot, and still leaves the approval date off 6 of 57 rate-affecting changes it was asked for. Every number on these pages came from one real run of this code, not from a vendor page.

The inputThe actual amendment pairs

The corpus is 60 amendment pairs, 0.57 MB (txt 60). A real estate of contracts is not drafted by one hand, and the corpus is built to prove the kit survives that. The amendments come in three bands: 24 use the operative formula (Section 7.2 is hereby deleted in its entirety and replaced with the following:), 20 describe the change in prose and never name the formula, and 16 are traps — a clause reprinted verbatim under a new number, business days becoming calendar days, an accessorial schedule renumbered with every amount identical, an Exhibit A rate table replaced, a clause the amendment names only to say it stays in force, and pairs carrying two approval dates. The agreements print their sections in two different styles. The bands are the measurement: the free regex floor scores 13 of 24 on band A and 0 of 20 on band B, which is what a single corpus of well-drafted amendments would have hidden.

The corpus

  • The 60 amendment pairsgenerated 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 amendment pairs. That is the whole change — there is no database to migrate.

One amendment pair, as the model receives itAMD-0001.txt · 1 of 60
===== AGREEMENT IN FORCE =====
MASTER TRANSPORTATION SERVICES AGREEMENT

Agreement No.        MTSA-2024-7444
Carrier              Ironvale Line Haul LLC
Shipper              Fairholt Appliance Company
Dated                24 February 2024

This Master Transportation Services Agreement (this "Agreement") is made between Ironvale Line
Haul LLC, a motor carrier ("Carrier"), and Fairholt Appliance Company ("Shipper"), and governs
the carriage of Shipper's freight tendered to Carrier over the Lanes described in Exhibit A.

ARTICLE I - DEFINITIONS

  1.1  Defined Terms
       Capitalised terms used in this Agreement have the meanings given to them in this Article,
       and a term defined in the singular carries the same meaning in the plural. "Shipment"
       means one tender of freight moving under a single bill of lading, and "Lane" means an
       origin and destination pair listed in Exhibit A. "Business Day" means a day other than a
       Saturday, a Sunday or a day on which Carrier's dispatch office is closed.

ARTICLE II - SCOPE OF SERVICES

  2.1  Engagement of Carrier
       Carrier shall provide motor carriage of Shipper's freight over the Lanes listed in
       Exhibit A using the equipment types described there. Shipper gives no volume commitment
       and Carrier gives no capacity commitment except as stated in the tender provisions of
       this Agreement.

ARTICLE III - EQUIPMENT

  3.1  Equipment Supply
       Carrier shall supply 20-foot intermodal container equipment in clean, dry and odour-free
       condition and suitable for the commodity tendered. Equipment that is not suitable at the
       time of loading shall be replaced by Carrier at Carrier's own expense.

ARTICLE IV - TRANSIT COMMITMENTS

  4.1  Transit Standard

Abridged — the file continues.

The outcomeWhat a good result looks like

Every changed clause named and quoted in the exact language both documents print, with the rate-affecting ones separated out and dated.

And when it cannot

It leaves a rate-affecting change without its approval date, or misreads whether a change moves money at all. Both happen on this corpus and both are counted below. What it did NOT do once in 245 returned spans is invent contract language.

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 amendments use a house operative formula and always name the clause — the free regex floor
    It scores 13 of 24 on exactly that band here, costs nothing and never invents a clause. Buy the call only for what it cannot read.
  • Your amendments describe changes in prose — the model
    This is the whole measured margin: 17 of 20 against the floor's 0 of 20.
  • You want to know what changed without a key at all — the regex floor
    No key, no network, under a second per pair, and it never returned a span that resolves nowhere either.

And where nothing here is good enough:

  • You need the rate-database approval date to be right every time — neither, unaided
    The model leaves it empty on 6 of 57 rate-affecting changes and the floor reads 36 of 38 of the ones it attempts but only attempts 38. Gate on the station: a change marked rate-affecting with no admissible date should stop and be looked at.

At a glanceHow the whole thing runs

77%pair all correct pct
1,795 msp50, end to end
$1.36per 1,000 amendment pairs · the fast tier, off-peak

Run once, for real, on 2026-09-10. 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 pairs into data/corpus/ as one file per pair with the two delimiter lines, and write data/gold.jsonl with one record per pair. The measured numbers below do NOT carry onto your corpus. Corpus lens →
When is this the wrong choice?Avoid: Paying per pair for a job a regex already does. That is the case against the best-fitting scenario (“Your amendments use a house operative formula and always name the clause”). 4 scenarios scored in all, each with its own. Eval lens →
Where does it stop working?An amendment that changes a clause without naming it — the kit joins on section number first, and a change described purely by subject matter has nothing to join to. 5 recorded failure modes, each from a run rather than a guess. Corpus lens →
What was never verified?Whether reasoning ENABLED would recover any of the 6 missing approval dates. Reasoning was sent explicitly disabled on every call and the alternative was not bought. 6 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?4 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-10 — r001-amendment-diff. 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 clean checkout with no key configured renders the whole board, segments every pair, runs both free floors and scores them offline; the model button is disabled and says why. Measured on this machine: python3 -m evals.run --run-id b000-amendment-diff-rules --floor rules completes in under a second per pair with no network.

A living map of modern AI — kept current every morning