What GxP Compliance Actually Requires for AI Software in Pharmaceutical Manufacturing

Technical writing support for GxP compliance on AI starts with engineered evidence: scoped pipelines, validation, audit trails and change records.

What GxP Compliance Actually Requires for AI Software in Pharmaceutical Manufacturing
Written by TechnoLynx Published on 21 Apr 2026

For AI software, technical writing support for GxP compliance is mostly not writing in the usual sense. Inspection evidence starts from a risk assessment and covers a documented intended use, verification, acceptance criteria, monitoring and change control. An EMA workshop report records that existing GMP principles on quality risk management, validation, lifecycle management, oversight and outsourced activities remain relevant and applicable to AI systems. AI systems are computerised systems, so the regulated company stays accountable for them even when a third party supplies the model, the platform or the cloud infrastructure.

That puts the hard part somewhere unexpected. The difficulty is getting the engineering to produce records that a quality unit, a validation lead or an inspector can read without a data scientist in the room. Our overview of what GxP compliance requires for AI and ML software covers which rules bite differently on AI than on deterministic code. The question here is narrower: what has to be written down, which engineering source it comes from, and who reads it.

Which parts of an AI pipeline need GxP documentation at all?

Usually less than the company assumes, which is why scoping should come before anyone drafts a document. FDA’s Part 11 scope guidance applies Part 11 when records required by predicate rules are kept electronically instead of on paper, or kept electronically alongside paper and relied on for regulated activities. Predicate rule requirements for validation still apply, and FDA recommends that the decision to validate and its extent rest on a justified, documented risk assessment of how the system could affect product quality, safety and record integrity. The guidance gives a deliberately ordinary example: validation would not be important for a word processor used only to generate SOPs. EU Annex 11 takes a risk-based route as well. It applies risk management across the system lifecycle and ties the extent of validation and data integrity controls to patient safety, data integrity and product quality.

ISPE (2023) describes an ML component as a pipeline of stages, such as input preparation and output filtering, built around one or more central models. In the same article, the minimum code that needs porting to the runtime environment is the inference portion, with pipeline performance evaluation implemented in full alongside it. ISPE’s worked example is a dental caries detection product released as software as a medical device under ISO 13485. Its inference module was ported from TensorFlow to ONNX with runtime code in C#, leaving out training and hyperparameter tuning. Those functions were then excluded from the software maintenance and performance validation processes.

Excluding training is something you decide and justify, not a default. ISPE says that, at a minimum, the process should specify and document how verification of the ML subsystem will be performed. This scoping decision comes first, with its risk rationale, because every later document inherits its boundary. Which systems sit outside GxP altogether is set out in our explainer on GxP validation for pharma software.

Technical writing support for GxP compliance starts from engineering records

PIC/S guide PI 041-1 (2021) states that validation alone does not guarantee that records are adequately protected. It says validation should be backed by administrative and physical controls and by user training. The same guide notes that direct controls usually take the form of written policies and procedures. So GxP evidence for an AI system comes in two kinds: what the system records about itself, and what the organisation commits to in writing. An auditor needs the two to agree.

Control Evidence the system itself must produce Procedural evidence the organisation writes
Access control Individual logins, least-privilege roles and a log of successful and failed login attempts Access granting records; admin rights kept away from people with a direct interest in the data
Audit trail An automatic, locked, time-stamped record of who changed what, when and why A documented audit trail review procedure saying who reviews, what and when
Validation Test results against acceptance criteria set in advance; under draft Annex 22, on independent test data A validation plan and user requirements traceable through the lifecycle
Change control Change and configuration management covering code, data and models A defined change procedure and a justified decision on whether to retest
Data integrity Metadata and processing parameters sufficient to reconstruct each result; verified archival copies Data governance covering ownership, staff training and senior management accountability
Monitoring Performance monitoring records Periodic review of the validated state, plus CAPA for AI-specific incidents

Validation evidence for an AI model

ISPE’s GAMP testing guide describes testing as the part of computerised system validation that gives objective evidence the system is fit for its intended use. Annex 11 asks for user requirements that rest on documented risk assessment and stay traceable throughout the lifecycle. ISPE adds that the ML subsystem’s specification includes input and output data formats and the definition of performance metrics.

