Context
Language models write good first drafts of a monthly commentary. They also make exactly the mistakes that make finance stop trusting a report: a figure that is close but not right, year-on-year quoted as month-on-month, “grew” where the data fell, a number borrowed from another metric, or an outside figure nobody sourced.
Checking sentence by sentence by hand defeats the point of automating.
Approach
Test
Two drafts ship with the repository: one correct and one with five typical mistakes planted on purpose. This is the actual output:
$ python run.py --draft examples/draft_ok.md 18 numbers checked, 0 problems -> RELEASED $ python run.py --draft examples/draft_with_errors.md 13 numbers checked, 5 problems -> BLOCKED NOT_FOUND 4,8 | La facturación bajó 4,8% contra agosto ... WRONG_DIRECTION 10,6 | Los clientes nuevos crecieron 10,6% contra agosto ... WRONG_METRIC 7,9 | La tasa de devolución fue 7,9% ... WRONG_PERIOD 30,7 | El CAC subió 30,7% contra agosto. NOT_FOUND 30 | ... una inflación cercana al 30% anual.
Result
Output of the test case (synthetic data, errors planted on purpose):
Live
The same check now runs by itself every Monday at 07:30 (Berlin) on a synthetic weekly feed. Before the model is asked for a draft, a data check reviews the load; about one week in eight the feed carries a problem planted on purpose (a day loaded twice, a missing day, refunds loaded as sales) and that week is blocked without calling the model.
Every run, with its result, reason and cost: run history. Synthetic data.
Deliverables
- Reproducible KPI computation from raw data.
- Number checker for Argentine formatting (1.234,5).
- HTML report with every figure in green or red.
- Release gate that blocks publishing, ready for a scheduled job.
