Skip to main content

How do you validate an AI tool or machine learning model for GxP use?

Validate it as a GxP computerized system, scaled to risk, then add what a trained model needs: an intended use describing its input data, a measured baseline for the process it replaces, acceptance criteria approved before testing, independent, carefully labeled test data, results with confidence intervals by subgroup, and change control and drift monitoring in use. A bought model needs the same, tested on your data. These steps draw on draft EU Annex 22 and FDA’s January 2025 draft guidance.Checked against its sources on 26 November 2026. How these answers are made

Illustration of a seal reviewing RUN-214, with its 7.8-hour hold duration circled in red.

1The steps, in order.

Validate the model inside its computerized system, as Annex 11 expects for any GMP system, with decisions on the extent of validation “based on a justified and documented risk assessment”.1 The EU’s draft Annex 22 and FDA’s January 2025 draft guidance for drugs and biologics then add what a trained model needs. Both are still drafts on 26 November 2026.2,3 For devices, the QMSR requires production and quality system software to be validated for its intended use, and FDA’s final Computer Software Assurance guidance of February 2026 says its risk-based approach can be applied to “artificial intelligence/machine learning tools”: see CSV vs CSA.4

  1. Describe the intended use. A process expert writes down the task, the input data with “all common and rare variations”, the subgroups that matter, the known limits and, where testing is reduced because a person decides on the model’s output, that person’s responsibility. It is approved before acceptance testing. FDA calls this the question of interest and the context of use.5,6
  2. Assess the risk. FDA combines model influence, how much the output counts, with decision consequence, how bad a wrong answer would be; the evidence needed rises with the result.6 Draft Annex 22 scales its activities to the risk to patient safety, product quality and data integrity.5
  3. Measure the process the model replaces. Acceptance criteria should be “at least as high as the performance of the process it replaces”, so that performance has to be known first.5
  4. Write and approve the test plan: metrics, acceptance criteria by subgroup, the test data, a test script and how each metric is calculated. A process expert sets the criteria, approved before testing.5 FDA’s draft also wants the plan to describe the model and its training and tuning data, as the checklist below sets out.6
  5. Build and lock the test set: representative, large enough for statistical confidence and labeled to “a very high degree of correctness”. Anyone who has had access to it stays out of training and validating the model or, where that is impossible, works on them only paired with a colleague who has not.5
  6. Run the test. Report each estimate with confidence intervals, review which features drove the decisions, log a confidence score per output, and document, investigate and justify any deviation.6,5
  7. Decide, release and keep it validated: change and configuration control before use, then monitoring of performance and of drift in the input data, with retest triggers written down. FDA’s draft wants that plan available in the site’s quality system, with a summary in the marketing application for a product- or process-specific model.5,6

1.1If you buy the model.

The steps still apply when the model comes inside a supplier’s system or as a hosted service. Presenters at EMA’s workshop said the regulated user’s responsibility “cannot be transferred to the supplier”.7

  • Get the supplier’s intended use, test plan and report, and how its test data was kept out of training, and review them yourself. Draft Annex 22 wants that documentation “available and reviewed by the regulated user” however the model was built; FDA’s draft asks whether a pre-trained model was used, on what data and how it was obtained.5,6 If a supplier’s model or API cannot provide the “outputs, rationale, logs or evidence needed for control”, a presenter told the workshop, the manufacturer cannot measure and justify the system.7
  • Get inside the supplier’s change control. Put the tested model version under configuration control, with a way to detect an unauthorized change.5 Agree how new versions are released, including your chance to test each one first, as the draft revision of Annex 11 expects of service contracts.8
  • Test it on your own data, against the performance of the process it replaces at your site. Draft Annex 22 counts site and equipment among possible subgroups, so the supplier’s results from other sites may not cover yours.5

See validating SaaS for GxP for supplier agreements and audits, and EU GMP Annex 22 for how the draft treats supplied models.

2Example: testing a plate-reading model.

Example, invented for illustration: a sterile manufacturing site replaces manual reading of environmental monitoring plates with model EM-⁠07, which photographs each incubated settle or contact plate and calls it growth, no growth or undecided. A no-growth call is final. Every growth or undecided plate goes to a microbiologist, who counts and identifies the colonies.

