1What an investigation must contain.
21 CFR 211.100(b) requires any deviation from written production and process control procedures to be “recorded and justified”.¹ Under 211.192, an unexplained discrepancy or a failure to meet specifications “shall be thoroughly investigated, whether or not the batch has already been distributed”. The investigation extends to other batches and products that may be associated, and “a written record of the investigation shall be made and shall include the conclusions and followup.”²
EU GMP Chapter 1 asks for “an appropriate level of root cause analysis” in investigating deviations, suspected product defects and other problems, which can be set using quality risk management. Where the true root cause cannot be determined, consideration should be given to identifying and addressing the most likely causes. Where human error is suspected, “this should be justified having taken care to ensure that process, procedural or system-based errors or problems have not been overlooked”. CAPAs should follow from the investigation, and their effectiveness should be monitored and assessed.³ ICH Q10 asks for “a structured approach to the investigation process” with the objective of determining the root cause, and effort, formality and documentation “commensurate with the level of risk”.⁴
2What regulators have said about AI and deviations.
At the QP Forum in Dublin on 12 May 2026, an HPRA GMP inspector was asked how AI can be used for GMP activities, “e.g. writing deviations, customer complaints, audit and inspection responses”. The answer: “testing / confirming the outputs is key, e.g. through verification of a ‘Human in the loop’ or using alternative guardrails.” The company and the personnel responsible for the activity “are responsible for the decisions made based on the outputs of those models”. The inspector named three things that keep outputs accurate: in-depth knowledge of the process, review and verification of AI outputs, and training and validation of the systems. Inspectors may ask at the opening meeting whether AI is used in any GMP system or process.⁵
The draft Annex 22, still under revision, says generative AI and large language models should not be used in critical GMP applications, those with direct impact on patient safety, product quality or data integrity. In non-critical applications, qualified and trained people are responsible for the output.⁶ The draft does not list which tasks are critical. FDA’s April 2026 warning letter told Purolea Cosmetics Lab that if it resumed production, AI output used for CGMP activities must be “reviewed and cleared by an authorized human representative of your firm’s QU”.⁷
3Where AI helps, and where it can mislead.
The part of an investigation AI can take on is the assembly: putting timestamps, alarms, batch records and procedures into one chronology, and finding earlier events and CAPAs like this one. ICH Q9(R1) warns that subjectivity, including bias, can enter every stage of risk management, and that it is controlled partly by “maximizing the use of relevant data and sources of knowledge”.⁸ Searching every past deviation and CAPA is one way to do that.
The risk runs the other way too. NIST’s Generative AI Profile describes confabulation, confidently stated but false content, including invented logic or citations that make a wrong answer look justified. It also describes automation bias, “excessive deference to automated systems”.⁹ A drafted root cause that reads well is not evidence for it. If a draft blames human error, Chapter 1 still expects that conclusion to be justified against process, procedural and system causes.³
4Who does what at each stage.
| Stage | What AI can prepare | What a person decides |
|---|---|---|
| Record the deviation | A description and chronology from the records | The deviation is recorded and justified.¹ |
| Assess impact | The batches, products and materials that may be affected | The scope of the investigation and the impact on each batch.²¹⁰ |
| Find the root cause | Candidate causes, with the evidence for and against each | The root cause, or the most likely causes, and the justification for any human error.³ |
| Choose the CAPA | Proposed actions, and earlier CAPAs for similar events | The actions taken through the CAPA system.⁴ |
| Check effectiveness | Event rates before and after the action | Whether the action worked.³⁴ |
| Close the investigation | Nothing | The written record of conclusions and follow-up, which the quality unit reviews before release.²¹¹ |
5How CAPA effectiveness is judged.
ICH Q10 expects a CAPA system for actions arising from complaints, product rejections, non-conformances, recalls, deviations, audits, inspections and trends. In commercial manufacturing “the effectiveness of the actions should be evaluated”, and CAPA methodology “should result in product and process improvements and enhanced product and process understanding.”⁴ Chapter 1 asks for effectiveness to be monitored and assessed in line with quality risk management.³ When a QP considers certifying a batch after an unexpected deviation, Annex 16 expects the deviation to be “thoroughly investigated and the root cause corrected”, with its impact on the batch assessed through quality risk management.¹⁰ A comparison of event rates before and after a change is evidence for that evaluation, not a substitute for it.
6How it runs in Seal.
Neil can draft a deviation investigation. It reads the deviation description and affected records, execution timestamps and equipment events, and the relevant procedures, then drafts an investigation with a timeline, sources and open questions. The investigator determines root cause, and QA approves the investigation and any CAPA. Missing evidence stays visible as an open question.
For CAPA, Neil can compare a CAPA’s event rates, setting recurrence after the action against a defined population, exposure measure and effectiveness criteria instead of relying on closure status. The CAPA owner assesses effectiveness and QA approves the conclusion. Neil drafts and proposes; it signs, approves and releases nothing.
References
- 121 CFR 211.100, Written procedures; deviations, eCFR, current to 4 November 2026. https:/
/ www. ecfr. gov/ current/ title- 21/ chapter- I/ subchapter- C/ part- 211/ subpart- F/ section- 211. 100 (read 6 November 2026) - 221 CFR 211.192, Production record review, eCFR, current to 4 November 2026. https:/
/ www. ecfr. gov/ current/ title- 21/ chapter- I/ subchapter- C/ part- 211/ subpart- J/ section- 211. 192 (read 6 November 2026) - 3EudraLex Volume 4, Part I, Chapter 1: Pharmaceutical Quality System, section 1.4(xiv), European Commission, in operation since 31 January 2013. https:/
/ health. ec. europa. eu/ system/ files/ 2016- 11/ vol4- chap1_ 2013- 01_ en_ 0. pdf (read 6 November 2026) - 4ICH Q10, Pharmaceutical Quality System, section 3.2.2 and Table II, ICH, Step 4, 4 June 2008. https:/
/ database. ich. org/ sites/ default/ files/ Q10%20Guideline. pdf (read 6 November 2026) - 5Question & Answers, QP Forum, Trinity College Dublin, question 1, Richard O’Sullivan, GMP Inspector, Health Products Regulatory Authority (HPRA), 12 May 2026. https:/
/ www. tcd. ie/ media/ tcd/ pharmacy/ images/ qp- forums/ qp- forum- 2026/ presentations/ 9. 3- HPRA- QA. pdf (read 6 November 2026) - 6Annex 22: Artificial Intelligence, draft for consultation, section 1, European Commission and PIC/S, July 2025. https:/
/ picscheme. org/ docview/ 9715 (read 6 November 2026) - 7Warning Letter 320-26-58 to Purolea Cosmetics Lab, MARCS-CMS 722591, FDA Center for Drug Evaluation and Research, 2 April 2026. https:/
/ www. fda. gov/ inspections- compliance- enforcement- and- criminal- investigations/ warning- letters/ purolea- cosmetics- lab- 722591- 04022026 (read 6 November 2026) - 8ICH Q9(R1), Quality Risk Management, section 5.3, ICH, Step 4, 18 January 2023. https:/
/ database. ich. org/ sites/ default/ files/ ICH_ Q9%28R1%29_ Guideline_ Step4_ 2023_ 0126_ 0. pdf (read 6 November 2026) - 9NIST AI 600-1, Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile, sections 2.2 and 2.7, National Institute of Standards and Technology, July 2024. https:/
/ nvlpubs. nist. gov/ nistpubs/ ai/ NIST. AI. 600- 1. pdf (read 6 November 2026) - 10EudraLex Volume 4, Annex 16: Certification by a Qualified Person and Batch Release, sections 3 and 3.1, European Commission, 12 October 2015, in operation since 15 April 2016. https:/
/ health. ec. europa. eu/ system/ files/ 2016- 11/ v4_ an16_ 201510_ en_ 0. pdf (read 6 November 2026) - 1121 CFR 211.22, Responsibilities of quality control unit, eCFR, current to 4 November 2026. https:/
/ www. ecfr. gov/ current/ title- 21/ chapter- I/ subchapter- C/ part- 211/ subpart- B/ section- 211. 22 (read 6 November 2026)
AQuestions and answers
Can AI decide the root cause of a deviation?
No. It can list candidate causes and the evidence for each, but the root cause is a conclusion of the written investigation, and the people responsible for the activity answer for it. Where the true cause cannot be found, EU GMP says to consider identifying and addressing the most likely causes.
Is it acceptable for an AI draft to conclude human error?
Only if the conclusion is justified. EU GMP Chapter 1 requires a human error cause to be justified after checking that process, procedural or system problems have not been overlooked. A draft that defaults to operator error needs the same challenge as one a person wrote.
Will inspectors ask whether we use AI for deviations?
They may. An HPRA inspector said in May 2026 that inspectors may ask at the opening meeting whether AI is used in any GMP system or process, and update the inspection plan to allow time to inspect it.
Can AI write CAPA effectiveness checks?
It can prepare the evidence, such as event rates before and after an action, measured against how much the process actually ran. Whether the action was effective is a quality decision, made in line with quality risk management.
Does an AI tool used for deviations need validation?
The draft Annex 22’s testing rules cover static, deterministic models in critical applications, and it says large language models should not be used there. For non-critical uses it puts the weight on qualified people checking the output. The HPRA inspector also named training and validation of the systems among the things that keep AI outputs accurate.
