Guide 13 min read

AI GAMP: Validating AI Under GAMP 5 and Annex 22

J

November 14, 2026

Key takeaways

  • GAMP 5 Second Edition still applies to AI systems; what changes is the evidence you need (data, model performance, drift).
  • Classify the platform and the model separately, and decide between Category 3 and 4 by whether you configure what shapes the output.
  • Draft EU GMP Annex 22 expects static, deterministic models for critical GMP uses; confirm its current status before relying on wording.
  • Set acceptance criteria before testing, and define drift thresholds and revalidation triggers before go-live.

What does "AI GAMP" actually mean?

When people search for "AI GAMP" they usually mean one question: how do I validate a system that learns, predicts, or generates, using a framework written for software that does the same thing every time? The answer sits in two places. The first is ISPE's GAMP 5: A Risk-Based Approach to Compliant GxP Computerized Systems (Second Edition, 2022). The second is the ISPE GAMP Guide: Artificial Intelligence (ISPE, July 2025), ISPE's guidance for applying the GAMP lifecycle to AI-enabled systems. Obtain it from ispe.org and confirm its scope against the publication itself.

I get this question from quality leaders who already have a working computerized system validation (CSV) program and are nervous about what happens when a vendor says "now with AI." In my view, the nervousness is justified but the fix is smaller than most people expect. You are not throwing out GAMP. You are adding a few things GAMP never had to address, mainly training data, model performance, and drift.

This guide walks through where GAMP 5 still applies, where it runs out, and what the current regulatory documents say you should do about the gap.

Does GAMP 5 still apply to AI systems?

Yes. GAMP 5 Second Edition is built on a risk-based lifecycle, scalable activities, leveraging supplier effort, and critical thinking, and none of that depends on whether the software is deterministic. A machine learning model embedded in a GxP process is still a computerized system, and the regulations that govern computerized systems still apply to it: 21 CFR 211.68(b) for drug manufacturing, 21 CFR Part 11 (specifically 11.10(a) on validation and 11.10(e) on audit trails) for electronic records, and EU GMP Annex 11 in Europe.

What changes is the nature of the evidence. Traditional validation asks whether the system does what the specification says. For a trained model, the specification is partly written by the data, so you also have to ask whether the data was appropriate, whether the model generalizes to the population it will actually see, and whether it keeps performing after go-live.

How do GAMP software categories apply to AI?

GAMP 5 classifies software into Category 1 (infrastructure), Category 3 (non-configured), Category 4 (configured), and Category 5 (custom). Most AI-enabled products do not fit neatly into one box, and I think it is a mistake to force them.

A practical way to think about it: classify the platform and the model separately.

Component Typical GAMP category Why
Cloud hosting, MLOps tooling Category 1 Infrastructure supporting the model
Commercial QMS with a vendor-trained AI feature you cannot modify Category 3 or 4 (see rule below) You configure inputs and settings, you do not own the model
Model you train or fine-tune on your own data Treat as Category 5 (custom) in practice The logic comes from your data, so you own the performance evidence
Custom code wrapping an API to a general-purpose LLM Category 5 Custom application on top of a model you do not control

A working rule for vendor AI features: choose Category 3 if you use the feature as delivered and nothing you set changes what the model outputs. Choose Category 4 if you configure thresholds, prompts, rules, workflows, or input mappings that shape its outputs. This rule is my own practical convention, not GAMP text, so document your rationale in the risk assessment.

The important point is that a vendor's Category 4 label does not transfer responsibility for how the model behaves on your data. If you fine-tune, retrain, or supply the examples that shape outputs, you carry more of the validation burden, regardless of what the software invoice calls it.

What is the ISPE GAMP Guide: Artificial Intelligence?

The 2025 ISPE guide (ISPE, July 2025) is the GAMP-native treatment of AI from the organization that publishes GAMP 5. This article does not reproduce or summarize its contents. If you are building a procedure for AI validation, obtain the guide from ispe.org and work from its text. It is the reference an auditor is most likely to recognize.

Two points I consider most important in practice (my own view, applying the GAMP lifecycle, not quotations from the ISPE guide):

  1. Intended use drives everything. A model that flags documents for a human to review carries a very different risk than a model that dispositions a batch. Document what decision the model influences, and whether a qualified person remains in the loop.
  2. Data is a controlled input. Training, validation, and test datasets need provenance, representativeness checks, and change control, the same way you would treat a critical raw material.

What does the FDA expect for AI used in drug development?

In January 2025 the FDA issued draft guidance titled Considerations for the Use of Artificial Intelligence to Support Regulatory Decision-Making for Drug and Biological Products (docket FDA-2024-D-4689; verify the docket and text on fda.gov and regulations.gov). It lays out a seven-step, risk-based credibility assessment framework. The first steps are defining the question of interest and the context of use, and assessing model risk based on how much the model influences a decision and how serious the consequence of a wrong decision would be.

