In July 2025 the European Commission published for consultation a draft of EU GMP Annex 22, a new annex on artificial intelligence. Its scope section contains these two passages:

“The document applies to models with a deterministic output which, when given identical inputs, provide identical outputs. Models with a probabilistic output which, when given identical inputs, might not provide identical outputs are not covered by this document and should not be used in critical GMP applications.”

“Following the above, the document does not apply to Generative AI and Large Language Models (LLM), and such models should not be used in critical GMP applications.”

The next sentence allows for non-critical use, with qualified personnel responsible for the outputs.

That scope is under revision. EMA’s report of its 30 June 2026 expert workshop says that consultation comments supported allowing LLMs and generative AI in GMP applications, and that the drafting group has discussed allowing them, provided they comply with the annex and are supported by a documented, risk-based control strategy, while noting that “concerns remain” about what that strategy needs. The workshop gathered input from industry, and the report says the discussions suggest there “may be viable pathways” for such technologies, subject to appropriate controls. Minutes of an HMA/EMA meeting held before the workshop, in June 2026, expected publication of Annex 22 in early 2027. We have not seen a revised text.

We have looked at the question from a different side. We built a document-assessment pipeline that contains an LLM and, at a pinned configuration, gave identical outputs for identical inputs at every stage under the operations we tested. This post explains what we mean by that, why we think regulated document assessment should meet this condition even though, on our reading, no binding rule we cite requires it, and what it costs.

A word on scope. Annex 22 is written for the manufacture of medicinal products. Document assessment is done under other rules as well: 21 CFR Part 11 asks for validation of electronic-record systems to ensure “accuracy, reliability, consistent intended performance”; the US device quality regulation, which incorporates ISO 13485, asks that quality-system software be validated for its intended use, including when it changes; the EU AI Act asks high-risk systems to perform consistently in accuracy, robustness and cybersecurity throughout their lifecycle. Part 11 applies to records that predicate rules require, here an expert’s recorded judgment, and FDA’s 2003 scope guidance says the agency intends to exercise enforcement discretion on specific Part 11 requirements, including validation and audit trails, while predicate-rule requirements remain enforceable. Article 15 of the AI Act applies only to AI systems classed as high-risk, and we cite it by analogy. On our reading, each asks for consistency or controlled change in its own words, and none requires byte-identical output. We quote Annex 22 because the draft states the identical-output criterion in a single sentence. The draft excludes LLMs from its scope by name, so replayability alone does not bring an LLM system within it. What a final text allows is for regulators to decide.

Determinism is not correctness

One thing first, because it is a common objection. A deterministic system can be consistently wrong. Determinism does not make an assessment correct.

What determinism gives you is different. At a pinned configuration, an error can be reproduced, so its cause can be investigated and a fix can be checked. The system behaves as a function of its inputs and its configuration, which makes established software testing easier to apply. And “nothing changed” becomes a statement that a machine can check. Correctness still has to be established by qualified people against a reference. We did not measure it in this work, and for this pipeline and these documents that study is still to be done. This post is about reproducibility only.

Four levels of “deterministic”

The word is applied to different parts of a system, so it helps to say which part is meant. A recent paper from Enveda on reviewing pharmaceutical batch records with Claude does so. It uses “deterministic” for code steps around the model, and its supplementary information applies the word to the caps on the advisory outcome. The supplementary information states separately that the model output varies: sampling parameters cannot be set on the models it uses, no seed is available, and “Few findings appeared in every one of three identical runs”.

In that design a person dispositions every comment, consistency is measured for each change, and each candidate prompt, rule or model is run up to three times on a fixed set of 12 records with known findings. The paper describes the system as a non-critical advisory application in the sense of the draft Annex, and states that it has not been validated as a GMP computerised system. We mention it here for one reason: it says clearly which part of a system the word covers, and a reader needs to know that.

To make that explicit we use four levels.

LevelWhat is identical across runsTypical example
L0Nothing guaranteed, even with the most deterministic settings the interface acceptsA hosted API
L1Model output, on the same hardware, one request at a time (we did not test this without batch invariance)A self-hosted server sent one request at a time
L2Model output at a pinned configuration, regardless of concurrency, restarts, or which GPU of the same model runs itBatch-invariant inference with pinned scheduling settings
L3Every stage: text extraction and OCR, chunking, embedding, indexing, retrieval, inference, verificationThe pipeline in our preprint

