Skip to content

Projects

Variance cockpit

A month-end close dashboard for budget against actual. AI drafts a comment on each significant variance, and the drafts are reviewed.

For: Controllers and finance teams at month-end close

Data is fictional. Odense Demo Manufacturing ApS and its customers and suppliers do not exist.

Screenshot of the dashboard: Variance cockpitScreenshot of the dashboard: Variance cockpit

The problem

At month-end close a controller must explain every large gap between budget and actual. Most of the work is finding the supplier, customer or invoice behind each gap. A language model can draft the comments, but only if every number and claim can be checked against the ledger.

What the dashboard shows

  • EBITDA against budget for the chosen month, with revenue, EBITDA margin and the number of significant variances.
  • An EBITDA bridge from budget to actual. Click a bar to filter the list.
  • Significant variances, largest first: at least 5 % and DKK 50.000 from budget.
  • A drill-down per variance with the ledger lines, the AI draft and its review status.

Key findings

  1. September 2026 closes with EBITDA of DKK 0,25m against a budget of DKK 1,55m. Lower revenue explains DKK 0,51m of the gap, mostly one customer buying less.
  2. The final prompt found the right cause in 12 of 15 planted event months.
  3. Versions 1 and 2 gave the model the following month. That is look-ahead, so their scores of 10 and 13 of 15 were too high.

The AI part and how it was checked

Gemini writes one draft per significant variance, once. The drafts are stored, so the dashboard never calls a model. The model never sees a later month, because at close the future does not exist.

A script with no AI checks every number in a draft against the input: 71 of 71 drafts pass. Of 55 variances with no event behind them, 5 drafts claim a cause that is not there. 1 draft has a sign error.

Claude suggested a review status for each draft. I checked a random sample of 18, fixed before I looked, and agreed with 16. Final counts: 35 approved, 30 edited, 6 rejected.

What it does not do

  • The review is mostly done by a model. 53 of 71 statuses are Claude's alone, and one model grading another is not human review.
  • One run per prompt version. The spread between runs has not been measured.
  • A customer buying less is missed in July and September, because the baseline is a plain three-month average.

How it was built

Python, DuckDB with SQL views, Gemini, Next.js and Recharts on Vercel.

Built with Claude Code.