AI Visual Inspection Validation Under FDA CSA and GAMP 5

By Jackson T on October 23, 2026

ai-visual-inspection-validation-under-fda-csa-gamp-5

An AI model that inspects vials or syringes makes GMP decisions on every unit, so it has to be validated like any other GMP computerised system. The guidance has moved quickly. FDA finalised its Computer Software Assurance guidance in September 2025, ISPE published a GAMP guide on AI in July 2025, and the EU consulted on a draft Annex 22 for AI the same year. This guide turns that into a practical validation strategy for AI visual inspection, from qualifying the model to locking versions and watching for drift. See the records it produces in a short validation demo.

AI VALIDATION · PHARMA AND DEVICES

Validate AI Visual Inspection Once, Then Keep It Validated

iFactory Vision Audit Trail and Model Governance keeps every inspection model version-locked in a registry, routes each change through change control and watches live data for drift. Every result carries a Part 11 audit trail that names the exact model version behind it.

Model registry · AVI line 3Locked
Vial cosmetic defect model, 10R vials
Released versionv3.2
Model hasha91f…07c2
Change recordCC-0412 approved
Input driftWithin qualified range
Undecided resultsSent to manual review
Every result stamped with model v3.2
CSA VS CSV VALIDATION

From Paper-Heavy Testing to Risk-Based Assurance

FDA's final guidance, Computer Software Assurance for Production and Quality System Software, was announced in the Federal Register on 24 September 2025. It comes from CDRH and CBER, covers software used in device production and quality systems, and replaces Section 6 of the 2002 General Principles of Software Validation. The final text also makes clear it can apply to AI tools used in those systems. Drug makers are not directly in scope, but the same risk-based logic sits at the heart of GAMP 5 Second Edition. Ask our validation team how it maps to your site.

TRADITIONAL CSV HABITS
  • Same scripted depth for every function
  • Screenshots as proof for each test step
  • Documents written mainly for the auditor
  • Vendor testing repeated in full on site
  • Effort spread evenly, not by patient risk
CSA AND GAMP 5 THINKING
  • Start from intended use and process risk
  • Scripted testing where failure could harm safety
  • Unscripted, scenario and exploratory testing elsewhere
  • System logs and audit trails used as evidence
  • Vendor evidence leveraged after assessment
ISPE GAMP AI GUIDE AND THE WIDER RULEBOOK

Eight Documents That Shape AI Inspection Validation

No single document covers AI visual inspection from end to end. Device rules, drug GMP, pharmacopeia chapters and industry guides each cover a piece, and two of the most relevant EU texts are still drafts. The matrix shows where each one stands and what it asks of an inspection model. Review it against your product portfolio in a strategy session.

Document
Status
What it asks of an AI inspection model
FDA Computer Software Assurance
Final · Sept 2025
Assurance scaled to process risk, with scripted testing for high process risk functions
ISPE GAMP 5 Second Edition
Published · July 2022
Life cycle approach and critical thinking. Appendix D11 covers AI and machine learning
ISPE GAMP Guide: Artificial Intelligence
Published · July 2025
AI system life cycle from concept to retirement, used in parallel with GAMP 5
21 CFR Part 11
In force
Validated systems, access control, secure time-stamped audit trails, e-signatures
EU GMP Annex 11
2011 text in force · revision drafted
Validation, audit trails, change and configuration management, periodic evaluation
EU GMP Annex 22 (AI)
Draft · consulted July–Oct 2025
Static, deterministic models for critical uses, independent test data, drift monitoring
USP <1790>
Official chapter
Automated inspection performance shown against compendial manual inspection
FDA visible particulates guidance
Draft · Dec 2021
Automated systems should meet or surpass human inspection capability
GAMP 5 SECOND EDITION AI

Locked, Adaptive or Generative: Know Which One You Have

Draft Annex 22 draws a clear line. It applies to static models that do not adapt during use and that give identical outputs for identical inputs. It says dynamic models that keep learning, and models with probabilistic outputs, should not be used in critical GMP applications, and it does not apply to generative AI or large language models. A visual inspection model that accepts or rejects units is a critical use. Talk through your model types with our support team.

Locked model
Fits critical inspectionFrozen weights, same output for the same image. Retraining produces a new version that goes through change control.
Adaptive model
Not for critical GMP use in the draftLearns in production, so the validated state keeps moving. Keep learning offline and release as a new locked version.
Generative or LLM
Outside draft Annex 22Not for accept or reject decisions. Non-critical uses need a qualified person to check every output.
Where PCCPs fit