“Replayable” is our word for L3. Given the stored documents and items and the same pinned configuration, including the GPU model, the assessment run again gave the same bytes in every operation we tried.

What we measured

Our preprint (arXiv:2610.21300) reports the measurements behind levels L0, L2 and L3 of that table. They were made on public FDA documents for medical devices, because anyone can obtain them. Anyone can also send the same prompts to the hosted deployments and recompute our numbers from the deposited records. The pipeline itself is proprietary, and no one outside our company has yet reproduced its results. We have measured it only on documents for two device types, not on manufacturers’ records. We expect OCR to be the stage most sensitive to the kind of document, and we report below what OCR did with and without batch invariance.

At L0, we sent 70 prompts built from blood glucose meter documents to fourteen hosted deployments (seven models, each through two routes), each prompt as a byte-identical request, five times on each of two consecutive days. We asked for temperature 0 and a fixed seed wherever the interface accepted them. In practice two deployments took the setting: eight rejected it, and four accept the field but, by the provider’s documentation, ignore it. No deployment returned the same output on every prompt, and twelve of the fourteen changed at least one assessment label. On each deployment’s first day, the number of prompts whose label changed ranged from 0 to 18 of 70; counting either day, up to 27. Two deployments changed labels only between the two days, which a one-day test of labels would not have seen.

Turning reasoning down to the lowest documented setting did not reduce the number of prompts whose label changed within the first day: on the eight deployments that allow it, the number of prompts with a changed label rose in seven. For gpt-6-luna through the OpenAI API it rose from 14 to 42 of 70. Some of that comes from calls that reached the output limit without a parsable answer (7 of 350 at the default, 13 of 350 at the lowest setting), each of which counts as a difference; leaving them out, it rose from 8 to 32. With 49 much shorter prompts made of retrieved passages, three deployments returned every prompt byte-identically on the first day, and two of them on the second as well. The other eleven varied on the first day, nine of them on 48 or 49 of the 49.

At L2, we served an open-weight model ourselves on one GPU with batch-invariant inference enabled. Sent one request at a time, all 700 outputs over two days were byte-identical. Sent from eight concurrent senders, all 350 outputs were byte-identical to the sequential ones. With batch invariance disabled and all else equal, the full output varied on 58 of 70 prompts and the label on 5. Batch invariance lengthened the concurrent run by 18%, in one run each way.

These results depend on the configuration. A GPU of a different model did not reproduce the pipeline’s run: raw output matched on 117 of 776 items and labels on 742, and the per-stage hashes located every difference. When we lowered the engine’s prefill chunk budget from 16,600 to 4,096 tokens, one item at a time still matched the reference, but with eight concurrent items the raw output differed on 122 and 114 of 776 items in two runs. The GPU model and the engine’s scheduling settings therefore have to be pinned with everything else.

At L3, we extended the same discipline to the rest of the pipeline. OCR and embedding each varied when their own serving was not made invariant: with the OCR servers run without batch invariance and sixteen documents ingested concurrently, in a run stopped by a two-hour limit after 336 of the 337 documents, the extracted text changed for 13 of the 42 OCR documents compared and for none of the 294 with a text layer. Approximate retrieval indexes, which we built as comparison baselines, also varied with how they were built; the pipeline uses exact retrieval over the documents in scope. With every stage constrained, every per-stage hash for 337 documents and 776 assessment items matched the reference run across reruns, reordering, concurrency of up to sixteen items, interruptions including a kill and restart of the inference server, a document added and deleted, another machine with the same GPU model, and a later day. One attempt at sixteen concurrent documents stalled on a document and ended with 336 of 337 documents, so 11 of its 776 judgment records did not match; it was rerun after an extractor change that did not alter the extracted text, and the deposit holds both. On a second corpus of infusion pump documents (85 PDFs, 516 items), four runs also agreed, though 422 of the 516 assessments were “Cannot determine” and 8 outputs were cut off without a label, identically in all four. This is an empirical finding under the operations we tried, on one judgment model family, one GPU model and one inference engine. It is not a proof.

Why we think it is worth requiring

This section is our argument. It goes beyond what we measured. Three reasons, in order of weight.

