Home › Use Cases › Was the property entitled to charge the card, and if not, by how much and why
Use caseUC0189
🧪 Use-case kit · runnable

Was the property entitled to charge the card, and if not, by how much and why

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 agency funds a virtual card per reservation and the property captures against it at departure. Whether that capture was EARNED is a different question from whether it was APPROVED, and the card scheme only ever answers the second one. The arithmetic half is not hard and this kit does not pretend it is: a date compared to a date, a commission percentage off a folio rate, a night count, a currency string and the folio's own liability column are all decidable in pure Python, exactly, for nothing. The dangerous half is that every one of those printed fields is a claim a sentence can overturn -- an agency that extended the card's window after the card record was written, a card voided and reissued when the dates moved, a tax the agency collected and remitted itself, a resort fee the guest already settled in cash at the desk, a penalty night the agency waived as goodwill, a room line funded at gross on purpose, and a decline that settled anyway. On every one of those the fields are clean, or clean in the wrong direction, and a reconciliation that trusts them puts a tick on money that moved wrongly and closes the booking. Somebody reading one booking's folio against the remittance terms and the card record before a difference is raised: checking the capture date against the card's window, taking the commission off the folio rate, deciding whether tax belonged on the card at all, spotting a guest-liable line that went on it, counting the nights the guest actually stayed against the nights the terms allow, and then reading the notes for the sentence that changes one of those answers.

Audience

Revenue accounting, night audit and channel-management staff who reconcile agency-collect bookings before a difference is raised or written off, and the people who build tooling for them. Every number on these pages came from one real run of this code, not from a vendor page.

The inputThe actual remittance packs, one per booking

The corpus is 45 remittance packs, one per booking, 0.13 MB (txt 45). A real remittance pack carries a cardholder identifier, a named guest, a booking channel's commercial terms and a settled payment, so it is not publishable -- the commission percentage alone identifies the agreement -- and there is no public corpus of (pack, adjudicated reconciliation) pairs to borrow, because the adjudication is the property's own commercial position and nobody publishes it. So the corpus is written here, in the open, with its defects planted on purpose and counted in data/corpus-stats.json.

The corpus

  • The 45 remittance packs, one per bookinggenerated 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 remittance packs, one per booking. That is the whole change — there is no database to migrate.

One remittance packs, one per booking, as the model receives itVR-0001.txt · 1 of 45
Booking Record
----------------------------------------------------------------
confirmation: VR-0001
booking channel: Pellmore Reservations
guest: P. Solvang
room type: Standard Twin
arrival: 2026-04-06
departure booked: 2026-04-10
departure actual: 2026-04-10
nights booked: 4
nights stayed: 4
nightly room rate: 168.00
occupancy tax rate pct: 14.5

Folio Lines
----------------------------------------------------------------
line    description        qty        unit      amount   liable
FL-01   Room               4             168.00    672.00   AGENCY
FL-02   Occupancy tax      1              97.44     97.44   AGENCY
FL-03   Resort fee         4              35.00    140.00   GUEST
FL-04   Parking            4              26.00    104.00   GUEST

Remittance Terms
----------------------------------------------------------------
payment model: agency collect, virtual card
commission pct: 18.0
commission basis: room revenue at the folio rate
authorized amount: the ceiling for any SINGLE capture against this card
tax collected by: PROPERTY
card covers: the folio lines marked AGENCY -- the room line net of commission, and
  occupancy tax only where the property collects it
guest liable lines: a folio line marked GUEST is never chargeable to the agency card
early departure: the nights stayed, plus one penalty night
no show: one night
charge window: on or after the actual departure date and inside the card's active window
currency: the card is charged in the card's own currency, never converted

Virtual Card
----------------------------------------------------------------
card: VC-7655
currency: USD
authorized amount: 648.48
active from: 2026-04-06
active to: 2026-04-12
status: ACTIVE

Charge Log
----------------------------------------------------------------

Abridged — the file continues.

The outcomeWhat a good result looks like