FDA's December 2024 guidance on Predetermined Change Control Plans covers AI-enabled device software functions in marketed medical devices. It is useful context for planned model changes, but it does not cover production or inspection software inside your plant.

RISK BASED ASSURANCE TESTING

Match the Testing Effort to the Risk of Each Function

CSA treats software as high process risk when its failure could cause a quality problem that foreseeably compromises safety. An AI model that rejects or passes injectables sits at the top of that scale. The dashboards around it do not. Splitting an AVI system by function keeps scripted effort where it matters. The tiers below are a typical split, not a rule. Build yours in a risk workshop.

High process risk
Accept or reject decisionScripted testing on an independent challenge set, with documented acceptance criteria
High process risk
Reject gate and audit trailScripted tests that rejected units leave the line and every result is recorded
Not high risk
Trend dashboardsUnscripted or scenario testing, with errors caught by other controls
Not high risk
Labelling toolsExploratory testing plus vendor evidence, as labels are verified by experts

Change Control That Knows Which Model Is Running

Every model version, training set and approval sits in one registry. When someone proposes a retrained model, the system shows what changed, what must be retested and which version is live until QA signs off.

Validation lead and iFactory
Validation leadThe vendor wants to retrain for the new 2R vial. What changes?
iFactoryIt would become v3.3 with 2R images added to training. v3.2 stays live until change record CC-0431 is approved.
Validation leadWhat do we need to retest?
iFactoryThe impact assessment lists a full challenge set run on both vial formats and a fresh comparison with the manual baseline. Results and the new hash go into the change record.
QUALIFYING VISION MODELS

Six Steps From Intended Use to Release

Draft Annex 22 sets out a sequence that suits any regulated AI inspection model, whichever market you sell into. A process expert describes the intended use, the test data stays separate from training data, and acceptance criteria are fixed before testing starts. The tested model then goes under configuration control. Plan each step with our validation team.

1Intended useDefect classes, containers and input variation described by a process SME
2Test dataRepresentative, kept apart from training, labels checked by several experts
3CriteriaMetrics fixed, at least as high as the process being replaced
4Test planPrepared and approved before any test runs
5ExecuteResults, confidence scores and key image features reviewed
6ReleaseModel locked under configuration control and change control
AVI SYSTEM QUALIFICATION

Showing the Model Matches or Beats Manual Inspection

USP <1790> bases the validation of an automated inspection system on comparison with compendial manual inspection. One established way to do this is the Knapp method, first described by Knapp and Kushner in 1980, which compares the probability of rejecting each unit in a characterised test set under manual and automated inspection. FDA's 2021 draft guidance on visible particulates also expects automated systems to meet or surpass human capability. These are the measures worth agreeing up front. Review them in a qualification call.

Detection by defect classRejection rate for each critical, major and minor class against the manual baseline
False reject rateGood units rejected, which drives yield loss and manual re-inspection
Reject zone efficiencyThe Knapp comparison of reject probability on units in the reject zone
Gray zone behaviourHow the model handles borderline units near the detection limit
Undecided rateResults below the confidence threshold, sent to a qualified inspector
Confusion matrixWhich defect classes the model mixes up, from the independent test set
MODEL VERSION CONTROL GMP TEMPLATE

A Change Record for Every Model Version

Draft Annex 22 asks for any change to the model, the system or the process it runs in to be evaluated for retesting. Annex 11 and Part 11 already expect controlled change and system documentation. A model change record should carry enough to rebuild the decision later. Ask our support team for a blank version.

Model and lineVial cosmetic model, AVI line 3
From and to versionv3.2 to v3.3, with model hashes
Reason for changeNew 2R vial format added
Training data snapshotDataset ID and image count
Impact assessmentIntended use, classes and formats affected
Retest scopeChallenge set and manual comparison
ResultsMetrics against fixed criteria
Approval and effective dateQA e-signature, first batch on v3.3
AI MODEL DRIFT MONITORING

Catch Drift Before It Reaches a Batch

A locked model does not change, but the images it sees do. New glass suppliers, a lamp replaced during maintenance or a camera nudged out of position can push inputs outside the range the model was tested on. Draft Annex 22 asks for defined drift metrics and regular checks that inputs stay within the intended use. The example below is an illustration. See live monitoring in a drift demo.

Undecided rate · AVI line 3Illustrative example · alert at 0.8%
Week 10.4%
Week 20.4%
Week 30.5%
Week 40.9%
SignalUndecided rate above alert
Likely causeLamp changed in week 4
ActionDeviation raised, lighting checked
21 CFR PART 11 AI RECORDS

What Part 11 Means for Each Inspection Result

