AI Auditability and Traceability in Pharma: Reconstructing AI-Supported Decisions

Direct answer

AI auditability and traceability in pharma mean keeping records that allow an AI-supported decision to be reconstructed: which model and version, which data, what inputs and outputs, which configuration or prompt, who reviewed it and what they decided, and when. In GxP contexts, these records support audit trails, investigations and inspections.

AI governance frameworkAI governance as an umbrella over distinct components that are not synonyms. Highlighted: Auditability.AI governancePolicy, inventory, risk classification, roles, lifecycle controlsDatagovernanceModelvalidationSystemvalidationModelmonitoringChangecontrolRiskmanagementHumanoversightExplainabilityBias and dataqualitySecurityPrivacyAuditability
Illustration. All information shown is also available as text on this page.

Executive summary

When something goes wrong, or when an inspector asks, organisations need to show how an AI-supported decision was made. Without records, this is impossible.

This page is part of Track A, AI for pharmaceutical manufacturers, within the AI in Pharma section. Statements describe potential applications (claim levels 1 and 2) unless a source is cited.

Definition and scope

This page is part of AI governance in Pharma.

The problem and today's process

AI applications often log little, or logs are not linked to model versions and human decisions.

What to record

What to record for traceable AI-supported decisions
RecordPurpose
Model and versionKnow which model produced the output
Data and dataset versionsReproduce training and testing
InputsUnderstand what the model received
OutputsKnow what the model produced
User and decisionAttribute the human decision
TimestampsEstablish sequence
Configuration and promptsReproduce behaviour for language models
ChangesLink to change control records

Potential AI applications

Potential AI applications in AI auditability and traceability (claim level: potential)
Potential applicationWhat AI may doTechnologyTypical dataDecision that remains human
Decision loggingRecording inputs, outputs and decisionsApplication designInteraction dataAudit use
Log analysisSearching logs for investigationsLLMsLogsInvestigator conclusions

How a use case fits together

  1. Define what must be reconstructable
  2. Record model and data versions
  3. Log inputs, outputs and configuration
  4. Record reviewer and decision
  5. Protect logs from alteration
  6. Retain per requirements
  7. Enable retrieval for audits
  8. Link to change control
An illustrative application of Hello Pharma's use case relationship model.

Data requirements

Logs may contain personal and confidential data, requiring security and retention controls.

See pharmaceutical data for AI.

The human role

System owners define logging; quality verifies adequacy for GxP; auditors and investigators use records.

Regulatory considerations

Regulatory expectations for AI in medicinal product development and manufacturing are evolving, and differ by jurisdiction and use. This page describes common principles, not regulatory requirements. Organisations should identify the guidance, legislation and standards applicable to their products, markets and uses, and verify their current status.

Applicable regulatory guidance differs by product, market and use; consult current guidance from the relevant authorities and standards bodies.

Limitations

  • Logging everything creates storage and privacy burdens.
  • Some third-party services limit logging.
  • Non-deterministic models may not reproduce outputs exactly.

Risks and governance

Risks and typical controls
RiskTypical control
Unreconstructable decisionsDefined logging requirements
Altered logsProtected audit trails

See AI governance in Pharma.

Measuring whether it helps

Measure a baseline first, then compare. Possible measures:

  • Share of AI systems meeting logging requirements
  • Time to reconstruct a decision

No specific improvement should be assumed. See AI implementation in Pharma.

Questions to ask before implementation

  1. What must be reconstructable?
  2. Are model and data versions linked?
  3. Are logs protected?
  4. How long are records retained?

Related use cases are listed in the AI use cases in Pharma directory.

Frequently asked questions

What is AI auditability?

It is the ability to examine and reconstruct how an AI system was built, how it behaved and how its outputs were used in decisions.

What should be recorded for AI-supported decisions?

Model and data versions, inputs, outputs, configuration or prompts, the reviewer and decision, timestamps and links to change control.

Do AI systems need audit trails in GxP?

Where AI supports GxP records or decisions, audit trail and data integrity expectations apply.

Can LLM outputs be reproduced for audits?

Not always exactly, because some models are non-deterministic, which makes logging actual inputs and outputs important.