rapid agenticdevelopment
← UK Company Intelligence

ONE QUESTION / UK COMPANY INTELLIGENCE

How do you make AI commentary trustworthy enough to base a decision on?

UK Company Intelligence reads a company’s filed accounts and writes a financial report with AI commentary. Accountants, lenders and credit teams use those reports to decide things. The commentary needs to explain the figures accurately, distinguish gains from losses, and make clear what the filing does—and does not—support. This is what it took to get there—including the part where my first answer was wrong.

0numbers the AI is allowed to ownevery figure is extracted by code
~75pthe AI cost of a full reportthe code gate that checks it adds nothing
500filings in the test corpus96% reconcile without guessing
50reports reviewed line by line9 clean; the bar is 20 in a row

THE OBJECTION

“It will confidently make things up.”

Yes, it will. A language model asked to comment on a set of accounts will, sooner or later, name the wrong auditor, restate a figure from the wrong year, or produce a “97% confidence” that means nothing. I’ve watched mine do all three. The question isn’t whether the model can be trusted on its own—it can’t—but what you build around it so that the output can be. Six rules came out of doing that in production. They transfer to almost any software that wants an AI feature.

What it costs. The AI layer of a full report—narrator and verifier together—runs at around 75 pence. The deterministic pipeline that extracts the figures, and the code gate that checks every number in the commentary, cost nothing per report beyond the server they run on. Trustworthiness here is not bought with a bigger model. Most of it is architecture.

Rule 1: the AI never owns a number.

Every figure in a report—turnover, net assets, creditors, cash—is extracted by deterministic code from the filing’s own tagged data, before any model is involved. UK accounts are filed as inline XBRL, so for most companies the numbers are machine-readable facts, parsed at effectively zero cost. Where a filing is only a PDF, the pipeline steps down a fidelity ladder: a clean published document if one exists, a scanned image read by OCR as the last resort. Which rung was used is recorded on the report, on two axes—where the data came from and how it was read—so the report can say, honestly, “these figures were read from a scanned copy”.

The model is then handed those figures and cannot overwrite them. Ratios are computed in code too, and passed to the model with the formula, the inputs and the result. That last detail matters more than it sounds, for a reason that comes up under Rule 3.

Rule 2: audit the data before the AI sees it, because the data lies too.

This was the surprise. The machine-readable layer of UK small-company filings is produced without validation. A figure printed in brackets—net liabilities of (46,290)—must carry a negative sign in the tag. Several widely used filing packages tag the displayed magnitude and drop the sign, on every bracketed line in the document. Nobody in the filing chain checks the arithmetic. So a company with net liabilities arrives, in perfectly valid XBRL, as a company with positive equity.

My first fixes were a chain of local corrections, each triggered by the next company whose filing had a slightly different shape. That never ends. The replacement is one balance-sheet solver that treats the signs of signed figures as unknowns and finds the assignment satisfying all the accounting identities at once—using the rendered page as a third source of evidence alongside the tags. When no single assignment works, it refuses to guess: the filing is published as filed, with a caveat, not repaired. Every field carries an interpretation state and its reason, and the report prints them under “How the balance-sheet figures were read”. Run over a corpus of 500 real filings from the Companies House bulk data, it solves 96% of balance sheets in three passes and names the concept behind every contradiction in the rest.

The principle underneath: structured data is valuable evidence and must never be elevated to ground truth without reconciling it against the presentation and the arithmetic. That’s true of any upstream data source you’re about to hand to a model.

Measuring this properly meant profiling every accounts package in the samples—nineteen of them, across 3,625 balance-sheet periods—which produced a dataset in its own right: how each one handles signs, untagged lines and dimensional structure, and how often its balance sheets reconcile. That survey will be published here once the software vendors it names have had notice of it.

Rule 3: a second model is not a proof.

My first answer to the trust question was the obvious one: an independent verifier. A second model, with a different prompt, reads the finished report against the filing and can hold it back from publication. It caught real things—an invented auditor’s name, wrong share counts—when the narrator had been starved of the filing’s prose and confabulated to fill the gap.

