Introduction
Many AI tools can identify the root cause of a quality or manufacturing issue and explain the events leading up to it. However, for pharmaceutical teams responsible for maintaining good practice, the question is whether these explanations are evidence-based and whether errors could potentially influence decisions. AI validation establishes the reliability and suitability of AI tools for their intended use, not just their ability to produce plausible output.
This post examines how pharmaceutical teams can assess AI tools, from implementing appropriate safeguards to maintaining oversight as data and processes change. It draws on industry guidance on conducting effective root cause analysis and corrective and preventive action (CAPA).
What is AI validation in a GxP environment?
AI validation is a method for documenting evidence that an AI-enabled system is fit for purpose within a practice regulated or guided by good practice guidelines (such as Good Manufacturing Practice or Good Clinical Practice, known as GxP codes). This involves proving that a system consistently performs as intended and upholds the guidelines without introducing unacceptable risks to product quality or patient safety.
While the underlying steps are similar to traditional computerized system validation, adding AI introduces further complications. Different AI models need different approaches to ensure they work reliably in pharmaceutical manufacturing. Some models may be static, while others can be updated or retrained to change their behavior, known as continuously learning models.
Another critical factor in GxP applications is whether outputs are deterministic (in other words, the same input always produces the same output). Furthermore, many AI systems depend on historical data to identify patterns or generate predictions, and their outputs can include outdated information.
In July 2025, the European Commission and PIC/S published a draft annex to the EU Guidelines for Good Manufacturing Practice (GMP), Annex 22: Artificial Intelligence, for public consultation. The draft stated that continuously learning models, generative AI and large language models should not be used in critical GMP applications, where manufacturing activities could directly affect medicine quality or patient safety. Instead, it focused on static AI models with deterministic outputs.
For these models, the draft proposes testing against predefined performance criteria, using test data that is representative of real conditions and independent of the data used during model development. Performance should also continue to be monitored after deployment.
Annex 22 is still a draft. The consultation drew around 1,300 comments, and at a June 2026 EMA workshop, regulators and industry discussed a more technology-neutral, risk-based approach. Under that approach, whether an AI system is acceptable would depend less on the type of model and more on whether risks can be shown to stay under control throughout its lifecycle. The final text is expected to go to the European Commission around the end of 2026, so teams should treat the draft as a guide to regulators' direction rather than a final requirement.

Start with intended use, risk, and the level of AI autonomy
The first step in AI validation is to define the system's intended use, including the information to be processed, the tasks it is expected to perform, and which decisions remain the responsibility of a qualified person.
Teams should also consider two further factors. The International Society for Pharmaceutical Engineering (ISPE), a professional association that develops guidance for the pharmaceutical industry, uses them in its AI maturity model. The first, control design, describes how much of a GxP process the AI controls, from supporting a human decision to acting without review. The second, autonomy, describes whether the model can update or retrain itself after deployment. The more control and autonomy an AI system has, the more testing and safeguards it needs.
Let’s say, for example, an AI tool supporting pharmaceutical deviation investigations might need to retrieve relevant batch records, identify similar previous deviations, and suggest potential root causes for an investigator to assess. It still shouldn’t be authorized to confirm the final root cause, approve a CAPA, or close an investigation. Testing should demonstrate that it performs its assigned tasks reliably and cannot bypass these approval boundaries. If the model can update or retrain, teams should also define how changes will be reviewed and tested before the updated model is used.
A risk assessment should examine the consequences of incorrect outputs and whether existing checks would detect them. Outcomes could range from wasting an investigator’s time with an irrelevant historical record to a fabricated maintenance record that causes an investigator to miss the true cause of equipment failure.
The severity of these consequences should guide the test cases, acceptable error limits, and level of source verification required before findings inform quality decisions, with high risk systems undergoing more challenging test cases with stricter acceptance criteria.
Establish whether the data is fit for purpose
An AI system’s ability to support a deviation investigation depends on the quality and suitability of the information it receives. Before processing begins, input checks should assess four aspects of data fitness:
- Reliability: records originate from trustworthy and traceable sources.
- Relevance: information relates to the affected equipment and investigation period.
- Representativeness: historical data reflects relevant operating conditions and known failures.
- Abundance: sufficient information is available to support the proposed analysis.
As an example, an AI tool that is investigating a temperature deviation might retrieve the maintenance records for equipment that was replaced six months earlier. Although these records are completely genuine, they may not be relevant to this newly identified deviation. Input checks should detect the mismatch and either exclude the records or flag them for an investigator to assess.
Organizations should define criteria for deciding whether data is suitable for the intended analysis and when to block processing or refer it for human review. Any scoring method or threshold should be justified for intended use, and testing should demonstrate that the checks reliably identify unsuitable or insufficient data.
Define acceptance criteria and test the complete workflow
Acceptance criteria establish the level of performance an AI system must demonstrate before approval, and they should be defined before system testing and reflect the risks associated with its intended use.
Pharmaceutical teams could create a reference dataset from completed investigations with approved root causes and the accompanying original records. An investigator could then compare this documented evidence with AI findings to assess the system's ability to identify the correct root cause, supported by the available evidence.
Performance could then be measured by calculating the proportion of relevant records correctly retrieved, and the frequency of unsupported claims generated by the AI system.
Additionally, including tests with deliberately incomplete or inaccurate records would help establish the system's ability to identify gaps in the evidence, rather than simply producing unfounded conclusions. For example, the acceptance criteria might specify a minimum number of relevant records retrieved and a maximum acceptable rate of unsupported claims. These limits should be justified by risk assessment before testing.
However, correctly identifying the root cause alone is insufficient for proving that the AI system is suitable for use. The validation protocol must also challenge the implemented safeguards. For example, introducing a recommendation that conflicts with an approved SOP would determine whether the output guardrail detects this contradiction and prevents the recommendation from progressing further.
What should your AI validation protocol test?
Put output guardrails and human review in place
AI-generated results must be assessed against predefined acceptance criteria, and any failures should be investigated and corrected before approval. This provides evidence of both the AI system's analytical performance and the wider quality management workflow's ability to prevent erroneous results from influencing decisions. Stoop and Walia propose output guardrails including verification against approved source documents and rules-based compliance checks.
Suppose an AI system identifies equipment malfunction as the most likely cause of a manufacturing deviation. It may cite a maintenance report, but that reference alone does not prove the AI-generated conclusion is correct. Investigators must therefore confirm the report actually supports the proposed failure.
Output guardrails can identify missing references or recommendations that contradict approved procedures, but automated checks may still fail to recognize when a genuine source has been misinterpreted. Consequently, qualified investigators must assess the available supporting evidence and document rejected recommendations to prevent unapproved findings from progressing to CAPA decisions.