Table 1. Example. The test plan’s key entries, each traced to the draft.
FieldEntryDraft Annex 22
Intended useAs above; written by the microbiology lead and approved, with the test plan, on 1 April 20263.1, 3.3, 7.2
SubgroupsGrowth: 80 plates at 1 CFU, 100 at 2 to 10, 60 over 10. No growth: 600 clean, 160 with condensation, bubbles or cracked agar3.2
Baseline2025 reader study: 3 microbiologists read the same 100 growth and 300 no-growth plates. Sensitivity 282 of 300 reads (94.0%), specificity 873 of 900 (97.0%)4.3
CriteriaSensitivity: one-sided 95% lower bound at least 94.0%; on 1 CFU plates, at least 94.0% with a lower bound of at least 90.0%. Specificity at least 97.0%, overall and on artifact plates4.1, 4.2
Test set1,006 plates collected 6 to 24 April, after the model was frozen on 2 April, with growth plates drawn from grade C and D rooms. 6 with unreadable barcodes excluded and recorded, leaving 240 growth and 760 no growth5.1, 5.5, 6.1
Size80 plates at 1 CFU, so that two misses still give a lower bound above 90%5.2
LabelsTwo senior microbiologists read each plate independently; a third, and a subculture, settle disagreements5.3
IndependenceImages in a QA-controlled store with access control and an audit trail; the model’s developers had no access; every use logged6.2, 6.3, 6.5
ThresholdConfidence below 0.70 gives “undecided”, counted as a growth call9.2
Table 2. Example. Results, with exact one-sided 95% lower bounds in brackets.
MetricCriterionTest 1, AprilTest 2, June
Sensitivity, allLower bound ≥ 94.0%238 of 240, 99.2% (97.4%)249 of 250, 99.6% (98.1%)
Sensitivity, 1 CFU≥ 94.0%, lower bound ≥ 90.0%78 of 80, 97.5% (92.3%)84 of 85, 98.8% (94.5%)
Specificity, all≥ 97.0%746 of 760, 98.2% (97.1%)741 of 750, 98.8% (97.9%)
Specificity, artifacts≥ 97.0%149 of 160, 93.1% (88.9%), failed168 of 170, 98.8% (96.3%)
Matthews coefficientReported only0.9570.974

The plan judged sensitivity on its lower bound because a missed colony is final, and specificity on the estimate because a false growth call only sends the plate to a microbiologist. Test 1 passed overall and failed on one subgroup, which is why the plan set criteria by subgroup. Heat maps for the 11 false growth calls on artifact plates centered on condensation droplets, not colonies, and QA raised a deviation.5 The developers added 400 artifact plates to the training data and froze version 1.1 on 26 May. Because the April plates had now steered development, they could no longer show independent performance, so the site collected 1,000 new plates from 1 to 19 June.9 Test 2 met every criterion, and QA approved release under change and configuration control on 7 July, 14 weeks after the plan.

In use, a microbiologist rereads a random 2% of no-growth calls each month, and the site trends the undecided rate and image brightness by agar lot. A new agar supplier, incubator, camera or model version triggers a documented decision on retesting.5,9

3Checklist: the records an inspector will ask for.

Table 3. Validation records for an AI model, each tied to its source.
RecordWhat it should showSource
Intended useTask, inputs and their variations, subgroups, limits, the operator’s role; approved before testingDraft Annex 22 3.1 to 3.3; FDA steps 1 and 25,6
Model and training dataModel description; training and tuning sets, their split, collection, labeling and control; why they are relevant and reliable; training method and logsFDA step 4; EMA reflection paper 2.5.1 and 2.5.36,9
Risk assessmentModel influence, decision consequence, effect on patient, product and dataAnnex 11 section 1; FDA step 31,6
BaselineMeasured performance of the process being replacedDraft Annex 22 4.35
Test planMetrics, criteria by subgroup, test data, script, calculations; approved before testingDraft Annex 22 4 and 7.2; FDA step 45,6
Test data fileSelection rationale, size per subgroup, labeling, pre-processing, exclusionsDraft Annex 22 55
IndependenceHow test data was kept from development; access log; when and how often it was usedDraft Annex 22 65
Test reportResults with confidence intervals by subgroup; deviations investigatedDraft Annex 22 7.3 and 7.4; FDA steps 5 and 65,6
ExplainabilityFeatures behind decisions, reviewed when the results are approvedDraft Annex 22 85
ConfidenceScore per output, threshold, what “undecided” triggersDraft Annex 22 95
ReleaseFitness-for-use decision; model version under configuration controlDraft Annex 22 10.1 and 10.2; FDA step 75,6
Monitoring planPerformance and drift metrics, frequency, retest triggersDraft Annex 22 10.3 and 10.45,9
Supplier evidenceAgreement with the supplier; its development and test documents, reviewed by youAnnex 11 section 3; draft Annex 22 2.21,5

