Using AI to build payroll software? Here is a deadline the official text appears to get wrong
- AI models are really good at payroll research. HMRC's January 2026 guidelines encourage using generative AI in tax software too.
- A model is only as right as the page it reads. The consolidated text of a pension deadline on legislation.gov.uk says 19 days. The law as amended in 2012 says 22 if you pay electronically.
- HMRC lists legislation as a reliable source. Here the official copy of the legislation appears to be the bit that is out of date.
- What I do: use the top model for research, make it quote its sources, read the amendments, and keep a ledger of every decision.
So AI is really good at this. Give a good model a spec or a regulation and it reads it faster than I can, cross-references it and writes the code. I use it a lot for payroll work and I wouldn’t go back.
But payroll is somewhere a wrong number looks exactly like a right one. A deadline of the 19th and a deadline of the 22nd both pass the tests you wrote from them.
The example: 19 days or 22?#
When an employer takes pension contributions out of someone’s pay, the money has to reach the scheme by the 22nd of the following month if it’s paid electronically, or the 19th if not. That’s what The Pensions Regulator says and what everybody does.
The rule lives in regulation 16(1) of SI 1996/1715. The consolidated (“revised”) page for it on legislation.gov.uk is where a person or a model would go to read it, and it only says 19 days.
| Page | What it gives for the general rule |
|---|---|
| Regulation 16, revised (opens in a new tab) | 19 days |
| SI 2012/215 regulation 40, as made (opens in a new tab). This is the amendment | 22 days electronic, 19 otherwise |
| SI 2010/772 regulation 48, revised (opens in a new tab). This holds the replacement text of regulation 16 | 22 days electronic, 19 otherwise |
| The Pensions Regulator’s code (opens in a new tab) | day 22 electronic, day 19 otherwise |
Pick how the money was paid and the day it arrived.
Why I think the page is out of date, and not the regulator:
- The new regulation 16 was written in 2010 to start on 1 October 2012. Before it started, SI 2012/215 added the 22 days and SI 2012/1257 moved the start to 1 July 2012.
- Paragraph (1) on the revised page is word for word the 2010 text, and its footnote still says “substituted (1.10.2012)”.
- The 2013 instrument that changed the rest of the regulation has a footnote saying it was “amended by S.I. 2012/215”.
In git terms it’s a stale merge. The branch was changed before merge day and main got the old version. The site hasn’t confirmed this, so “appears to be out of date” is as far as I can go. The 22nd does show up lower down the page, in the special rule for new joiners. It’s the general rule that’s missing it. The matching personal pensions regulation (opens in a new tab) has the same gap.
Nobody paying by BACS on the 21st has done anything wrong. But a rules engine or an AI tool built from that page would flag them as late from the 20th.
What the government says about AI in this kind of software#
HMRC published guidelines for software developers using generative AI (opens in a new tab) on 28 January 2026. It’s written about tax software, and about AI features inside a product more than using AI to build one. I couldn’t find anything specific to payroll. It’s the closest there is though, and it starts off positive: HMRC “encourages innovative use of AI in tax software products”.
| HMRC expects | What this example shows |
|---|---|
| “only use reliable source data”, from “official HMRC publications”, “legislation” and “established case law” | Legislation is on the list. Here the official consolidated copy appears to be the stale bit |
| “continuous monitoring, version control and timely updating of the underlying code and all relevant data sources” | You need to know which source each number came from and when you last checked it |
| “It should support, not replace, human judgment” | The model can find the page. Somebody still has to check the page |
| Tell users about “hallucinations”, where the output “is factually incorrect or made up” | This isn’t one. A model quoting the page perfectly would still be wrong |
What I do about it#
| Do | Why |
|---|---|
| Use the top model for research | Cheaper models are fine for boilerplate. Reading legislation is the part where you want the best one you can get. The research for this post was done with one, and it caught the stale footnote date, which wasn’t in my first notes |
| Make it quote, with a link | A summary hides which version of the text it read |
| Read what changed the text | Open the instruments in the footnotes, then check whether those were amended before they started |
| Cross-check with the regulator | The Pensions Regulator’s code said 22 the whole time |
| Keep a ledger of decisions | One entry per figure or date, so you can see later why the code says what it says |
A ledger entry doesn’t need to be clever. This is the one for this rule:
rule pension contributions due date (general rule) value 22nd of following month if electronic, else 19th source SI 2012/215 reg 40, as made backed by The Pensions Regulator, general code not using SI 1996/1715 reg 16, revised page (19 days only) checked 23 Nov 2026 note revised page appears to be missing the 2012 amendment
When the page gets fixed, or a rate changes, the ledger says which lines of code to look at.
Sources#
All checked on 23 November 2026.
- HMRC: Guidelines for using generative artificial intelligence if you’re a software developer (opens in a new tab) - first published 28 January 2026.
- HMRC: Strengthening standards for software that integrates with HMRC (opens in a new tab) - 26 March 2026, repeats the generative AI expectations.
- SI 1996/1715 regulation 16, revised (opens in a new tab) - paragraph (1), the banner and footnotes F1 and F2.
- SI 2010/772 regulation 48, as made (opens in a new tab) - the 2010 text, 19 days. Revised (opens in a new tab) - with the 22 days.
- SI 2012/215 regulation 40, as made (opens in a new tab) - adds the 22 days. Regulation 41 (opens in a new tab) - the same for personal pensions. Regulation 1 (opens in a new tab) - in force 1 July 2012.
- SI 2012/1257 regulation 3, as made (opens in a new tab) - moves the start of the 2010 Regulations from 1 October 2012 to 1 July 2012.
- SI 2013/2556 regulation 2, as made (opens in a new tab) - replaces paragraphs (2) and (3), with the footnote about SI 2012/215.
- SI 2000/2692 regulation 5, revised (opens in a new tab) - the personal pensions rule.
- The Pensions Regulator, general code of practice: Receiving contributions (opens in a new tab) - in force 28 March 2024.
My reading of the published texts as at 23 November 2026. Not legal advice. legislation.gov.uk hasn’t confirmed the page is out of date. The widget shows the general rule only.
Comments