Eight checks per booking, always the same eight and always in the same order, each carrying RECONCILED, OVERCHARGED, UNDERCOLLECTED or CANNOT_RECONCILE, a reason code, one sentence of basis, and the money that check alone accounts for -- signed, and null rather than zero where the check could not be decided. It is a DRAFT for the person who raises or writes off the difference. Nothing in the kit adjusts a folio, refunds a card, raises a claim or contacts an agency, and there is no endpoint that could.

And when it cannot

THE FAST TIER LOST THE STRUCTURED HALF TO FREE CODE AND IT IS PUBLISHED THAT WAY. On the 312 cells decidable from the printed fields the free floor scores 100.00 pct and the model scores 96.79 pct. That gap is ten cells: six carry one named class and the key plants no class on the other four. The six are S-WINDOW-LATE: the capture is dated after the card's active-to, the model SAYS SO in its own basis line and files the right reason code, CARD_WINDOW_EXPIRED -- and then answers OVERCHARGED with the entire capture as the money, where the key says CANNOT_RECONCILE and no money at all. Right diagnosis, wrong verdict; the third state collapsed into a claim for cash. The largest block of misses outside that band is a PROSE class, P-GROSS-BY-AGREEMENT, 0 of 6, where a note states the card is funded at gross and commission is invoiced separately, and the model prefers the terms field and convicts COMMISSION_NOT_DEDUCTED every time -- free code is 0 of 6 there too. Of the 18 cells the key marks CANNOT_RECONCILE only 8 came back with the money left null; the other ten are the six S-WINDOW-LATE cells and four P-CARD-REISSUED. Where the model DID answer CANNOT_RECONCILE it left the money null every time.

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.

  • Every fact that decides the reconciliation is already a FIELD -- capture date, authorized amount, currency, commission percentage, night counts, and a folio whose liability is a column. — the free floor -- field-recompute, $0.00
    It scores 100.00 pct of those cells, exactly, instantly, offline, and it beats the paid arm there. Nothing a model adds is visible on this half.
  • The remittance notes are where your exceptions actually live -- window extensions, reissued cards, waived penalties, fees settled at the desk. — the fast tier, $0.0483 per booking on the projected card
    It is the only arm that reaches the notes at all: 62.50 pct of the prose band against 0.00 pct free, and 7 false cleans against the field floor's 36.
  • A wrong tick is unacceptable and an unnecessary review is merely expensive. — the free floor -- note-gate, $0.00
    Zero false cleans of 102. It never closes a booking whose money is wrong.
  • You want both halves and you are willing to write code. — src/checks.py for the fields, one call for the notes
    That is the deployment this kit's numbers actually argue for, and it is not what either column on its own says.

At a glanceHow the whole thing runs

92%verdict accuracy pct
145,645 msp50, end to end
$48.29per 1,000 remittance packs, one per booking · Google Gemini 3 Flash

Run once, for real, on 2026-08-27. 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?tools/build_corpus.py writes data/corpus/*.txt and data/gold.jsonl. NONE OF THE MEASURED FIGURES ON THIS PAGE TRANSFER TO YOUR OWN PACKS. Corpus lens →
When is this the wrong choice?Avoid: Do not use it where any decisive evidence is a sentence: it scores 0.00 pct of the prose band and 36 of its 102 verdicts are false cleans -- money moved wrongly with a tick on it. That is the case against the best-fitting scenario (“Every fact that decides the reconciliation is already a FIELD -- capture date, authorized amount, currency, commission percentage, night counts, and a folio whose liability is a column.”). 4 scenarios scored in all, each with its own. Eval lens →
Where does it stop working?A pack layout that is not this one. src/pack.py is five regular expressions written for underlined headings, key: value lines, a fixed folio table and a charge log whose applied lines are indented under their attempt. 5 recorded failure modes, each from a run rather than a guess. Corpus lens →
What was never verified?THE NOTES-BLIND ABLATION WAS NOT RUN. It would be 45 more calls, and the free-floor comparison already carries the evidence that the prose band is being read (62.50 pct against 0.00 pct). 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 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-27 — r001-vcard-remit. 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 — Every pack, the answer key, all three free floors, the answer-key gate, the recorded runs and the whole UI work with no key and no network. A key unlocks live reconciliation and nothing else.

A living map of modern AI — kept current every morning