4What FDA, the EU and others expect, and what is still draft.

Table 4. Who expects what.
SourceStatus on 26 November 2026What it adds
EU Annex 11 (2011)In force; a revised draft went to consultation with Annex 22Risk-based validation; no decrease in quality when a system replaces a manual step1,10
Draft Annex 22Draft, written with PIC/S; consultation closed 7 October 2025; under revision, informed by an expert workshop on 30 June 2026The test requirements above, for static, deterministic models in critical uses10,7,5
21 CFR 211.68In forceComputer systems checked to a written program, output checked for accuracy11
FDA draft AI guidanceDraft, January 2025Seven-step credibility assessment; a maintenance plan3,6
EMA reflection paperAdopted September 2024A test set is used once; metrics insensitive to class imbalance; re-evaluation after non-trivial stack changes in high-risk uses9
FDA and EMA principlesJanuary 2026Assess “the complete system including human-⁠AI interactions”12
ISPE GAMP AI GuideJuly 2025; industry good practice, not regulationLife cycle from concept to retirement, used with GAMP 5 Second Edition13,14

FDA’s draft says AI used in manufacturing must meet CGMP, and that the quality unit duties in 21 CFR 211.22 and 211.68 apply; where a person is in the loop, evaluation should cover “the human-⁠AI team”. A model change that affects performance “should be reported to the Agency”, generally as a postapproval change under section 506A of the FD&C Act and 21 CFR 314.70 for drugs or 601.12 for biologics. The draft also suggests ICH Q12 established conditions and comparability protocols in the marketing application, to get FDA’s input in advance on which model changes need no prior submission.6 See FDA’s AI guidance and post-approval change categories.

The EU text is moving. EMA’s report of its June 2026 expert workshop, published on 2 October 2026, says the drafting group has discussed letting dynamic, probabilistic and generative models into GMP applications if a fully documented, risk-based control strategy supports them.7,15 Plan to the July 2025 text until a final annex appears. PIC/S helped draft the annex, and its agreement with EMA “mandates the harmonisation of PIC/S and EU GMP Guides”, so expect the final annex in the PIC/S GMP Guide too. When PIC/S revised Annex 19 in September 2026, it invited its members outside the EEA, such as the MHRA, Health Canada, Australia’s TGA and Swissmedic, to transpose it into their own guides.10,16,17 Whether the EU AI Act also applies is a separate question: see the EU AI Act and pharma.

5Generative AI and LLM tools.

Draft Annex 22 does not cover large language models and says they should not be used in critical GMP applications. In non-critical uses, qualified people are responsible for ensuring the outputs are suitable, and the draft’s principles “may be considered where applicable”.5 Validation then covers the system and the use: test the tool on representative tasks against criteria an expert approves, include the inputs that make it fail, pin the model version, and treat a new version as a change under Annex 11’s change control.5,1

At EMA’s workshop, the answer to regulators’ questions on hallucination and fabrication was that they must be identified and evaluated in development and validation: “if the manufacturer cannot demonstrate fitness for intended use in view of those failure modes, the use cannot be justified.”7 See whether ChatGPT and other LLMs can be used in GMP work, FDA’s warning letter on AI-written documents and what a human in the loop must do.