Draft Annex 22 asks for technical or procedural controls so that test data is never used during development, training or validation of the model. ISPE notes that some ML systems have stochastic elements and give different results for identical inputs. Validation therefore needs a sufficiently large data set and summary performance measures that hold up under small variations between runs. MHRA’s GxP data integrity guidance (2018) also says vendor-supplied validation data is not acceptable on its own, taken apart from the system’s configuration and the user’s intended use.

The engineering choice that pays off most is building the performance evaluation into the build. In ISPE’s example, the code that validates runtime inference performance was moved into the build and test pipeline, so model performance was tested automatically during the code build cycle. The validation report then becomes something the pipeline regenerates on each release, instead of a document written once and allowed to drift away from the deployed model. The general lifecycle and testing structure this fits into is covered in our guide to computer system validation.

What an audit trail for an AI system has to record

Predicate rules govern audit trails even where FDA uses enforcement discretion on Part 11. FDA’s Part 11 guidance says firms must still meet predicate rule requirements on date, time and sequence of events, and changes must not obscure earlier entries. FDA recommends basing audit trail decisions on predicate rules, a documented risk assessment and the potential effect on product quality and record integrity. It calls audit trails particularly appropriate where users create, modify or delete regulated records in normal operation. The draft revised Annex 11 is more specific. The trail should capture the user and their role, what changed (including old and new values), the date and time with time zone, and a reason for the change that the system prompts for. MHRA describes the same content as the “who, what, when and why” of an action, recorded without obscuring or overwriting the original.

For an AI system, the harder question is which actions count as GMP-relevant. MHRA expects audit trails and retained records to allow every data processing activity to be reconstructed, and repeated processing with modified parameters must be visible. Applied to an ML pipeline, we read that as logging the model version, preprocessing configuration and decision threshold behind each output, not only user actions. Participants at the EMA workshop listed recording of AI outputs and of human modifications to them as potential evidence of human oversight. MHRA says users should not be able to amend or switch off a required audit trail.

Change control records when the model changes

Draft Annex 22 asks for the tested model, the system it runs in and the process it automates to go under change control before deployment. Every later change is evaluated to decide whether the model needs retesting, and a decision not to retest must be fully justified. The draft revised Annex 11 requires re-qualification and validation for significant changes that could affect product quality, patient safety or data integrity. ISPE extends change and configuration management to everything that makes up the ML system: the code, the data and the models.

In change control, the justification is the document that matters. We would generate change records from the version control history and the evaluation runs the change actually triggered, so the stated reasoning and the technical facts cannot drift apart. How a validated model stays compliant as it retrains or drifts deserves a full treatment of its own, and gets one in the overview of GxP requirements for AI and ML software.

What will an inspector ask to see for an AI system?

The EMA workshop report treats the risk assessment as the starting point. It should describe the risk scenarios, the controls mapped to each scenario and the evidence from verification and monitoring. Monitoring history, how the firm responded to signals and a documented state of control then become the inspection evidence. The same report records that industry expectations would include an inspectable evidence package and an AI validation package aligned to risk and intended use. That report records workshop discussion on draft Annex 22, not final requirements. Even so, the list below is a sound diagnostic for an evidence pack today.

  • Intended use: a description of the task and the input data, including known limits and possible bias, owned by a process subject-matter expert and approved before acceptance testing.
  • Risk assessment: the risk scenarios, the controls mapped to them and the evidence from verification and monitoring.
  • Validation plan and acceptance criteria: set in advance and at least as demanding as the performance of the process the model replaces.
  • Test results: produced on test data kept independent of development, training and validation.
  • Traceability: user requirements kept traceable throughout the lifecycle.
  • Change records: change control records and deviations from the validation, kept as part of the validation documentation.
  • Monitoring records: ongoing performance monitoring, checks that inputs stay within the intended use, and records of human review where a person makes the final decision and testing was reduced.
  • Supplier documentation: reviewed by the regulated user, whether the model was trained in-house or provided by a supplier.