That guidance is aimed at AI that supports regulatory decisions about safety, effectiveness, or quality, and it states that it does not address AI models used for "operational efficiencies (e.g., internal workflows, resource allocation, drafting/writing a regulatory submission)". Check that wording against the current guidance text. So it will not directly govern every QMS tool. But the logic of context of use plus model risk is the same logic GAMP applies, and I find it a useful way to frame risk conversations with auditors even when the guidance technically does not reach your use case.

For device manufacturers, the FDA finalized its guidance Computer Software Assurance for Production and Quality System Software in September 2025 (confirm the date and text on fda.gov). It encourages assurance effort proportional to the risk that a software failure compromises device safety or quality, and it leans on critical thinking over scripted test volume. The same posture works for AI-enabled quality software.

What does EU GMP Annex 22 say about AI?

In July 2025 the European Commission published a draft of a new Annex 22, Artificial Intelligence, for consultation, alongside a revised Annex 11 and a revised Chapter 4. The draft is notable for how narrow it is. As I read it, Annex 22 applies to machine learning models used in critical GMP applications that have a direct impact on patient safety, product quality, or data integrity, and it expects those models to be static (not learning during use) and deterministic (same input, same output).

Dynamic models that keep learning, and probabilistic models such as generative AI and large language models, are not expected for critical applications. Where they appear in non-critical uses, the draft expects a qualified person to remain responsible for the output.

This section describes the July 2025 draft text. I have not confirmed whether it has since been finalized or revised, so check the European Commission's EudraLex Volume 4 page for the current status before you build procedures around specific wording. The direction is already clear, though: regulators in Europe are asking for fixed, testable behavior wherever the stakes are highest. The draft also expects the intended use to be described in detail, test data to be independent of training data, and acceptance criteria to be defined before testing starts.

How do the main frameworks compare?

Framework Issuer Scope What it asks for
GAMP 5 Second Edition (2022) ISPE Any GxP computerized system Risk-based lifecycle, supplier leverage, critical thinking
GAMP Guide: Artificial Intelligence (2025) ISPE AI/ML in GxP Lifecycle activities for data, models, and operation
FDA draft AI guidance (Jan 2025) FDA AI supporting regulatory decisions on drugs and biologics Seven-step credibility assessment tied to context of use
EU GMP Annex 22 (July 2025 draft; confirm current status) European Commission AI in critical GMP applications Static, deterministic models; defined intended use; independent test data
ISO/IEC 42001:2023 ISO/IEC AI management systems Organizational controls, including AI risk assessment (clause 6.1.2; verify in the standard)
EU AI Act, Regulation (EU) 2024/1689 European Union AI systems placed on the EU market Obligations scaled by risk category

None of these replace each other. GAMP tells you how to run the validation. Annex 22 and the FDA material tell you what regulators will accept as evidence. ISO/IEC 42001 gives you the management system around it.

How do you validate an AI system step by step?

This is the sequence I use when helping a regulated company bring an AI feature under its validation program. It maps to the GAMP lifecycle, with the AI-specific pieces marked.

1. Define the intended use and the decision it touches

Write one paragraph that names the process, the decision, who acts on the output, and what happens if the output is wrong. This is also where you decide whether the use is critical in the Annex 22 sense. If the answer is yes, a generative or continuously learning model is probably the wrong tool.

2. Assess risk

Apply ICH Q9(R1) quality risk management principles to the intended use. Consider severity of a wrong output, how likely it is to be caught before it matters, and how much human review sits between the model and the record. A model suggesting a CAPA category for a reviewer to confirm is a different animal from one auto-closing deviations.

3. Assess the supplier

Under GAMP you can leverage supplier documentation, but for AI the audit questions change. Ask what data the model was trained on, how the vendor tests for performance changes between releases, whether they notify customers of model updates, and whether you can pin a version. A vendor that cannot answer these is telling you something. For related guidance on vendor questions, see our QMS software RFP template.

4. Specify and control the data

Document the source of training, validation, and test data, how it was cleaned, and how you checked that it represents real operating conditions. Test data must be kept separate from training data, otherwise your performance numbers are measuring memory, not skill. Put the datasets under change control.

5. Set acceptance criteria before you test

Pick metrics that fit the use (accuracy, sensitivity, false-negative rate, whatever matters for the decision) and set the thresholds in the protocol first. Setting them after you see results is the AI version of testing into compliance. If you are drafting protocols with AI assistance, our piece on validation and qualification protocol generation using AI QMS tools covers how to keep a human accountable for what gets approved.

6. Test, including the edge cases