Then it started failing in ways that taught me more than its successes.

After nine rounds of rules to normalise the verifier’s output, I wrote down the conclusion I’d been avoiding: model-versus-model checking is a treadmill. So in September 2026 the numbers moved out of the model’s hands entirely. A code gate now scans every money, percentage and ratio token in every sentence of commentary and requires each one to trace to a tagged fact, an extracted field, a computed metric, or the filing’s own text. A figure found nowhere is an “unsupported figure”: the one finding that can hold a report, explainable in a sentence, and it never disagrees with itself. The model verifier still runs, but it’s advisory—it can add a caution, it cannot block.

Rule 4: give the AI only the job it is uniquely good at, and make it cite.

Once the numbers are handled in code, what does the model add? The reading of the filing’s prose: the going-concern statement, the auditor’s opinion, related-party dealings, capitalised development judgements, events after the year end, the directors’ own remarks. None of that is a tagged number, and none of the number-only competitors offer it. So the narrative is extractive by rule—every item is a reading of a named part of the filing and cites its passage.

What got dropped is as important. Model-invented “risk flags” whose names and severities changed every run: gone. “Questions for the directors”: gone. The confidence percentage: gone from every surface. The risk rating is rule-based and never AI—each factor shown with its value, the band it fell in and the rule that fired (“current ratio 0.62 is below the 0.75 band for this sector”), with the calibration status printed alongside: “sector thresholds: seed defaults, not yet calibrated”. A grade you can explain is a grade you can defend. A model’s sense of what’s risky in a sector is folk wisdom, not a base rate.

Rule 5: same filing, same words.

If two customers pull a report on the same company and get different commentary, neither can trust either. Generation runs at temperature zero, and the narrative is cached against a key made from the filing’s content hash and the prompt version. Refreshing a report re-extracts the facts and re-runs the deterministic pipeline, but reuses the cached narrative unless the facts changed. Every prompt is versioned, so a change in wording can never silently mix with old output.

Rule 6: tell the reader what you don’t know.

An unverified report is held, and sharing it requires an explicit acknowledgement. The screening panel’s empty state reads “No adverse signals flagged from the external screening checks performed”—deliberately not a clean bill of health. Every report carries its sources, its version, and a staleness banner when the register has moved on.

And there is a review log: one row per report checked by a person against the rendered filing, every defect recorded against the layer that caused it. Unreviewed publishing switches on only after twenty consecutive clean reviews across six filing packages and four balance-sheet shapes. Fifty reports in, nine were clean, the streak stands at zero, and the log says so.

WHAT THIS MEANS FOR YOUR SOFTWARE

The pattern transfers.

Almost every business that wants an AI feature wants the same shape: a deterministic spine that owns every fact, an AI layer that reads and explains but never asserts a number it wasn’t given, a code-level gate that checks the output against the inputs, provenance the user can see, and honest empty states. A second model is useful as a reviewer; it is not a proof, and it should never be the thing that decides.

None of this is expensive, as the 75 pence above says. What it costs is the willingness to take the model’s hands off the numbers, and to write down every way it went wrong so that each one becomes a rule rather than a memory. The project’s engineering log runs to 87 numbered notes; 47 of them were written in the five days of the review loop, which is the clearest argument I have for doing the reviewing.

If it’s the wider question of whether AI-assisted development produces software you can depend on, that’s the Sales Scribe case study: ten months on an invoicing and double-entry accounting application, working in six weeks and trustworthy in five months of part-time work, with what two adversarial reviews caught along the way.

Visit UK Company Intelligence

AN AI FEATURE YOU CAN STAND BEHIND

Want this in
your product?

If you’re adding AI to software that people will make decisions with, the architecture above is where I’d start—and it’s the conversation I’d have with you before writing any prompt.

Tell me what the AI needs to get right, and what would happen if it didn’t.

Tell me your idea

Watch us on YouTube

Follow us on LinkedIn

Rapid Agentic Development Ltd · Registered in England and Wales · Company number 17458231

Registered office: 181 Coniscliffe Road, Darlington, England, DL3 8DE. · Privacy notice

ICO registration reference: ZC248420