In its draft guidance, FDA sets out a risk-based framework for establishing an AI model’s credibility for a particular context of use, meaning how the model is used to answer a specific question.

Accountability does not transfer with a supplied model

When a vendor, service provider or internal IT department provides qualification and validation documentation, the draft revised Annex 11 still requires the regulated user to review it and authorise its use. The user must also judge whether it covers the version actually implemented. One presenter at the EMA workshop argued that the key is not who owns the model but access to enough evidence to measure how it works. If a third-party model or API cannot provide the outputs, logs or rationale needed for control, the manufacturer cannot justify the system. For cloud services, MHRA expects the technical agreement to give timely access to data, metadata and audit trails, and to allow restoration of the system to its validated state. In practice, this means evidence access belongs in the supplier contract before model selection is settled, not after.

Can AI draft the GxP documents for us?

It can, provided the quality unit reviews and clears what it produces. In a warning letter, FDA recorded that a manufacturer had used AI agents to create drug product specifications, procedures and master production or control records. FDA stated that a firm using AI to help create documents must review them for accuracy and actual CGMP compliance, and that failing to do so violates 21 CFR 211.22(c). The same letter found that the firm had not carried out process validation before distributing products, and recorded that overreliance on AI was documented during the inspection. FDA concluded that any AI output or recommendation used for CGMP activities must be reviewed and cleared by an authorised human representative of the firm’s quality unit.

That firm had wider failures, including releasing batches without microbiological testing. The principle carries over all the same. A GxP document gets its authority from an accountable reviewer, not from whoever or whatever wrote it.

Annex 22 and the revised Annex 11 are still drafts

The revised Annex 11 brings stronger lifecycle, data integrity, audit trail and supplier oversight requirements, alongside a new Annex 22 on AI. Annex 22 sets requirements for selecting, training and validating models and for overseeing them through change control, performance monitoring and human review. As drafted, Annex 22 applies where AI models are used in critical applications with direct impact on patient safety, product quality or data integrity. It covers only static models with deterministic output. It says dynamic models that keep learning in use, and models with probabilistic output, should not be used in critical GMP applications. A secondary summary reads the draft as extending the same exclusion to generative AI and large language models. For non-critical uses, it says qualified people should stay responsible for checking that the output suits the intended use.

The EMA workshop report records that the drafting group discussed allowing dynamic, probabilistic and generative models in GMP applications, provided they are backed by a fully documented, risk-based control strategy. Because of that uncertainty, we would write evidence that works under either outcome: documented intended use, mapped controls and monitoring history are needed in both versions. The ISPE GAMP Guide: Artificial Intelligence applies GAMP 5 (Second Edition) to AI and expands on the considerations in its Appendix D11. How that guide fits into an existing GxP programme is covered in the GxP requirements overview, and the wider rulebook in our explainer on GxP regulations for AI and software.

Who can build the GxP evidence for our AI system?

TechnoLynx builds the engineering side of GxP evidence for AI systems as part of its AI engineering for life sciences and healthcare. That means the evidence a buyer, auditor or quality owner can read and sign against: validation and evaluation results, traceability and lineage for production decisions, and evidence packs aligned to GxP references. We treat that evidence as an engineering output produced by the system, not as a policy document written afterwards. For a team deciding between in-house and outside help, the deciding factor is whether the pipeline already emits versioned evaluation runs and complete audit records. If it does, assembling the pack is mainly a writing and quality-review task. If it does not, the work is engineering first and writing second.

The limits are firm. The work is not policy advice or certification. It produces evidence packs and traceability as engineering outputs. If the gap is purely procedural, such as drafting SOPs for a system that already logs and versions correctly, a GxP technical writer or a validation consultancy is the better fit.

The documentation decision that comes before any document

The choice that most shapes the paperwork is made before anyone writes: whether a model’s output is itself a GMP record, feeds a decision that produces one, or sits outside GxP entirely. FDA’s guidance ties validation and audit trail decisions to predicate rules and to a documented risk assessment. Get that classification wrong and the team either documents a scheduling model as if it released batches, or finds during an inspection that a “decision support” tool had been quietly acting as a release gate.

Back See Blogs
arrow icon