Validation-Ready AI for GxP Operations in Pharma

How GAMP 5 validation applies to AI/ML: why Categories 3-5 strain, Appendix D11's lifecycle evidence, retraining control and the AI maturity model.

Validation-Ready AI for GxP Operations in Pharma
Written by TechnoLynx Published on 19 Sep 2025

GAMP 5 Second Edition covers AI and machine learning components and their life cycles. ISPE’s GAMP Guide: Artificial Intelligence, published in July 2025, is meant to be used alongside it, not instead of it. Categories 3, 4 and 5 of the GAMP software framework were built around deterministic software. For an ML-enabled system, the conventional parts of the application are still validated in the traditional way.

Why GAMP 5 validation strains when the software learns from data

The GAMP categories are a way of sizing validation work. R.D. McDowall describes the lifecycle tied to each software category as “the main way of determining the amount of validation work you will need to undertake”. Category 3 software only needs to be installed, configured and tested against the user requirements, and the user can rely on the vendor’s own testing. Category 4 adds a functional specification and a configuration specification on top of the URS. Category 5 adds design and module specifications for code written specifically for the user.

All three models were built for deterministic software with static system behaviour. A 2025 review of AI validation in pharma points out that AI/ML systems do not follow deterministic execution paths. They rely on probabilistic models, they change as new data arrives, and their outputs can vary even for similar inputs. The same review argues that this pushes validation from static to continuous, from code-centric to data-centric, and from looking back to managing the lifecycle ahead of time.

Not everything about the system changes, though. Staib, Williams and Wyn (ISPE, 2023) note that for most ML systems, much of the traditional lifecycle still applies in full: user interface, reporting, security, access control, data integrity and data lifecycle management. The strain sits in the model. That is why we would not settle the question by labelling everything Category 5 and writing more test scripts. Static test scripts do not show that a model keeps generalising to the data it meets in production. For how a conventional system is placed into a category, see our guide to GAMP software categories classification.

Classifying an ML-enabled system: the order of decisions

The steps below put the conventional classification and the AI-specific layers in a sensible order:

  1. Confirm the system is GxP at all. Scope comes first. Deciding whether a system is GxP depends on its intended use, not on its technology.
  2. Classify the host application in the usual way. The interface, data handling, security and reporting are still validated as before.
  3. Treat the ML component as a subsystem. Appendix D11 describes developing AI/ML as a subsystem within the wider IT application or business solution.
  4. Record whether the model is static or dynamic. A static design uses a new model version only after human verification. A dynamic design adapts the model automatically.
  5. Place the system on the AI maturity model and rate its risk impact. The maturity level indicates the minimum control measures, as described further down.
  6. Check whether it is a critical application under the draft EU Annex 22. The draft judges criticality by intended use and the decision pathway, not by the department or the software label.

How does the ISPE GAMP Guide: Artificial Intelligence relate to GAMP 5 Second Edition?

As a document, the GAMP AI Guide stands alone. In substance, it extends GAMP 5. ISPE describes it as “a stand-alone Guide designed to be used in parallel with ISPE GAMP 5 (Second Edition)” and the other GAMP guides. ISPE also says it bridges established GAMP concepts with the characteristics of AI. It expands the considerations already set out in Appendix D11 of GAMP 5 Second Edition into a holistic framework.

The order of events makes this clearer. According to the ECA Academy, the Second Edition appeared at the end of July 2022. It was a revision of GAMP 5 rather than a “GAMP 6”, because the basic structure was still considered sound. One of four new development appendices was D11, “Artificial Intelligence and Machine Learning”.

So the AI Guide does not replace GAMP 5’s existing tools; it is used in parallel with them. Its stated aims include maturity-fit system design, a common language across stakeholders, and a monitoring and maintenance strategy that shows ongoing control.

Appendix D11’s three phases and the evidence each one needs

Appendix D11 sets out a lifecycle for an ML subsystem in three phases: concept, project and operation. ISPE authors use the same phase names as the overall GAMP 5 system lifecycle. The table maps each phase to the evidence that the cited reviews and ISPE authors expect it to produce.

Phase What happens Evidence to produce
Concept Intended use is described in business, functional and process terms, and the availability and quality of data for training and operation are assessed. A URS that defines goal-oriented behaviour such as predictive accuracy or classification boundaries; the level of explainability oversight will need, decided during model selection.
Project Data, models and hyperparameters are developed iteratively, then verified, accepted and released. A tollgate record of likely cost, risks and benefits before further investment; acceptance criteria set before testing, at least as good as the process being replaced; training, validation and test sets kept separate, with the test set excluded from all training and tuning; IQ/OQ evidence that covers dataset traceability, algorithm verification and training and testing benchmarks.
Operation The subsystem runs inside the computerised system, often alongside human operators, under continuous monitoring that may lead to changes. PQ evidence that the model keeps generalising as conditions change; change and configuration management covering code, data and models.