6Where validation goes wrong.

  • A reused test set. If the model needs more work after testing, EMA says “a completely new and independent test dataset is required”. Treat tuning a threshold on test results as further development.9
  • Labels made by AI. Generating test data or labels “is not recommended”, and any use should be fully justified.5
  • Two meanings of validation. In machine learning the validation dataset tunes the model; the final test uses separate hold-out data.9,5
  • A model change treated as no change, including a supplier’s update. Every change to the model, its system or its inputs needs a documented retest decision.5

FDA’s device center made that point in a September 2026 warning letter to O.N. Diagnostics, whose software release added a machine learning algorithm without a new 510(k). That finding is about device clearance, not GMP, but the reasoning applies to any model change:18

A new model trained on different data, with different architecture, or optimized for a different objective may perform differently across patient populations, imaging equipment types, or clinical settings. This new feature fundamentally changes how the device performs, fails, and affects patients in ways that go beyond what was originally cleared and therefore the feature must be adequately validated.

7How it runs in Seal.

In Seal, assurance starts from intended use and function risk, and supplier evidence, the configuration baseline, testing, anomalies and release stay linked, so each change is assessed from what moved (computer system assurance). The validation and AI assurance guide applies the same approach to Neil, Seal’s AI agent: evaluate it on representative jobs with expert-reviewed acceptance criteria, include obsolete procedures, conflicting records, missing units and insufficient evidence, define when Neil should stop or ask, and run the same cases again after a relevant model or configuration change, keeping failures as well as successes. A general model benchmark does not establish suitability for your process.

The guide treats an AI-generated test as a starting point, to review against the requirement and execute, not as evidence in itself. Neil decides nothing in GMP work: it proposes changes, their tests run, and your team releases them.

AQuestions and answers

How large should an AI model’s test set be?

Large enough to calculate each metric with adequate statistical confidence in every subgroup, which is what draft Annex 22 asks. Work back from the criterion: to show a sensitivity of at least 95% with 95% confidence and no misses, a subgroup needs at least 59 positive samples, and allowing for any misses needs more.

Does a human in the loop reduce the validation needed?

Draft Annex 22 contemplates reduced testing where a person makes the decision using the model’s output, but then the operator’s responsibility should be written into the intended use, the operator’s training and performance monitored and records of the review kept. EMA’s 2026 workshop report records that human oversight cannot make up for inadequate validation.

Does 21 CFR Part 11 apply to an AI model?

It applies through the records. Any record kept electronically under an FDA records requirement falls under Part 11: the validation and test records and, in use, any output or confidence score that forms part of the GMP record. FDA’s 2003 scope guidance limits how it enforces some Part 11 controls, such as audit trails, but 21 CFR 211.68 and the other GMP rules that require those records still apply. Draft Annex 22 asks for test-data access records and audit trails to be kept like other GMP documentation.

Can a model that keeps learning in use be validated?

Draft Annex 22 covers only static models and says dynamic models that keep learning in use should not be used in critical GMP applications. FDA’s draft guidance expects sponsors to anticipate model-directed changes and to identify and evaluate them, with manufacturing changes going through the change management system.

References18 sources