Maintain control through monitoring and change management
Initial system validation establishes acceptable performance under the conditions tested, but any subsequent changes to manufacturing processes or data sources may affect the reliability of AI-generated results. For example, replacement of equipment may invalidate historical maintenance records, even though the AI model itself remains unchanged.
Ongoing monitoring should track incorrect record retrievals, unsupported conclusions, and the frequency of human overrides. It should also assess whether input checks are allowing unsuitable data to reach the model. A sustained increase in rejected recommendations should trigger an investigation to determine whether the cause lies in the model, the available information, or the wider process.
Monitoring responsibilities and acceptable performance limits should be defined before deployment. Changes that affect the validation assumptions should undergo change control, with additional testing or revalidation reflecting the impact of those changes. Procedures should also specify when unacceptable performance requires use of the system to be suspended pending investigation and what evidence is needed before use can resume.
Keep validation evidence traceable and reviewable
AI system approval and validation must be documented; records should connect the intended-use specification and risk assessment to acceptance criteria and test results. Following system deployment, monitoring findings and change-control records provide additional evidence that the system remains suitable.
Where AI-generated findings contribute to deviation investigations, reviewers must also be able to establish which source records informed a recommendation, and who authorized the final decision. Maintaining this traceability allows AI-assisted activities to be assessed within the existing pharmaceutical quality management system.
From a quality management perspective, keeping these records linked to deviation, CAPA, and change control documentation makes it easier to reconstruct why an AI-assisted decision was accepted. Scilife also advocates for risk-based validation, with continued monitoring and change control ensuring that a system remains suitable for use after its initial approval.
Conclusions
Effective AI validation combines evidence from initial testing with controls that keep the system suitable for use throughout operation. Clear responsibilities, checks on data quality, ongoing monitoring, and change control help teams identify problems and respond before they affect quality decisions.
Start with one clearly defined use case. Assess whether the available data supports the intended task, who will review the outputs, and what monitoring is needed to detect unacceptable performance.
Scilife Smart QMS can help teams manage this work by centralizing validation documentation, coordinating reviews and approvals, and maintaining records of training, changes, and corrective actions. Connecting these activities within the quality management system helps teams keep validation evidence and operational controls aligned as the AI system and its use evolve.
FAQs
What is GxP AI validation?
GxP AI validation establishes documented evidence that an AI-enabled system meets the requirements of its intended use within a regulated process.
How can AI be validated for deviation investigations?
Testing can use completed investigations with approved findings, alongside cases involving incomplete or contradictory evidence. The results should demonstrate that the system retrieves relevant information and identifies unsupported conclusions. Note that the draft Annex 22 currently excludes generative AI from critical GMP applications, although this position may change in the final text.
What are input and output guardrails?
Input guardrails assess whether data is suitable for processing. Output guardrails check generated results for identified errors or inappropriate recommendations before they are used.
Does AI validation require human oversight?
The level of oversight depends on the intended use and associated risks. Qualified personnel must retain the necessary authority to review findings and approve regulated quality decisions.
When should an AI system be revalidated?
Revalidation should be considered when changes to the model or operating environment affect previously demonstrated performance, or when monitoring identifies unacceptable errors.
Can generative AI be validated for GxP applications?
Generative AI can be assessed against a defined intended use, although variable outputs require testing that considers factual accuracy and the consistency with which responses meet acceptance criteria.