In the project phase, IQ and OQ take on data-centric evidence. Draft Annex 22 asks for test data that is representative, stratified across subgroups and large enough for statistical confidence, with labels checked to a very high degree of correctness. Where an ML component has stochastic elements, Staib and colleagues advise a large enough validation set and summary performance measures that are robust to small differences between runs.

The operation phase strains classical PQ. The 2025 review notes an unresolved debate: classical PQ relies on repeatable performance under known inputs, while AI needs dynamic metrics and statistical validation across changing datasets. Validation of an ML subsystem does not end at release. It turns into a monitored state that has to be kept up. How that continuing validation relates to verification of each release is covered in verification vs validation for AI systems.

How do GAMP 5’s risk-based controls map onto drift, hallucination and training-data quality?

GAMP 5’s risk logic still provides the scaffolding for these risks, but AI needs AI-specific risk matrices on top. The ISPE ML Risk and Control Framework (2024) uses the ICH Q9(R1) quality risk management process as its basis and draws on Appendix D11. Its authors note that ICH Q9(R1) applies to any system. It leaves open questions about data risks, model and algorithm choice, and drift control. To close that gap, they define eight hazard clusters along the D11 lifecycle. Their reasoning is that errors in early stages, such as dataset identification or model selection, can carry through into production.

AI-specific risk How it shows up Control in a GAMP-style framework
Training-data quality A data set that is not representative cannot train the model for its intended use or show its performance at test, and the iterative learning process may suffer. Data integrity by design across the data lifecycle, as covered by the GAMP RDI Good Practice Guide; dataset traceability within IQ/OQ.
Data drift Input data moves outside the range the model was tested on; slow drift is hard to detect. Monitoring both model performance metrics and whether inputs stay within the approved input sample space.
Hallucination Generative tools can produce confident text that is wrong, such as citing a guideline that does not exist. Under draft Annex 22, no generative AI or LLMs in critical GMP applications; in non-critical uses, qualified personnel check that the output is fit for purpose.
Spurious decision logic The model seems accurate but relies on irrelevant features such as lighting or equipment artefacts. Feature attribution or heat maps recorded at test, with feature review built into approval of test results.
Uncontrolled change The model, camera, process or input distribution changes without impact assessment or retesting. Documented, impact-assessed change control, with a justified rationale for any decision not to retest.

GAMP 5’s principle that effort follows risk still applies to AI. Scilife suggests ranking every AI system that touches a GMP decision by decision criticality, autonomy, adaptiveness and whether it feeds an official record. High tiers then carry the full evidence set, and low tiers carry a documented rationale and basic controls. The ISPE framework lists the usual measures for lowering an individual risk rating: more testing, extra procedural or technical controls, and more training data. When those are not enough, it has a further option, covered under the maturity model below.

Frozen models, dynamic models and the triggers that force revalidation

The 2025 review reports that FDA guidance (2025) expects AI/ML systems to have predetermined retraining triggers. The GAMP AI Guide’s definition of adaptiveness separates static designs, where new model versions are used only after human verification, from dynamic designs, where the model adapts automatically. The authors of the ISPE AI maturity model describe a locked state with manual retraining on new data sets. In that state the same input always gives the same output. They called it by far the most common stage at the time of writing.

Draft Annex 22 allows a retrained model only as a controlled change, with an impact assessment and any retesting needed. The 2025 review also treats retraining as a matter of change control. In AI, changes may come from training data, feature engineering or retraining schedules rather than code edits, and each one needs documentation, performance testing and QA approval before release. It also says revalidation is needed when models are updated, when inputs shift or when new data patterns appear. The conventional side of this, change control and periodic review after go-live, still applies to the host application.

Dynamic systems need the triggers built into the design. An ISPE article lists automated retraining after a period of time, after a number of new data points, when monitored KPIs cross thresholds, and on every data point. To keep such a system validated, the authors propose a controlled space with quantitative boundaries within which the model may evolve. KPIs for input data quality and model performance are monitored against that space. They also call for clear abort triggers for adaptive learning and full traceability of which model version was active and which decisions it led to.

The 2025 review finds that standardised protocols for retraining, revalidation triggers and dataset versioning are largely undeveloped. In our view, the triggers, thresholds and abort conditions belong in the URS and validation plan, not in a data scientist’s notebook. That way an auditor can see that a retrain followed a predefined rule rather than a judgement made at the time.

Where does the ISPE AI maturity model fit into the GAMP 5 lifecycle for an evolving ML system?

The authors of the AI maturity model propose using it to identify the extent of validation activities. They define maturity as how far an AI system can take control and evolve by its own mechanisms, within user and regulatory constraints. They plot it on two axes. Control design is the system’s capability to take over controls that protect product quality and patient safety. Autonomy is how feasible it is to perform updates automatically. The resulting positions group into six AI validation levels. Each level describes the minimum control measures needed for compliance, with detailed requirements still set by intended use and risk.