It serves what existing rules already ask for. Rules outside the Annex 22 draft do not ask for identical outputs, but they ask for things that identical outputs make easier to show. Part 11 asks for validation to ensure “consistent intended performance” and for revision and change control procedures over systems documentation. An audit trail preserves what was produced, but it cannot show that the validated system still produces it. Repeating runs estimates variability, which may be enough for population-level questions, but with varying output a single difference seen after a change cannot be told from ordinary variation without more runs. We are not aware of a regulator having defined statistical acceptance criteria for LLM output. Making the whole pipeline a function of its inputs and pinned configuration removes the need to separate a change’s effect from run-to-run variation, provided the changed configuration is also deterministic, though someone still has to judge whether a difference matters. EMA’s workshop report also lists supplier oversight and visibility of changes among the topics discussed; a byte-level comparison against a recorded run is one way to detect a change, though not to judge whether the output is right.

It makes change impact easier to measure. If the assessment result moves when nothing has changed, it is harder to measure the effect of changing something: a prompt, a retrieval setting, a new revision of a document, a model upgrade. Under noise you need repeated runs per condition and a statistical test. Under determinism, on a fixed test set, one run per condition shows exactly which outputs changed, provided the changed configuration is itself still deterministic. That has to be checked: the lowered chunk budget above gave two runs that differed from each other on 143 of 776 items at eight concurrent items, while a single run at one item at a time matched the reference. The result also needs care in reading. A listed difference is not thereby a meaningful one: in our GPU comparison, 30 of 650 labels changed on identical prompts. Nor is an unchanged assessment thereby unaffected by the change. But a list of differences is useful evidence for a change record. By analogy, clause 10.1 of the Annex 22 draft, which does not cover LLMs, asks that any decision not to retest be “fully justified.”

It can save both compute and expert time. The input to the model call is determined by the item, the retrieved passages, the prompt and the pinned model configuration. Hash all of that, and an item whose hash is unchanged need not be run again at that configuration, because in our tests, at the pinned reference configuration, the same prompt always gave the same output. That has to be established for each configuration, as the lowered chunk budget above shows. We have not yet tested this reuse on revised documents. When a document set is updated, re-running retrieval shows which items’ retrieved passages changed, and the model and the reviewer can start from those. This relies on retrieval: an item whose passages did not change may still be affected by a new document that retrieval did not surface, so a procedure has to decide what else gets checked. Clause 10.5 of the draft, for models whose testing has been reduced, says that depending on criticality and the level of testing, human review may imply “a consistent review and/or test of every output” under a procedure. The draft does not cover LLMs and does not address replay. By analogy, replay can show that an output is the one already reviewed, but whether that satisfies a review procedure is for the procedure to decide.

What it costs

We should be honest about the bill.

In our work, determinism at L2 and L3 has meant serving the models ourselves with pinned weights, a pinned inference engine and batch-invariant inference, computing embeddings one text at a time, and using exact retrieval in place of an approximate index. Batch invariance lengthened our concurrent test by 18% for the judgment model and by 44% for the other model we could compare, in one run each way. It is a beta feature in the engine version we used, and those figures do not include the cost of the same discipline at OCR and embedding. It also limits the choice of models: one of the three open-weight models in our concurrency test could not be served in that mode. We have not compared the accuracy of models that can be served this way with that of hosted models. And replay lasts only as long as the hardware class. Once a GPU model is retired, what remains is the stored record, and the pipeline has to be re-baselined on new hardware under change control.

Hosted APIs have other costs that a validated process has to plan for: changes on the provider side that the caller may not be able to see or schedule, model retirements that can set the date of a revalidation, and repeated runs where variation has to be estimated. None of this is a fault of the providers; a shared service is operated for many customers, and a validated pipeline is one customer with unusual needs. Part of the cost of determinism is work that change control already asks for, and the reuse described above may offset part of the rest. We have not yet measured how much.

What this is not

It is not a claim of Annex 22 compliance. The Annex is a draft, it excludes LLMs by name, the identical-output sentence we quote is written about models rather than systems, and compliance is a claim about an entire computerised system in its environment. What we can say is that the identical-output criterion in the draft’s scope, applied to the whole pipeline rather than the model alone, was met by one LLM-based pipeline we measured, at a pinned configuration, under the operations we tried, on two device types.

It is not a claim that the pipeline has been validated, on any kind of record. Our measurements are on public FDA documents for medical devices; in the glucose meter set, 100 of 3,150 pages were read by OCR. We would expect scanned and handwritten batch records to depend on that stage far more, and we have not measured them.

It is also not a claim that a replayable system is accurate. The next piece of evidence we owe is an expert study of assessment accuracy, and we are looking for regulatory-affairs and quality professionals, in devices and in pharmaceuticals, to take part in it.

Materials