Home › Use Cases › Reconcile a client trust account three ways: bank statement, trust book and client ledgers
Use caseUC0440
🧪 Use-case kit · runnable

Reconcile a client trust account three ways: bank statement, trust book and client ledgers

A small, forkable project that does one job end to end. Run three times for real over the same set, and every figure on these pages captured from those runs.

The business caseThe problem this solves

A law firm holds its clients' money in a pooled trust account, and every month somebody has to show that three records agree: the bank statement, adjusted for deposits in transit and cheques not yet presented; the firm's own trust book; and the sum of every client's ledger card. The bookkeeper's reconciliation sheet does the column arithmetic and prints RECONCILED or NOT RECONCILED. What it does not do is read the notes — the bank saying a credit was misdirected, the billing desk saying a receipt paid a fee for completed work, an invoice withdrawn, two slips banked as one — and those are exactly where client money ends up in the wrong place. Opening one month's trust account, ticking every bank line against the book entry or prior item it clears, reading every note for a misdirected credit, a mis-encoded cheque, a combined slip, an earned fee or a changed invoice, walking every client card through the month, holding the firm's money against the allowance, and deciding which of six findings the month is — before anyone signs it.

Audience

The trust accounting desk and the partner responsible for the trust account at a law firm, working a month's reconciliation before it is signed — and the billing desk whose invoices and receipts decide what is firm money. Every number on these pages came from one real run of this code, not from a vendor page.

The inputThe actual trust account months

The corpus is 64 trust account months, 0.37 MB (txt 64). It is generated because it has to be. A real trust account month is a firm's and its clients' confidential record: named clients on every card, matter descriptions, payees, bank references and notes written by named people about money that belongs to other people. None of that can be published, and a corpus that could be published would have to be scrubbed of exactly the sentences this kit exists to read. Generating it also lets the traps be planted and counted: 30 months a note decides, 55 carrying a decoy with a decision's vocabulary, 25 asking for a release or a correction, and 4 where a note's date against AS AT is the whole reading.

The corpus

  • The 64 trust account monthsgenerated 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 AND what the generator costs the measurement. Every firm is an invented code and a practice description, every bank a code, every client a ledger card code and a matter kind, every payee a role, and THERE ARE NO PEOPLE IN THIS CORPUS AT ALL — a note speaks for the trust accounting desk, the billing desk, the matter team or the bank. TAR-2026 is invented and cites no jurisdiction. evals/check_labels.py sweeps all 64 files for a person-shaped name, an honorific and a case-style citation on every run and reports 0.

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

One trust account month, as the model receives itTRR-0001.txt · 1 of 64
================================================================================
CLIENT TRUST ACCOUNT RECONCILIATION -- ONE ACCOUNT, ONE MONTH, THREE WAYS
================================================================================
FILE              TRR-0001
FIRM              LF-2100  a four-lawyer residential property practice
TRUST ACCOUNT     TA-5500  pooled client trust account at bank BK-01
PERIOD            2026-06-01 to 2026-06-30
AS AT             2026-06-30
PACK COMPILED     2026-07-06
CURRENCY          USD
ALLOWANCE         100.00 of the firm's own money may be held to cover bank charges

-- BANK STATEMENT (as issued by bank BK-01 for the period) ---------------------
OPENING BALANCE 2026-05-31            204,606.50
LINE   DATE        TYPE           REFERENCE               AMOUNT  DR/CR
BS-01  2026-06-08  DEPOSIT        DEP 4400              9,244.00  CR
BS-02  2026-06-09  CHEQUE         CHQ 2101             12,092.40  DR
BS-03  2026-06-09  CHEQUE         CHQ 2103                267.20  DR
BS-04  2026-06-10  DEPOSIT        DEP 4401              8,426.75  CR
BS-05  2026-06-15  CHEQUE         CHQ 2104                 98.60  DR
BS-06  2026-06-15  SERVICE FEE    ACCOUNT FEE JUN          15.00  DR
BS-07  2026-06-17  DEPOSIT        DEP 4402              3,275.25  CR
BS-08  2026-06-17  INCOMING WIRE  TRACE 23209          15,677.60  CR
BS-09  2026-06-19  TRANSFER OUT   XFR T-3300            1,066.00  DR
BS-10  2026-06-24  CHEQUE         CHQ 2105                544.00  DR
BS-11  2026-06-25  WIRE OUT       WIRE W-8800           7,133.60  DR
BS-12  2026-06-29  CHEQUE         CHQ 2106             25,110.00  DR
CLOSING BALANCE 2026-06-30            194,903.30