As summarised in the ISPE ML Risk and Control Framework (2024), the six levels are:

  • Level I: the system runs in parallel to the production process.
  • Level II: non-AI applications.
  • Level III: applications used in a locked state.
  • Level IV: autonomous with self-triggered learning, with humans in the loop who control updates at all times.
  • Level V: autonomous with self-triggered learning without humans in the loop, where human control relies on sampling after operations.
  • Level VI: fully autonomous, optimising toward a defined goal or through a direct feedback loop.

The higher levels change where validation effort goes. At level IV, part of the update process is automated, so the focus moves to monitoring model-quality KPIs within the validated range. The notification process for retraining or out-of-range operation must also be confirmed. The model’s authors describe a trade-off. Lower levels carry more organisational burden in day-to-day control. Higher levels need stronger technical measures to secure an increasingly autonomous system. They suggest starting with less autonomy and more human control, based on intended use, risk and the company’s experience with AI.

Over the lifecycle, the maturity position is set in initial planning and reviewed during operation. The ISPE ML Risk and Control Framework uses the maturity model in initial planning to define the target operating model for the first productive release. It combines the maturity level with risk impact, which ranges from indirect impact only to direct and immediate impact on the patient, to give a hazard impact rating. When individual measures cannot bring the risk down far enough, the overall risk can be lowered by changing the maturity level, either by reducing autonomy or by redefining the control design. The original authors expect the position to be re-evaluated as validation results, monitoring and risk assessments come in, which can push the design in either direction.

In the ISPE 2026 article’s syringe production line case, the system started as a non-binding tool running in parallel while optimisation stayed manual. It then moved to automated model updates on top of predefined KPIs and explainability features at maturity level V, and only afterwards approached a fully closed-loop level VI design. Read that way, the maturity model is not a label assigned once. It is the record of how much autonomy the evidence has earned so far.

Draft EU Annex 22 is narrower than the GAMP AI scope

Draft Annex 22 covers less ground than the GAMP AI Guide. The draft applies to AI models in critical GMP applications with a direct impact on patient safety, product quality or data integrity. It supplements Annex 11 and covers models trained on data rather than explicitly programmed. It accepts only static models with deterministic output. It states that dynamic models, probabilistic models, generative AI and large language models should not be used in critical GMP applications.

Aspect Draft Annex 22 GAMP AI Guide (2025) and GAMP 5 Second Edition (2022)
Nature Regulatory expectation for EU GMP manufacturing Industry good-practice framework for GxP computerised systems
Scope Critical GMP applications only AI-enabled computerised systems across GxP areas
Dynamic models Outside the draft for critical use; a retrained model only as a controlled change Addressed: the Second Edition introduced “dynamic systems” in 2022
Status Draft; consultation closed 7 October 2025, with no final text or application date published as of that source’s last update Published guidance: Second Edition July 2022, AI Guide July 2025

According to Scilife, the July 2025 draft is deliberately restrictive about adaptive, non-repeatable and generative models. EMA has gathered expert input on whether guardrails could support wider use, but no revised position has been published. A layered examination may show that an AI subsystem used for process monitoring, or as an extra layer of control, has no direct impact and so may not count as a critical application.

The Institute of Applied AI calls the GAMP AI Guide the practitioner companion to Annex 22: Annex 22 states the expectation, and the guide describes how to meet it through lifecycle controls that extend GAMP 5. Because Annex 22 is still a draft, we would design critical applications to its static and deterministic boundary now, treat that boundary as likely to move, and use the GAMP framework for everything outside it.

Turning the lifecycle into evidence a reviewer can sign

Each control above only counts once it exists as an artefact a quality owner can read and defend. That means dataset lineage, a test-data independence record, pre-set acceptance criteria, a model version history linked to decisions, and drift monitoring outputs. The 2025 review notes that many organisations lack AI-specific SOPs, validation templates or retraining procedures, which creates uncertainty during audits. TechnoLynx treats this approval-grade evidence as an engineering output. TechnoLynx’s AI engineering for life sciences builds the lineage, evaluation and governance evidence an audit needs. This is not regulatory sign-off or certification.

The question each team still has to answer is where on the maturity map its first release should sit. That choice sets the balance between the operational burden of human control and the technical measures autonomy needs.

FAQ

Is AI a field of machine learning?

It is the other way round. Machine learning is a subdiscipline of AI: an ML system builds a predictive model from training data and uses it to make predictions on new data.

What is the purpose of a validation set?

During model development, the validation set gives an unbiased evaluation of the model while its hyperparameters are tuned. A separate test set, excluded from all training and tuning, evaluates the final model.

What category of software is an AI system under GAMP 5?

GAMP 5’s categories were designed for deterministic software, and ML systems break their assumptions. GAMP 5 Second Edition handles the ML component as a subsystem with its own lifecycle in Appendix D11, within the wider application.

Back See Blogs
arrow icon