Under Part 11, an AI accept or reject decision held as an electronic record needs the same controls as any other. FDA's CSA guidance also points to system logs and audit trails as good evidence, rather than screenshots. These are the clauses that matter most for model records. Get a sample audit export from our support team.

11.10(a)
Validated systemThe model and software are validated for accuracy, reliability and consistent intended performance.
11.10(e)
Secure audit trailComputer-generated, time-stamped entries that record operator actions without hiding earlier values.
11.10(d) and (g)
Access and authorityOnly authorised people can release a model, change a threshold or override a result.
11.10(k)
Documentation controlModel specs, training records and SOPs held under revision control.
11.50 and 11.70
Signatures linkedE-signatures on model release show name, date and meaning, and stay tied to the record.
Each result
What iFactory stampsTime, unit ID, model version hash, confidence score, decision and any human review.
TURNKEY AI DEPLOYMENT

Inspection AI and Model Governance in One Package

iFactory delivers AI visual inspection with governance built in. A pre-configured NVIDIA AI server ships racked and ready with the model registry, audit trail and drift monitor pre-loaded, so images and records stay on site. You rack it, plug in power and Ethernet, and the AI is live. Scope it for your line with a turnkey quote.

What's Included
  • Pre-configured NVIDIA AI edge server, racked and ready
  • Inspection cameras and lighting for your containers
  • Model registry with version locking and hashes
  • Change control workflow with QA e-signatures
  • Drift, confidence and undecided-rate monitoring
  • Part 11 audit trail for every inspection result
  • 24×7 remote monitoring of models and hardware
Live in 6–12 weeks
Wk 1–4
Install and Define

Hardware installed, intended use and requirements written, risk assessment done by function.

Wk 5–8
Train and Shadow

Model trained, independent test set built, shadow run compared with manual inspection.

Wk 9–12
Qualify and Release

Protocols run, model locked and released under change control, QA team trained.

HOW iFACTORY FITS

Regulated AI That Stays in a Validated State

iFactory keeps the evidence that inspectors and QA ask for in the same place the model runs. Our support team can walk you through a pilot plan.

1
Locks every version. Released models are frozen, hashed and held in a registry.
2
Controls change. Retraining runs through impact assessment, retest and QA approval.
3
Watches for drift. Input and confidence metrics are checked against the qualified range.
4
Records every result. Part 11 audit trails tie each decision to its model version.
1000+
Industrial clients running iFactory
99.9%
Platform uptime for production lines
6-12 wks
From racked server to a released model
FREQUENTLY ASKED QUESTIONS

What Validation and QA Teams Ask About AI Inspection

Is FDA's CSA guidance final, and does it apply to drug manufacturers?
Yes, it is final. FDA announced it in the Federal Register on 24 September 2025. It was issued by CDRH and CBER for software used in device production and quality systems. Drug manufacturers work under 21 CFR 211 and Part 11 instead, but the risk-based approach lines up closely with GAMP 5 Second Edition, so the same thinking carries over.
Can we use a model that keeps learning on the line?
For accept or reject decisions, plan on a locked model. Draft Annex 22 says dynamic models that learn during use should not be used in critical GMP applications. It is still a draft, but it signals where EU inspectors are heading. Keep learning offline and release each retrained model as a new version under change control.
How do we show the AI is at least as good as manual inspection?
Run the model and qualified inspectors on the same characterised test set and compare detection by defect class, false rejects and, where you use it, the Knapp reject zone efficiency. USP <1790> bases automated system validation on this comparison, and draft Annex 22 sets acceptance criteria at least as high as the process being replaced.
What should trigger revalidation?
Any change to the model, the system or the process it runs in should be assessed for retesting. Typical triggers are a retrained model, a new container format, new cameras or lighting, a software patch and a drift alert that points to inputs outside the qualified range.
What does a Part 11 audit trail look like for an AI result?
Each result carries the time, unit or batch ID, model version hash, confidence score and decision. Any human review or override is recorded with who did it and why. Model releases and threshold changes carry electronic signatures, and earlier values are never hidden.
How do we start?
Start with one inspection station and one product family. Write the intended use, split functions by risk, build an independent test set and run the model in shadow mode next to manual inspection. Then qualify, lock and release it. Our support team can plan that pilot with you.

Put Your Inspection AI on a Validated Footing

Lock model versions, control every change, watch for drift and keep Part 11 records for each result. Delivered turnkey and live in 6 to 12 weeks.

Example model release record · v3.2
Intended useCosmetic defects, 10R vials
Test setIndependent, expert-labelled
AcceptanceAt least the manual baseline
StatusLocked, in production
Every result traceable to v3.2

Share This Story, Choose Your Platform!