-- TRUST BOOK (the firm's trust receipts and payments journal) -----------------

Abridged — the file continues.

The outcomeWhat a good result looks like

One trust account month in, one row out: which bank line clears which book entry, which client-card entries are the firm's, which invoices are in force at AS AT, the adjusted bank balance, the book balance and the card total to the cent, every exception, and one of six TAR-2026 verdicts. 51 of 64 months come back with all eight graded fields right against the best free floor's 42 — a margin that is NOT significant on this run (p = 0.108) — and the verdict on 60 against 46, which is (p = 0.0026). On the 30 months a note decides, 23 against 10.

And when it cannot

And what it does when it cannot. On the scored run all 64 replies parsed and none reached the 1,000-token ceiling. The thirteen months it got wrong are named in the kit README with what it answered: the accusing ones are TRR-0027, a write-off dated after AS AT followed at 0.90 confidence, which turned a RECONCILED month into FIRM-USE, and TRR-0063, a client's lien search fee named as the firm's; the hiding one is TRR-0062, where a dropped pair made a real difference vanish; TRR-0033's reply read nothing at all; and ten carry a routine pair the free floors read for nothing.

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 practice-management system records a misdirected credit, an earned fee, a withdrawn invoice and a combined slip as a CODE, and your bank feed carries references on every line — the free amount floor, and do not buy a call at all
    42 of 64 months for $0.00. Routine pairs, returned deposits, transpositions, transfers over or without an invoice, the firm's own deposit over the allowance and every column difference are decidable from columns and dates, and on those 34 months the floor gets 34.
  • The things that decide a month arrive as free text — a bank notice, a billing-desk note, a matter team's email pasted into the file — the paid call
    This is the whole product. On the 30 months where a sentence decides a reading the paid arm is 23 and the best free floor 10.
  • You want an exception never signed off as RECONCILED above all — the paid call, with the amount floor run beside it
    The amount and modal floors return RECONCILED on 16 of the 47 flagged months each; the published paid run on 0. The bookkeeper's own sheet prints RECONCILED on 34.
  • You are worried about false accusations — a firm told it took client money when it did not — the free amount floor for FIRM-USE, and a human on every paid FIRM-USE
    The amount floor names no firm item and so never accuses on that ground; the paid arm named two client-card entries as the firm's (TRR-0062, TRR-0063) — on TRR-0063 that turned an OUT-OF-BALANCE month into FIRM-USE — and it returned FIRM-USE on TRR-0027 by following a write-off dated after AS AT.
  • You want the trust bookkeeper's own reconciliation audited — either paid or free — both beat it comprehensively
    The bookkeeper's status disagrees with TAR-2026 on 41 of 64 months and gets 0 whole: it returns no reading at all, only a status word. It is published as an arm so the comparison is against what is running today rather than against nothing.

And where nothing here is good enough:

  • Your trust account has sub-accounts, interest, foreign currency, or months with hundreds of items — neither, yet
    No file in this corpus does. The unit of work is one pooled account for one month with at most 20 pairs, and routine-pair recall is already the paid arm's largest miss at that size.

At a glanceHow the whole thing runs

77–84%rechecked all correct pct · 3 runs, no ordering
2,084 msp50, end to end
$1.70per 1,000 trust account months · the fast tier

Run three times over the same set, for real, the last on 2026-09-13. Every figure on these pages was captured from those runs — 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 trust account months in the same eight-block shape and data/accounts.json with your own register, then run python3 -m evals.run --run-id b000-<yours>-amount --floor amount — it needs no key and costs nothing. ⚠︎ WHAT STOPS BEING TRUE THE MOMENT YOU DO. Corpus lens →
When is this the wrong choice?Avoid: Paying per month for arithmetic you already have — the paid call is six months WORSE on the column-decided months. That is the case against the best-fitting scenario (“Your practice-management system records a misdirected credit, an earned fee, a withdrawn invoice and a combined slip as a CODE, and your bank feed carries references on every line”). 6 scenarios scored in all, each with its own. Eval lens →
Where does it stop working?A bank statement or trust book with no printed reference on a line — a cash deposit with no slip number, a cheque with no serial. R-1's column matching keys on the printed reference; without it every pair is an amount guess, and equal amounts are where both the floors and the reading go wrong in this corpus. 7 recorded failure modes, each from a run rather than a guess. Corpus lens →
What was never verified?THE WHOLE-MONTH MARGIN IS NOT ESTABLISHED: 51 against 42, p = 0.108, not significant, while the verdict margin is, p = 0.0026. Three runs of the same prompt landed at 49, 54 and 51 months whole, one margin significant and two not, so the run-to-run spread on this corpus is at least five months and no confidence interval is claimed anywhere on this page. 9 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?5 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-13 — r003-trust-reconcile. 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, all five free floors and every committed run. pip install -r requirements.txt installs nothing — the kit is standard library only. The only thing a key buys is the ASK THE MODEL button and a new scored run.

A living map of modern AI — kept current every morning