References

  1. 1EudraLex Volume 4, Annex 11: Computerised Systems, principle and sections 1, 3 and 10, European Commission, in operation since 30 June 2011. https://health.ec.europa.eu/system/files/2016-11/annex11_01-2011_en_0.pdf (read 26 November 2026)
  2. 2EudraLex Volume 4: Good Manufacturing Practice guidelines, European Commission, listing Annex 11 of January 2011 and no Annex 22. https://health.ec.europa.eu/medicinal-products/eudralex/eudralex-volume-4_en (read 26 November 2026)
  3. 3Considerations for the Use of Artificial Intelligence To Support Regulatory Decision-⁠Making for Drug and Biological Products, guidance page, docket FDA-⁠2024-⁠D-⁠4689, marked draft and not for implementation, FDA. https://www.fda.gov/regulatory-information/search-fda-guidance-documents/considerations-use-artificial-intelligence-support-regulatory-decision-making-drug-and-biological (read 26 November 2026)
  4. 4Computer Software Assurance for Production and Quality Management System Software, final guidance, sections II and V.A, FDA Center for Devices and Radiological Health and Center for Biologics Evaluation and Research, 3 February 2026. https://www.fda.gov/media/188844/download (read 26 November 2026)
  5. 5EudraLex Volume 4, Annex 22: Artificial Intelligence, draft for consultation, European Commission and PIC/S, July 2025. https://health.ec.europa.eu/document/download/5f38a92d-bb8e-4264-8898-ea076e926db6_en?filename=mp_vol4_chap4_annex22_consultation_guideline_en.pdf (read 26 November 2026)
  6. 6Considerations for the Use of Artificial Intelligence To Support Regulatory Decision-⁠Making for Drug and Biological Products, draft guidance, sections III, IV.A and IV.B and footnotes 21, 35 and 36, FDA, January 2025. https://www.fda.gov/media/184830/download (read 26 November 2026)
  7. 7Multistakeholder workshop on expert contributions to artificial intelligence guidance development (Annex 22), report, EMA/156789/2026, introduction and sections 1.1, 1.4 and 1.5, European Medicines Agency, workshop of 30 June 2026, published 2 October 2026. https://www.ema.europa.eu/en/documents/report/report-multistakeholder-workshop-expert-contributions-artificial-intelligence-guidance-development-annex-22_en.pdf (read 26 November 2026)
  8. 8Annex 11: Computerised Systems, draft for consultation, section 7.5, European Commission and PIC/S, July 2025. https://health.ec.europa.eu/document/download/40231f18-e564-4043-94de-c031f813d38b_en?filename=mp_vol4_chap4_annex11_consultation_guideline_en.pdf (read 26 November 2026)
  9. 9Reflection paper on the use of Artificial Intelligence (AI) in the medicinal product lifecycle, EMA/CHMP/CVMP/83833/2023, sections 2.5.1 to 2.5.4 and 2.5.6, European Medicines Agency, adopted 9 September 2024. https://www.ema.europa.eu/en/documents/scientific-guideline/reflection-paper-use-artificial-intelligence-ai-medicinal-product-lifecycle_en.pdf (read 26 November 2026)
  10. 10Stakeholders’ consultation on EudraLex Volume 4, Chapter 4, Annex 11 and new Annex 22, European Commission, open 7 July to 7 October 2025. https://health.ec.europa.eu/consultations/stakeholders-consultation-eudralex-volume-4-good-manufacturing-practice-guidelines-chapter-4-annex_en (read 26 November 2026)
  11. 1121 CFR 211.68, Automatic, mechanical, and electronic equipment, eCFR. https://www.ecfr.gov/current/title-21/section-211.68 (read 26 November 2026)
  12. 12Guiding Principles of Good AI Practice in Drug Development, principle 8, FDA and European Medicines Agency, January 2026. https://www.fda.gov/media/189581/download (read 26 November 2026)
  13. 13ISPE GAMP Guide: Artificial Intelligence, publication page, ISPE. https://ispe.org/publications/guidance-documents/gamp-guide-artificial-intelligence (read 26 November 2026)
  14. 14ISPE GAMP Guide: Artificial Intelligence, table of contents, ISPE, 2025. https://ispe.org/sites/default/files/publications/guidance-documents/2025-TOC/GAMP_Guide-AI_TOC.pdf (read 26 November 2026)
  15. 15Good manufacturing practice: Multistakeholder workshop on expert contributions to artificial intelligence guidance development (Annex 22), event page, European Medicines Agency, report first published 2 October 2026. https://www.ema.europa.eu/en/events/good-manufacturing-practice-multistakeholder-workshop-expert-contributions-artificial-intelligence-guidance-development-annex-22 (read 26 November 2026)
  16. 16Revision of PIC/S GMP Guide (PE 009-⁠18), news item, PIC/S, Geneva, 23 September 2026. https://picscheme.org/en/news (read 26 November 2026)
  17. 17List of PIC/S Participating Authorities, PIC/S. https://picscheme.org/en/members (read 26 November 2026)
  18. 18Warning Letter, O.N. Diagnostics, LLC, CMS 730301, FDA Center for Devices and Radiological Health, 1 September 2026. https://www.fda.gov/inspections-compliance-enforcement-and-criminal-investigations/warning-letters/diagnostics-llc-730301-09012026 (read 26 November 2026)

See your process in Seal.

Bring a procedure or a recurring problem. See how your team configures it with Neil and improves the next run.