Moosa Memon
← Index of work

Auditing 100% of a ledger instead of sampling 10%

LedgerSentry: ingests a whole ledger from CSV or XLSX, checks every transaction against configurable rules and per-cohort statistical detection, and hands the reviewer a short, explained, severity-ranked queue instead of a spreadsheet.

Type
Automation
Stack
Python / FastAPI / n8n / Airtable / Slack
Status
Complete; recall measured against a generated ground-truth manifest
Measured
On a 3,008-row synthetic payroll ledger with 66 seeded anomalies: 66/66 found, 0 false flags, in seconds with no API calls. A 10% manual sample would be expected to surface 7 of the 66

Problem

A traditional audit checks 5–10% of transactions and extrapolates. That’s slow, expensive, and structurally blind: an error sitting outside the sample is never seen at all. On the bundled ledger, a 10% sample would review about 301 transactions and catch roughly 7 of the 66 real findings, leaving 34 of the 38 high-severity ones unreviewed.

System

CSV / XLSX → normalize → rules + statistics → explain → reviewer queue, with a report and a Slack alert at the end. Rules cover the categorical failures (duplicates, round-number patterns, off-schedule payments); per-cohort statistics catch the outliers a rule can’t name. Every finding carries a plain-English explanation of why it was flagged, and the queue is ranked by severity so a reviewer starts at the top and can stop when the findings get trivial.

Worth knowing

Recall is measured, not asserted. The synthetic-ledger generator writes a ground-truth manifest of what it seeded, so 66/66 is a checked number, and the zero-false-positive figure is checked against the same manifest. Detection runs with no LLM calls at all; the model is reserved for the explanations, where language is actually the product. That keeps it fast, cheap, and deterministic where determinism matters.

Have a workflow that looks like this?

Most of these start as a messy, manual process someone got tired of. Twenty minutes is usually enough to sketch how I'd approach yours.