TaxMax / Method
How a provision earns its place.
The full method, step by step: what is fetched, how it is read twice, what stops a release, and what the result does and does not prove.
TaxMax takes each Act from legislation.gov.uk in the two machine-readable forms the publisher offers, stores the files unaltered, reads each form with a separate extractor, proves that every word of every record maps to bytes in the file, and compares the two readings. If they differ, the build stops. The single exception is a difference that exists in the publisher’s own two files: that field is released marked unresolved, with both values. Two reviewers from different AI model families must confirm the exact files before anything is released.
The aim is narrow and deliberate. We do not claim to have found the correct law. We claim that what we hold is a faithful, reproducible reading of what the official publisher published, that every word can be traced, and that where the publisher is inconsistent you are told.
The publisher gives the same Act twice. That is the opportunity.
legislation.gov.uk, run by The National Archives, publishes each piece of legislation in several formats. Two of them are complete, structured, machine-readable versions of the same text: the publisher’s own XML (Crown Legislation Markup Language) and Akoma Ntoso, an international standard for legal documents. They are produced by the publisher’s systems from the same underlying data, but they are different files with different structures.
That gives a check nobody has to take on trust. If a program reads the XML and another, written separately, reads the Akoma Ntoso, and the two produce the same provision with the same words in the same order, then either both are right or both are wrong in exactly the same way. Two separately written readings of two different files are our main guard against an extractor’s mistake going unnoticed, and where the files themselves differ it brings out something that cannot be seen from either file alone.
The publisher is candid about the limits of the data it provides to software. Its developer documentation says that “the legislation is somewhat out of date” and that “the completeness and accuracy of the data cannot be guaranteed”. We treat those statements as the starting point, not as small print.
What happens to an Act
1. Fetch
A dedicated service account requests the whole-Act document in both forms from the publisher’s ordinary public addresses. Every request carries an identifier naming us and a contact address, observes the delay the publisher’s robots file asks for, and stays far inside the publisher’s fair-use limit. The publisher’s terms are the Open Government Licence v3.0: we attribute the source and claim no endorsement.
2. Archive
Each file is stored exactly as received, named by its SHA-256 fingerprint, and entered in an append-only record in which every line includes the fingerprint of the line before it. Altering or removing an archived file later would break the chain. Builds can only read the archive; they cannot write to it.
3. Extract twice
Extractor A reads the publisher’s XML. Extractor B reads the Akoma Ntoso. They were written from separate written specifications, and B’s author was not shown A’s code, A’s output, or the checking programs. Each turns the file into records: one for each unit (a section, a subsection, a paragraph of a schedule) that carries an identifier found in both files and not repeated in either, holding its number, its heading, its words in order, the tables and quoted wording inside it, any dates and territorial extent the publisher states, and for every piece of text the byte positions in the file it was read from.
An extractor never invents anything. A list number that one form leaves to be generated is recorded as “a number belongs here and this form does not state it”, not made up. Anything an extractor meets that the written contract does not cover makes it refuse the whole document.
4. Check the mapping
A separate program, run by neither extractor, takes the file and the records and works the other way: it confirms that every source position a record cites is real, that the words at those bytes are the words in the record, and that every piece of text in the body of the Act that the written contract classifies as the Act’s text is claimed by exactly one record. Text that no record accounts for is a fault. So is text claimed twice.
Some things are deliberately outside the records, and the written contract lists each one: the publisher’s editorial notes (a record holds the reference to a note, not its text), typographic styling such as italics and subscripts, and images, which are marked but not read. Numbers are normalised by a stated rule (“(1)” is held as “1”).
5. Compare
The two sets of records are compared key by key: the same provisions, in the same order, with the same number, heading and sequence of words. A provision found by one extractor and not the other is a fault. Any difference stops the build, and the cause is then found in the bytes. If an extractor or a rule is at fault, it is corrected and the whole Act is built again; nothing is patched in the output.
6. Admit only what the publisher’s files prove
Sometimes the two files really do say different things. In section 71 of the Value Added Tax Act 1994 the heading reads “sections 59 60 to 70” in one file and “sections 5960 to 70” in the other. Such a difference may be admitted only if all of the following hold: both values are found in the archived bytes and quoted with their offsets in a written evidence note that is committed with the code, whose own fingerprint is part of the build’s identity, and whose every excerpt the build checks against the files (whether the excerpts are the right ones is for the reviewers to judge); the admission names the fingerprints of both files and lapses if either file changes; the entry is exact; the Act stays under a hard limit of ten unresolved differences per thousand records and never more than 25; and the list is in front of both reviewers and of whoever approves the release. Over the limit, the Act is not released by this method at all.
One kind of difference can never be admitted. Each record carries a context worked out from the file: the territorial extent it states or inherits, and its status marks. The build works the context out from both files, and if they give a different context for any record the whole Act is refused.
An admitted field is released as unresolved. A query for it returns both values and never one of them. We do not decide which is right.
7. Review and release
Each build also runs a set of deliberately planted faults (a word changed, a provision dropped, a number altered, a mark falsified) and must report every one; a build that misses any is discarded. Then two reviewers built by different AI companies read the exact commit and files, re-run what they can, sample provisions against the bytes, and return a verdict. Both must confirm. The release command refuses any build that was not made from precisely the files the reviewers read.
What you can rely on, and what you cannot
It does show
That each released record is a reproducible reading of specific published files, identified by fingerprint. That two independent readings agree on it, except on fields marked unresolved. That every word traces to bytes. That known inconsistencies in the publisher’s files are flagged on the field they affect, or against the Act as a whole where they belong to no single provision.
It does not show
That the publisher’s text is the law in force today. That an error shared by both of the publisher’s files has been caught. That any provision applies to your facts. Which of two conflicting values is correct.
Things we refuse instead of approximating
- A provision that exists in two territorial versions in one document, where nothing the publisher states lets the versions be told apart reliably.
- A file whose own metadata defines the same label twice in different ways.
- Any element or attribute our written contract has not classified. The first batch of seventeen further Acts stopped on 414 such kinds; each was examined and classified before any of those Acts was built.
Images
Occasionally the publisher holds part of an Act only as a picture. Schedule 6 to the Customs and Excise Management Act 1979 is three images, and one formula in paragraph 3 of Schedule 5 to the Finance Act 2003 is an image in both files. Our records carry a marker at that place saying that something stands here which the record does not hold. The content of those images is neither extracted nor compared.
Who does the work
The extraction, checking and review are carried out by AI systems under written rules, with a human director accountable for the company and for each release. We say so because you should know, and because the method is designed for exactly that situation: no step relies on one model’s say-so. See the company page.