AI in pharmaceutics is applied at four points in a medicine’s life: formulation and stability modelling, process design and control on the manufacturing line, in-process quality checks such as vision inspection, and review of the documents each batch produces. The model may predict, classify or draft, but the company stays responsible for it being fit for purpose, and the decision to release a batch stays with a quality unit that cannot delegate it. Regulators expect evidence built around each system: a defined intended use, acceptance criteria tied to the process it replaces, a complete audit trail and monitoring for drift.
A map of AI in pharmaceutics across the product lifecycle
The table below sets out where models sit, what they do and who keeps the decision. It covers the regulated path from formulation to release. Discovery-stage modelling counts as low regulatory impact where poor performance affects only the developer, and AI in pharma R&D covers it separately.
| Stage | What AI does | Who decides | Main evidence expectation |
|---|---|---|---|
| Formulation and biologics design | Predicts properties, generates candidate microstructures, screens developability | Developers, who validate with in vitro, in vivo and in silico elements | GxP protocols in a regulatory filing context |
| Process design and scale-up | Finds processing parameters from development data | Process development and QA | Quality risk management under ICH Q8, Q9 and Q10 |
| Advanced process control | Predicts process progression from real-time sensor data and adjusts parameters | Control strategy owned through change control | Validation standards for control models, lifecycle plan |
| Vision QC (packaging, labels, vials) | Classifies images against quality attributes | Quality unit | Draft Annex 22 test metrics and feature attribution |
| Deviation and complaint trending | Clusters text to find recurring problems and prioritise improvement areas | Quality unit, which keeps deviation classification | Documented, risk-based data review |
| Batch record review | Flags issues in executed records as advisory comments | Named reviewer in the quality unit | Append-only log of every AI call and human action |
| Product information drafting | Drafts, translates or reviews text | Close human supervision and quality review before submission | Factual and syntactic checks on all generated text |
The pattern in the table is the point. The regulatory weight of a model’s output depends on the lifecycle phase and the weight of evidence it carries in its setting.
Formulation modelling: useful evidence, real limits
A published study describes a generative AI method that synthesises digital tablet and implant structures from images of exemplar products. It predicted a percolation threshold of 4.2% weight of microcrystalline cellulose, and its synthesised structures matched real samples on particle size distribution and transport properties. The authors claim this kind of tool could help with the FDA’s microstructure (Q3) sameness assessment by explaining why two products differ.
The same authors state the limits plainly. An in silico optimised microstructure may exist physically yet have no viable route through API synthesis, particle processing and manufacturing, and decision makers need to know that a generated optimum can be impractical or expensive to realise. The model can also only extrapolate within the variation present in its training images. Validation for a regulatory filing is non-trivial and may require GxP protocols that combine in vitro, in vivo and in silico elements.
Biologics formulation faces a data problem as well. A 2023 review of machine learning in biopharmaceutical manufacturing notes that a novel product may have only one or two manufacturing runs, which leaves far fewer samples than data dimensions. The same review notes that early in silico developability frameworks use only sequence or structure inputs without formulation conditions, and cites Fang (2020) that such liability predictors are not yet fit for practical use. We would treat a formulation model as a way to narrow the experimental programme, not as a replacement for it, until the confirmatory experiments are on file.
On the manufacturing line: control, inspection and deviation trends
The FDA’s discussion paper on AI in drug manufacturing describes uses including the following. Advanced process control combines process understanding with AI and real-time sensor data, and several manufacturers have already reported it. Vision-based inspection checks packaging, labels and glass vials. Text analytics on deviation reports and complaints groups recurring problems for root-cause work. Models can also support real-time release testing or predict in-process quality attributes.
A 2025 Scientific Reports study reported that its AI-powered quality-by-design framework held predictive accuracy of R² >0.91 across both simulated and pilot-scale production data. Recommended corrective actions cut out-of-specification tablet batches by about 18% over three production cycles, and in the same framework an AI-assisted control strategy on a sterile injectable line reduced batch rejections by 12%. Both figures come from the same authors’ framework, validated on pilot-scale data gathered with industrial partners, so they show what is possible, not what every line should expect. Which of these uses are proven in routine production, and where the return shows up, is covered in our review of AI use cases already proven in pharma manufacturing.
One boundary is worth stating. As of the 2023 review, no published study had deployed automated, adaptive machine learning for real-time monitoring and control of biopharmaceutical processes, which the authors put down to process complexity and strict regulation.
Which steps can AI take over, and which need a named person to sign?
AI can take over finding, recomputing and flagging issues in a record. It cannot take over the decisions GMP assigns to the quality unit. Under GMP, reviewing executed records and deciding what happens to each batch are quality unit duties that cannot be delegated, and a computer system’s output must be checked to a degree that matches its complexity and reliability. The draft Annex 22 foresees continuous oversight of AI systems, including procedures for human review where necessary.
The FDA’s 2025 draft guidance shows how a human check such as release testing lowers a model’s influence. In its example, an AI model measures vial fill volume. Volume is a critical quality attribute, so the decision consequence is high. Release testing still measures fill volume on a representative sample from each batch, though, so the model’s influence is low and its overall risk is medium.
For generated text, the European Medicines Agency’s reflection paper is explicit. AI used to draft, translate or review product information should be used under close human supervision, because generative models produce plausible but wrong or incomplete output, and all generated text needs quality review before submission. The FDA draft guidance’s credibility framework excludes uses such as drafting a regulatory submission that do not affect patient safety, drug quality or study reliability. That exclusion places such drafting outside the guidance’s scope.
Batch record review with an LLM: a measured example
A published case of documentation automation with a human final decision is Enveda’s CMC Document Processor (CDP), a language-model system that quality-checks executed batch records. On four executed batch records from one clinical campaign (1,061 scanned, largely handwritten pages), human reviewers raised 11 distinct actionable issues. CDP raised all 11 in at least one run, and no comment cited content absent from the record.
The time saving was measured from session logs. CDP processing plus a quality check with its comments in hand took 166 minutes, against 1,553 minutes for unaided manual review, a 9.4-fold reduction. Enveda attributes the saving to errors being presented in advance, not to a lower standard of check.
The design matters more than the headline number. CDP posts findings as comments and proposes an advisory outcome; a named person, working under their own account, decides on every comment and takes every consequential action, including releasing a batch. Review rules are written, versioned and agreed with the functions that own each document type, with the quality unit having the final say, so the same entry is treated the same way on every record. When a page is not read, CDP says which page and why.
The limits are stated too. Each run produced one misread of an existing entry. Most comments from both humans and CDP needed no action: 82% of the human reviewers’ comments and 79% of CDP’s. In the study CDP added to a human review and did not replace it.
What should a GxP audit trail capture when an AI model is involved?
An audit trail is a secure, computer-generated, time-stamped record that lets anyone reconstruct the creation, modification or deletion of an electronic record. The MHRA’s 2018 data integrity guidance says an audit trail lets the “who, what, when and why” of each action be reconstructed without obscuring the original. The draft revised Annex 11 (July 2025) makes the fields concrete: the user and their role, what changed including the old and new values, the date and time with time zone, and a reason the system prompts for automatically. Entries must be made at the time of the event, not at the end of a process.
The same draft expects audit trail review before batch release, unless a later review can be justified on risk. After release, data and audit trails must be protected from change for the whole retention period. Shared logins and generic accounts should not be used on systems that generate or store GxP data, and changes to data processing parameters should stay visible so they are not manipulated towards a more desirable result.
CDP’s design shows one way to apply the same discipline to an AI component: every model call is logged with the model used, the instructions, the response and token use, in an append-only log, so that a review can be reconstructed from what the system received through to what a person decided. Cloud-hosted models add a complication. The FDA notes that interactions between cloud applications and process controls can make data traceability harder to establish, and the MHRA expects contracts to guarantee access to data, metadata and audit trails on request.
Draft Annex 22 sets the bar for AI in critical GMP steps
The draft Annex 22, published for consultation in July 2025, applies to machine learning models used in critical GMP applications with a direct impact on patient safety, product quality or data integrity. It asks for four things an engineering team can plan for:
- Intended use, described from deep process knowledge, including the full input sample space with common and rare variations, known limitations and possible biased inputs, approved by a process subject matter expert before acceptance testing.
- Test metrics that fit the task, such as a confusion matrix, sensitivity, specificity, precision or F1 score for an accept/reject classifier.
- Acceptance criteria at least as high as the performance of the process the model replaces, which means that baseline must be known.
- Explainability during testing, recording which features drove a decision, using feature attribution such as SHAP or LIME, or heat maps.
If nobody has measured how often the current manual inspection misses a defect, there is no number for the model to beat, so we would measure the human baseline before training anything. Documentation must also be reviewed by the regulated user whether the model was built in-house or supplied by a vendor.
Model risk, context of use and the credibility plan
The FDA’s 2025 draft guidance sets out a risk-based credibility framework. Credibility means trust in a model’s performance for a specific context of use, built up through collected evidence. The steps run in order: define the question of interest, define the context of use (what is modelled, how outputs are used and what other evidence sits alongside), assess model risk, write a credibility assessment plan, and report the results.
Model risk combines two factors: model influence, meaning how much the model’s output weighs against other evidence, and decision consequence, meaning how bad an adverse outcome from a wrong decision would be. The guidance stresses that this is the risk of the output leading to a wrong decision, not risk intrinsic to the model. The stringency of acceptance criteria, the documentation and the level of oversight then scale with that risk.
Credibility work continues after deployment through life cycle maintenance. The guidance expects model performance to be monitored on an ongoing basis, with detailed lifecycle plans covering metrics, monitoring frequency and retest triggers available for review in the site’s pharmaceutical quality system. The EMA reflection paper asks for drift detection against clearly defined thresholds, possibly through routine manual classification of sampled data. For all models, especially those with no human in the loop, it asks for a risk management plan that defines failure modes and how the model is suspended or decommissioned.
A model is validated on a stack, not in the abstract
The EMA reflection paper states that for high patient risk or high regulatory impact, all non-trivial changes to the software and hardware stack supporting a model, including key dependencies, require re-evaluation of system performance. We would treat a GPU driver, CUDA, PyTorch, ONNX Runtime or TensorRT upgrade under a validated model in such a high-risk use as a non-trivial stack change that needs re-evaluation.
Continuous learning challenges the current change-control framework. The FDA notes that manufacturing models are today developed, validated, implemented and updated through change control, while continuously learning models evolve as new data arrives, which challenges assessment and oversight. Open questions remain about when a model counts as an established condition and which model changes need regulatory notification. In late-stage clinical trials the EMA goes further: incremental learning is not accepted, and models must be frozen and documented before unblinding.
A model registry is one published way to handle versioning. The 2025 Scientific Reports framework tagged each retrained model version in MLflow with batch identifiers, dataset metadata and validation scores, and tested rollbacks to previous stable models under simulated disturbances.
Checklist: the evidence an inspector can ask to see
For an AI model in a critical GMP step, these are the artefacts the texts above point to:
- A context-of-use and intended-use statement, approved by a process expert, covering the input space and known limits.
- A model risk assessment that records influence, consequence and the mitigations that lower influence.
- A measured baseline for the process being replaced, and acceptance criteria at least that high.
- Test results on data independent of training, with metrics suited to the task.
- Feature attribution records for test decisions.
- Traceable records of data sources and every processing step.
- Software quality procedures and tracked version changes, including the stack under the model.
- An audit trail with user, old and new value, time and reason, reviewed before batch release.
- A lifecycle maintenance plan with drift thresholds and retest triggers.
- Supplier documentation reviewed and authorised by the regulated user.
ISPE’s GAMP Guide: Artificial Intelligence is a framework for AI in GxP-regulated areas, and it builds on GAMP 5 and draws on standards such as ISO/IEC 42001:2023.
Who can build approval-grade evidence for a pharma AI system?
TechnoLynx builds the engineering evidence a regulated AI system has to carry: evaluation and test results against defined acceptance criteria, lineage and traceability for production decisions, and evidence packs mapped to published references such as GxP, written so that a quality owner or auditor can read and sign against them. We treat that evidence as an engineering output alongside the model itself, not as a policy document added at the end. This work sits within TechnoLynx’s AI engineering for life sciences and healthcare.
The limits matter. TechnoLynx does not provide policy advice or certification; it produces the engineering artefacts an audit needs. Batch disposition, deviation classification and validation approval stay with your quality unit, and the regulated user remains responsible for outsourced work. A team with established computerised system validation staff and an in-house ML group may only need help with the GPU stack or the evaluation harness. For buying a validated off-the-shelf line system rather than building a model, our guide to selecting a pharma automation partner is the better starting point, and the wider organisational picture is covered under pharmaceutical digital transformation.
FAQ
What is AI in pharma?
The FDA’s drug centre defines AI as a machine-based system that, for human-defined objectives, makes predictions, recommendations or decisions influencing real or virtual environments. AI in pharma appears across the nonclinical, clinical, postmarketing and manufacturing phases of a drug’s life cycle.
Which pharmaceutical company is using AI technology?
The FDA reports that several pharmaceutical manufacturers have already described AI-based advanced process control. Enveda reports that its batch-record reviewer has been deployed on active manufacturing campaigns, with 1,563 production reviews of 462 files recorded in its comment-audit ledger.