Annex 22: How Does AI Become Audit-Ready in GMP Inspection?
AI detects hairline cracks, code errors and surface deviations that conventional inspection rules overlook. In regulated production, however, it is not only what a model detects that counts. What counts is whether you can demonstrate in an audit why it made a given decision.
With the draft of EU GMP Annex 22, artificial intelligence in pharmaceutical manufacturing is given its own regulatory framework for the first time. For pharmaceutical manufacturers this means: anyone planning AI-based inline inspection today should build it so that it remains qualifiable tomorrow.
This is why INTREX develops AI-based inspection systems in line with the Annex 22 draft from the very beginning. Statically versioned models, separate training and test data, predefined acceptance criteria and complete validation documentation. AI as a tool. Software as the backbone. Process reliability as the goal.

What does Annex 22 regulate, and why does it affect your inspection processes today?
Annex 22 is a new annex to the EU GMP Guide (EudraLex Volume 4). It describes the requirements AI models must meet when they are used in the manufacture of medicinal products and active substances. This covers applications with a direct impact on patient safety, product quality or data integrity.
This puts Annex 22 exactly where AI delivers the greatest benefit in production: the automatic inspection decision. Whether a vial with a micro-crack is rejected, whether a code is readable or whether a label is positioned correctly: as soon as an AI model makes that decision, it becomes GMP-relevant.
- AIReject vial with micro-crack?GMP-relevant
- AICode readable?GMP-relevant
- AILabel correct?GMP-relevant
Which AI applications does the draft cover?
The draft draws a clear line. For critical applications, only static models with a deterministic output are intended. These are models that are frozen after training and always give the same answer to the same input.
For industrial image processing this is good news. Trained deep learning models for defect and pattern recognition fit this framework, provided they are properly developed, tested and documented.
- dynamic models that keep learning during operation
- probabilistic models with non-reproducible output
- generative AI and large language models (LLMs) in critical applications
Where does Annex 22 stand in November 2026?
In July 2025, the European Commission put the draft out for consultation together with the revisions of Annex 11 and Chapter 4. The comment period ended on 7 October 2025. The industry is known to have commented on the draft extensively, with more than 1,300 submissions.
In summer 2026 an EMA expert workshop followed, and its report was published in October 2026. Among other things, it discusses whether the scope will be extended under a strictly risk-based control strategy. There is currently no final version, no entry into force and no transition period. Until then, Annex 11 applies in its existing form.
- July 2025Draft for consultation, together with Annex 11 and Chapter 4
- 7 October 2025End of the comment period: more than 1,300 submissions
- Summer 2026EMA expert workshop
- October 2026Workshop report published
- OpenFinal version, entry into force, transition periods
How do Annex 11 and Annex 22 fit together?
Annex 22 does not replace Annex 11, it complements it. Every computerised inspection system in GMP production falls under Annex 11: specification, risk assessment, data integrity, audit trail, access rights, change control.
Annex 22 adds a second level on top as soon as an AI model makes GMP-critical decisions. System validation therefore remains mandatory. In addition, you must demonstrate that the model itself is suitable, tested and controlled.
What requirements does Annex 22 place on AI-based inspection systems?
The draft follows a risk-based lifecycle approach, from defining the intended use through testing to operation. For inspection systems on the line, six points are decisive above all:
- Intended Use
Task, input data, operating limits and potential bias are described in detail and approved before testing.
- Acceptance criteria
Test metrics and limits are defined before testing begins. The model must be at least as good as the process it replaces, such as manual visual inspection.
- Independent test data
Test data is representative, covers the relevant defect types and remains strictly separate from training and development.
- Explainability and confidence
For critical applications, it must be traceable which features supported a decision. Every inspection decision receives a confidence score; uncertain results can be flagged as “undecided”.
- Human-in-the-loop
Where people are part of the control, responsibility, training and performance are described and monitored.
- Operation and change control
Model, preprocessing and system configuration are under configuration control. Changes trigger a justified reassessment, and model performance is monitored during operation.
Anyone reading these points will recognise that Annex 22 does not demand new technology. It demands discipline in development, data and documentation.This is exactly where many AI projects fail: convincing as a demo, but failing the audit.
Why is a high overall detection rate not enough?
A detection rate of 98 percent sounds convincing. But it says little about how reliably a model detects individual defect types. A fine hairline crack on the vial neck is rarer than a gross break, and for exactly this reason it is often underrepresented in the test data set. If detection for this subgroup drops significantly, it disappears in the overall rate.
This is where Annex 22 comes in: test data should be representative and stratified, i.e. reflect all relevant subgroups. In practice, this means collecting, classifying and evaluating defect types separately and systematically. Only then does a good number become robust evidence.
Why should you not wait for the final version?
Because inspection systems run for a long time. An inline inspection integrated into a line today will still be in operation when Annex 22 is long in force. So far the draft provides no transition period for AI systems already in use. Anyone who then has to prove how a model was trained, tested and released needs this evidence from the development phase. It can hardly be generated retroactively.
On top of that, under current GMP law inspectors may already question how an AI-based inspection decision comes about.
A model that works as a black box is an audit risk, regardless of the date it comes into force.
Anyone who plans along the draft now gains in three ways:
- 1 Planning certainty
The validation strategy is in place before the system runs on the line.
- 2 Investment protection
A newly installed system should not have to be requalified when Annex 22 comes into force.
- 3 Process reliability
Reproducible, documented inspection decisions reduce scrap, downtime and recall risk.
What does AI-based inspection offer compared with manual visual inspection?
Manual visual inspection is still the reference process in many plants. It is based on experience, but it is not free from fatigue. At high cycle rates, with small defects and reflective glass surfaces, the human eye reaches its limits. Results depend on the shift, the person and the form of the day.
An AI-based inline inspection assesses every container against the same criteria, in every cycle, from several perspectives. Every decision is logged.
- Based on experience, but not free from fatigue
- Limits at high cycle rates, small defects, reflective glass
- Depends on shift, person and form of the day
- Every container against the same criteria
- In every cycle, from several perspectives
- Every decision is logged
This is exactly the comparison Annex 22 demands: the model must demonstrably be at least as good as the process it replaces. Anyone who provides this evidence properly gains not only compliance but measurable inspection quality.
Wie setzt INTREX Annex 22 in der Inline-Prüfung um?
INTREX entwickelt Prüfsysteme nach EU-GMP, GAMP 5 und Annex 11. Für KI-gestützte Bildverarbeitung kommen die Anforderungen des Annex-22-Entwurfs hinzu – nicht als nachträgliche Dokumentationsschicht, sondern als Grundlage der Systemarchitektur.
Was heißt „qualifizierbare KI“ in der Praxis?
Bei INTREX folgen KI-gestützte Prüfsysteme festen Prinzipien:
- statische, versionierte Modelle – kein Weiterlernen im laufenden Betrieb
- strikt getrennte Trainings- und Testdaten
- Akzeptanzkriterien, die vor dem Test festgelegt werden
- protokollierte Konfidenzwerte für jede Prüfentscheidung
- nachvollziehbare Merkmalsgewichtung statt Black Box
- Change Control mit Revalidierungsbewertung bei Änderungen an Modell oder Produkt
So bleibt die Prüfentscheidung reproduzierbar, erklärbar und auditfähig.
Welche Validierungsdokumentation erhalten Sie?
Validierung ist bei INTREX kein Anhang zum Projekt, sondern Teil davon. Auf Basis Ihrer Anwenderanforderungen (URS) erstellen wir DQ-, IQ-, OQ- und PQ-Protokolle, umgesetzt gemäß Annex 11. Für KI-Systeme ergänzen wir die Anforderungen des Annex-22-Entwurfs – von der Modellversion bis zu den Akzeptanzkriterien.
Das Ergebnis: eine Dokumentation, die Ihre Qualitätssicherung im Audit vertreten kann.
Wo setzt INTREX KI konkret ein?
KI ist bei INTREX kein Showbegriff. Sie kommt dort zum Einsatz, wo klassische Prüfregeln an Grenzen stoßen: bei feinen Rissen, schwierigen Oberflächen, variierenden Merkmalen oder komplexen Erkennungssituationen.
- Annex-22-Entwurf Glasbruchkontrolle GBD 650
KI-gestützte Erkennung von Mikrorissen, Spannungsrissen und Oberflächenfehlern an Vials, Ampullen und Fertigspritzen – entwickelt in Anlehnung an den Annex-22-Entwurf.
VialsAmpullenFertigspritzen - Software KUPvision-Software
Die Bildverarbeitungsumgebung, in der Deep-Learning-Modelle, Prüflogik und Protokollierung zusammenlaufen.
- Inline-Prüfung Vision-Systeme und Code-Lesung
Kamerabasierte Inline-Prüfung, in die wir auch Industriekameras von Cognex integrieren.
Entscheidend bleibt die industrielle Einbindung. KI muss in Softwarelogik, Prüfprozess, Dokumentation und Linienintegration eingebettet sein. Sonst bleibt sie ein Demo-Effekt.
Wie läuft ein Prüfprojekt mit INTREX ab?
- Prüfaufgabe analysieren
Produkt, Fehlerbilder, Takt, Bauraum und regulatorische Anforderungen werden gemeinsam aufgenommen.
- Intended Use und URS festlegen
Einsatzzweck, Einsatzgrenzen und Akzeptanzkriterien werden definiert und freigegeben, bevor getestet wird.
- System entwickeln
Engineering, Bildverarbeitung, Beleuchtung und Softwarelogik werden auf die Prüfaufgabe ausgelegt; das KI-Modell wird trainiert und versioniert.
- Unabhängig testen
Das eingefrorene Modell wird mit getrennten, repräsentativen Testdaten gegen die Akzeptanzkriterien geprüft.
- Integrieren und qualifizieren
Das System wird in die bestehende Linie integriert und mit DQ-, IQ-, OQ- und PQ-Protokollen qualifiziert.
- Sicher betreiben
Change Control, Fernwartung und Ersatzteilversorgung begleiten das System über seinen gesamten Lebenszyklus.
Was unterscheidet INTREX von Standardanbietern?
Große Anbieter bringen Produktkataloge mit. INTREX beginnt bei der Prüfaufgabe. Wir verbinden Engineering, industrielle Bildverarbeitung, eigene Softwareentwicklung, KI-gestützte Mustererkennung und Pharma-Validierung aus einer Hand.
Die Linie gibt die Regeln vor: Takt, Bauraum, Produktführung, Schnittstellen und Dokumentationspflicht. Deshalb entstehen unsere Prüfsysteme aus Ihrer Produktionsrealität heraus – mit über 30 Jahren Erfahrung, direkter Expertennähe und kurzen Wegen.
What questions do pharmaceutical manufacturers ask about Annex 22?
Is Annex 22 already binding?
No. Annex 22 is currently available as a draft; the consultation has closed. There is no date yet for entry into force. Until then, Annex 11 applies to computerised systems, and therefore also to AI-based inspection systems.
Does every AI application in production fall under Annex 22?
The draft addresses AI models in critical GMP applications, i.e. those with a direct impact on patient safety, product quality or data integrity. An automatic reject decision in inline inspection typically falls into this category.
May generative AI be used in critical GMP applications?
Not under the current draft. Generative AI and large language models are excluded for critical applications. Whether this changes in the final version remains open. This is why INTREX relies on static, trained models for inspection.
What detection rate does Annex 22 require?
The draft does not specify a blanket percentage. The model must at least match the performance of the process it replaces. The specific acceptance criteria are defined and documented for each inspection task before testing.
Will an AI inspection have to be requalified later?
That depends on how it was developed. If the system was built and documented in line with the draft from the outset, the aim is to avoid requalification when the annex enters into force. This is exactly what INTREX designs its inspection systems for.
What does Annex 22 have to do with data integrity?
A great deal. An AI model is only as reliable as the data it was trained and tested with. Annex 22 therefore transfers the established data integrity principles to training and test data, model versions and inspection results. Every decision must be logged completely, traceably and in a tamper-proof manner.
Does Annex 22 also apply to AI inspection systems already in operation?
The draft does not currently provide a transition period for existing systems. Operators should therefore check whether the intended use, test data and acceptance criteria are documented for their AI-based inspections. For new projects, it is advisable to maintain this evidence from the start.
How do you start your Annex 22-ready inspection project?
It does not begin with the camera, but with your inspection task. Which product, which defect types, which cycle rate, which documentation requirements? Together with you, we use this to develop an inspection concept that works technically and stands up regulatorily.
Whether a new project or an extension of an existing line: we advise you on which inspection steps are suited to AI, where conventional machine vision is the better choice, and how the two work together in a validatable way. The result is a solution that fits your product, your line and your quality system.
Talk to our experts about your critical inspection task, from glass breakage detection to code verification. We will show you how AI-based inline inspection becomes validatable on your line.