Run the model against independent test data and document results against the criteria. Add cases that stress it: unusual inputs, missing fields, out-of-range values, and the kinds of records your operators will actually produce on a bad day. Record what the model does when it is uncertain, because that behavior is part of the intended use.

7. Release with controls

Define how users are trained, what the human review step looks like, and how outputs are recorded. Audit trail expectations under 21 CFR 11.10(e) still apply to the records the system creates or modifies, so confirm the AI output and the human decision are both captured with attribution and timestamps.

8. Monitor performance in operation

A validated model is validated for the data it was tested on. Set up periodic performance review, define what counts as drift, and define the trigger for revalidation. Illustrative examples, to be set by your own risk assessment: review performance monthly or quarterly for higher-risk uses; treat a drop of more than a few percentage points in sensitivity or accuracy against the validated baseline as a trigger for investigation; and trigger revalidation when performance falls below the protocol acceptance criteria, when input data distributions shift materially, or when the vendor releases a new model version. Treat a model retrain, a vendor model update, or a material change in input data as a change that goes through change control, not a quiet background event.

What about generative AI and large language models?

This is where I see the most confusion. Generative models are probabilistic, so the same prompt can produce different outputs. That makes classic test-and-release validation awkward, and it is the reason the draft Annex 22 steers them away from critical applications.

That does not mean they have no place in a quality system. It means the control strategy shifts from proving the model is right to proving the process around it catches when it is wrong. Typical examples are drafting a first version of a document that a qualified person reviews and approves, summarizing a long record for a human who still reads the source, or searching a document library. In each case the human decision is the GxP control and the model is an aid.

It also means data handling matters. Pasting batch records or complaint data into a public chatbot raises confidentiality and data integrity problems that no validation package fixes. I wrote about this in more detail in why ChatGPT is not safe for quality management records.

What do auditors tend to ask about AI?

Based on how the documents above are written, these are the questions I would prepare for:

  • What is the intended use, and is a qualified person accountable for the output?
  • How did you decide the risk level, and where is that documented?
  • Where did the training and test data come from, and how do you know they are representative?
  • Who approved the acceptance criteria, and were they set before testing?
  • What happens when the model is wrong, and how would you know?
  • How do you control model updates, whether yours or the vendor's?

If you can answer those six from your documentation without improvising, you are in better shape than many companies that have far larger validation packages.

Common mistakes with AI and GAMP

Treating the vendor's validation as yours. It does not cover how the model performs on your records, your language, and your equipment.

Over-scoping low-risk uses. Putting an internal search assistant through the same package as a batch disposition model wastes effort and trains people to resent validation. GAMP's scalability principle exists for this reason.

Under-documenting the human step. If a person reviews every output, the record of that review has to exist.

Where does this leave you?

I do not think AI requires a new validation philosophy. It requires you to be honest about which part of the behavior comes from code you wrote or bought and which part comes from data, and to put controls on both. GAMP 5 gives you the lifecycle, the 2025 ISPE AI guide gives you the AI-specific activities, and Annex 22 and the FDA credibility framework tell you what regulators want to see. The harder question for most teams is organizational: who owns the model after go-live, and who notices when it stops being right?

Last updated: 2026-11-01

Frequently Asked Questions

What is AI GAMP?

AI GAMP refers to applying ISPE's GAMP 5 risk-based computerized system validation approach to AI and machine learning systems in GxP environments. The main references are GAMP 5 Second Edition (2022) and the ISPE GAMP Guide: Artificial Intelligence (July 2025), which add lifecycle activities for training data, model performance, and ongoing monitoring.

Does GAMP 5 cover machine learning models?

GAMP 5 Second Edition's risk-based lifecycle applies to any GxP computerized system, including those with machine learning. It does not detail data and model-specific activities, which is why ISPE published the GAMP Guide: Artificial Intelligence in 2025 as a supplement.

What does draft EU GMP Annex 22 say about AI?

The July 2025 consultation draft focuses on machine learning models used in critical GMP applications and expects them to be static and deterministic, with a defined intended use and test data independent of training data. Dynamic and probabilistic models, including generative AI and LLMs, are not expected in critical applications. It is a draft, so confirm current status.

Can generative AI be used in a GxP quality system?

It can be used in supporting roles where a qualified person reviews and approves the output, such as drafting or summarizing. The human review is the GxP control, so it needs to be documented and attributable. Draft Annex 22 steers generative models away from critical GMP applications.

How often should an AI model be revalidated?

There is no fixed interval in the sources. Define drift criteria and periodic performance review based on risk, and treat any retraining, vendor model update, or material change in input data as a change under change control that may trigger revalidation.

J

Jared Clark

Principal Consultant, Certify Consulting

Jared Clark is the founder of Certify Consulting, helping organizations achieve and maintain compliance with international standards and regulatory requirements.