Data Governance, Privacy & Protection for AI, 20 min read

The AI data lifecycle and chain of custody

In this lesson you will:

  • Describe each stage of the AI data lifecycle and its key controls
  • Apply chain-of-custody controls to datasets and model artefacts
  • Set retention and deletion rules for AI data and derived artefacts

Data in an AI system has a lifecycle, and each stage has its own failure modes. Chain-of-custody controls make it possible to prove — to an auditor, a regulator or a court — that the data used was the data intended.

1. The AI data lifecycle

AI data lifecycle stages with key controls.
Figure 4.3 The AI data lifecycle. Controls at each stage keep data lawful, accurate and intact from collection to deletion.
Stage What happens Key controls
Collection Data gathered from users, systems, vendors or the web Lawful basis, notice and consent, source vetting, minimisation
Validation Quality, format and integrity checks Schema checks, anomaly and outlier detection, poisoning screens, deduplication
Transformation Cleaning, labelling, feature engineering, de-identification Labelling QA, documented transforms, de-identification, reproducible pipelines
Storage and use Training, evaluation, retrieval, fine-tuning Access control, encryption, versioning, purpose-based access
Retention Kept for retraining, audit or legal reasons Retention schedule per dataset and artefact; legal holds
Archiving Moved to cheaper, restricted storage Integrity checks, restricted access, catalogue entries
Deletion Removed when no longer needed or on request Deletion across copies, indexes, caches and backups; unlearning or retraining where needed

2. Chain of custody

Chain of custody is the documented, unbroken record of who handled a dataset or artefact, when, and what they did with it. It matters for:

  • Integrity — showing a training set was not altered between approval and use.
  • Accountability — attributing changes to people or pipelines.
  • Investigations — reconstructing a poisoning incident or a data leak.
  • Regulation — evidencing data governance for high-risk AI.
Chain of custody for a dataset with hashes and signed hand-offs.
Figure 4.4 A chain of custody. Each hand-off records who, when and a hash — so any later change is detectable.

Practical controls:

  • Immutable, versioned storage for datasets (content-addressed or with object versioning and retention locks).
  • Hashes recorded at each hand-off and verified before training.
  • Signed commits or attestations for pipeline steps; build provenance for model artefacts.
  • Access logs for read and write on training data and model registries.
  • Separation of duties — the person who labels or curates data should not be the only approver of the dataset release.

3. Retention and deletion for AI

Retention schedules must cover more than the raw data:

Item Retention question
Raw training data Needed for retraining or reproducibility? For how long?
Prompts and outputs (logs) Needed for security investigations, quality review or legal holds? Who can read them?
Embeddings and vector indexes Rebuilt from sources — can they follow source deletion automatically?
Fine-tuned weights / adapters Do they encode personal data that has since been deleted?
Evaluation and red-team data Often sensitive (contains attacks and harmful content) — restrict and retain deliberately
Provider-side copies What does the vendor keep, for how long, for abuse monitoring?

Deletion has to reach every copy: primary stores, replicas, backups (on their rotation), indexes, caches, analytics extracts and vendor copies. For models, deleting the source data does not remove what the model learned — Lesson 4.4 covers erasure and unlearning.

Worked example — a retention schedule for a support assistant

Item Retention Reason
Chat transcripts (full) 30 days Quality review and abuse investigation
Transcript metadata (no content) 12 months Security analytics, capacity planning
Retrieval index Mirrors source documents; rebuilt nightly Deleted documents disappear within 24 hours
Fine-tuning dataset (redacted transcripts) Until next model version + 6 months Reproducibility and audit
Provider logs 0 days (zero-retention agreement) Contracted; verified in vendor review
Red-team prompt library 3 years, restricted group Regression testing

🔐 Security lens

Prompt and output logs are among the most sensitive data an AI system creates — users paste anything. Classify them, restrict them, and keep them only as long as their purpose needs.

Key takeaways

  • The lifecycle runs collection → validation → transformation → storage/use → retention → archiving → deletion, each with its own controls.
  • Chain of custody needs immutable versioning, recorded hashes, signed hand-offs, access logs and separation of duties.
  • Retention covers raw data, logs, embeddings, weights, evaluation data and vendor copies.
  • Deletion must reach every copy — and deleting data doesn't remove what a model learned.

Self-check

  1. Which lifecycle stage is the best place to screen for poisoned or anomalous records?
  2. What evidence shows that a training set wasn't changed after approval?
  3. Why are red-team datasets sensitive?