TL;DR

AI privacy engineering is a data-lineage problem. One user request can become a prompt, output, trace, tool result, embedding, vector record, cache entry, abuse sample, evaluation case, support ticket, and training example across several processors.

A privacy policy cannot control that graph. The system needs:

  • a purpose and legal-basis decision for each processing activity;
  • controller, processor, and subprocessor boundaries;
  • object-level lineage and retention;
  • rights workflows that traverse every relevant system;
  • evidence showing what was searched, changed, retained, or excepted.

Neither embeddings nor trained models are automatically anonymous. GDPR and the CCPA also are not interchangeable consent regimes. Build a control plane that can express jurisdiction-specific decisions while keeping one auditable data inventory.

This guide provides engineering patterns, not legal advice. Counsel should determine applicability, roles, legal bases, notices, contractual terms, exceptions, and response deadlines for the product and jurisdictions involved.

Key Takeaways

  • Purpose is the primary key of privacy architecture. "AI improvement" is too broad to govern collection, retention, and reuse.
  • Lineage must include derived and copied data. Deleting the source row does not remove vectors, caches, traces, exports, or training snapshots.
  • Anonymity is an outcome to prove, not a label to assign. Hashing an identifier or converting text to an embedding does not establish anonymity.
  • Rights fulfillment needs evidence. A green workflow status without per-system results cannot support an audit or user explanation.
  • Vendor settings do not replace contracts and architecture. No-training switches, zero-retention modes, regions, subprocessors, and transfer mechanisms must align.

Start with a Processing Matrix, Not a Data-Type List

A data inventory says what exists. A processing matrix explains why each operation is allowed and constrained.

Activity Purpose Data Role/boundary Decision fields
generate answer service delivery prompt, files, output controller to model processor necessity, retention, transfer
detect abuse security metadata, selected content controller/internal processor proportionality, access, review
product analytics analytics event metadata controller/analytics processor minimization, opt-out rules
evaluate quality evaluation curated interaction samples separate internal purpose provenance, redaction, retention
fine-tune model training approved dataset controller or joint boundary legal basis, rights, model risk
support investigation support ticket, trace, selected content restricted staff/vendor case scope, time limit

For each row, record:

text
purpose_id
purpose_owner
data_categories
data_subjects
special_or_sensitive_categories
controller_processor_role
legal_basis_or_CCPA_business_purpose
necessity_assessment
notice_version
retention_rule
rights_supported
recipients_and_subprocessors
transfer_mechanism
security_controls
DPIA_or_risk_assessment_reference

Do not assign one legal basis to the entire product. A prompt needed to answer a user may have a different purpose and analysis from reusing that prompt in analytics, evaluation, or training.

GDPR Engineering Questions

CNIL's AI recommendations emphasize defining purposes, determining controller/processor roles, selecting a legal basis, minimizing data, setting retention, and protecting rights during AI-system development. The EDPB's Opinion 28/2024 further addresses anonymity of AI models, legitimate interest, and consequences of unlawfully processed personal data.

Engineering should surface, not decide in isolation:

  • Is the purpose specific and communicated?
  • Is each data element necessary for that purpose?
  • Which entity determines means and purposes?
  • Does a processor reuse data for its own purposes?
  • Is special-category data expected or inferred?
  • Can a person object, withdraw consent, or exercise access, erasure, and correction where applicable?
  • Does an automated decision create legal or similarly significant effects?
  • Can downstream copies honor a restriction or deletion?

CCPA/CPRA Engineering Questions

The California Attorney General's official CCPA guidance describes rights including:

  • know;
  • delete, subject to exceptions;
  • correct inaccurate personal information;
  • opt out of sale or sharing;
  • limit certain use and disclosure of sensitive personal information;
  • non-discrimination for exercising rights.

The CPRA amended the CCPA; it is not a separate replacement law. Applicability, definitions, exceptions, verification, and required notices need legal analysis.

The engineering implication is concrete: an opt-out signal must propagate to every path classified as sale or sharing under the approved policy. CalPrivacy's enforcement actions also show that unnecessary friction in opt-out flows can create regulatory risk. Do not require identity verification merely because another rights workflow needs it; apply the verification rule approved for that request type.

Build an AI Data-Lineage Graph

A useful graph follows object identity and derivation:

flowchart TD A["User/account"] --> B["Prompt or uploaded file"] B --> C["Model request"] C --> D["Generated output"] C --> E["Provider log"] C --> F["Trace and tool result"] B --> G["Embedding"] G --> H["Vector index"] D --> I["Cache"] B --> J["Evaluation candidate"] J --> K["Evaluation dataset snapshot"] J --> L["Training dataset snapshot"] L --> M["Model version"] F --> N["Support or security case"]

Every node should expose:

  • stable object ID;
  • subject or tenant linkage, where maintained;
  • source IDs and derivation type;
  • purpose and policy version;
  • physical store and region;
  • processor and subprocessor;
  • creation and expiry time;
  • legal hold or exception state;
  • deletion, correction, and restriction capability;
  • downstream object IDs.

Why a User ID Is Not Enough

Copies frequently lose the original user_id:

  • vectors keep only chunk metadata;
  • traces contain request IDs;
  • exports use dataset sample IDs;
  • providers return their own request IDs;
  • model snapshots refer to dataset versions.

Maintain a privacy linkage service or lineage index that resolves these identifiers without putting raw personal data into every system.

Embeddings and Models Are Not Automatically Anonymous

Three common shortcuts are unsafe:

  1. "We removed names." Quasi-identifiers and content can still single out a person.
  2. "It is an embedding." Transformation does not remove linkability, membership risk, or semantic sensitivity.
  3. "It is inside model weights." The EDPB says model anonymity requires a case-by-case assessment of whether personal data can be extracted or obtained through queries using means reasonably likely to be used.

An assessment should document:

  • model and training pipeline;
  • data types and uniqueness;
  • memorization and extraction testing;
  • membership-inference risk;
  • model-inversion risk;
  • access and query controls;
  • available auxiliary information;
  • threat actors and reasonably likely means;
  • residual risk and re-evaluation triggers.

Pseudonymized data remains personal data for a party able to reconnect it. Use pseudonymization as a control, not as an automatic scope exit.

Logging and Observation Without Collecting Everything

Default telemetry can often avoid raw content:

Need Lower-content signal
latency route, model snapshot, timestamps
spend usage counters and price-card version
reliability typed error and retry count
retrieval quality document IDs and rank, not full text
safety classifier category and policy version
debugging request ID and short-lived, approved capture

When content capture is justified:

  • activate it for a narrow purpose and time window;
  • show a visible or contractual notice where required;
  • redact before durable storage when feasible;
  • use field-level access and audited break-glass access;
  • prevent automatic flow into analytics or training;
  • expire the capture and verify deletion.

Regex redaction alone cannot understand context, free-form secrets, images, or re-identification combinations.

Rights Fulfillment as an Evidence-Producing Workflow

Request Stages

text
received
-> jurisdiction and request type classified
-> identity/authority verification selected
-> scope and exceptions determined
-> lineage search planned
-> systems and processors executed
-> failures reconciled
-> response and evidence package approved
-> completed or appealed

The workflow must support partial outcomes. Some data may be deleted, some corrected, some retained under a documented exception, and some placed under restriction while a dispute is reviewed.

Go Example: Deletion Fan-Out with Evidence

The example makes every store return structured evidence. Production implementations should persist workflow state, retry safely, encrypt the evidence package, and avoid placing personal content in logs.

go
package main

import (
	"context"
	"errors"
	"fmt"
	"time"
)

type DeleteResult struct {
	Store       string
	ObjectIDs   []string
	Action      string
	Exception   string
	CompletedAt time.Time
}

type Store interface {
	Name() string
	DeleteBySubject(ctx context.Context, subjectRef string) (DeleteResult, error)
}

type DeletionWorkflow struct {
	PolicyVersion string
	Stores        []Store
}

type Evidence struct {
	RequestID     string
	PolicyVersion string
	Results       []DeleteResult
	Failures      map[string]string
}

func (w DeletionWorkflow) Run(ctx context.Context, requestID, subjectRef string) (Evidence, error) {
	if requestID == "" || subjectRef == "" {
		return Evidence{}, errors.New("request and subject references are required")
	}
	evidence := Evidence{
		RequestID: requestID, PolicyVersion: w.PolicyVersion,
		Failures: make(map[string]string),
	}
	for _, store := range w.Stores {
		result, err := store.DeleteBySubject(ctx, subjectRef)
		if err != nil {
			evidence.Failures[store.Name()] = err.Error()
			continue
		}
		evidence.Results = append(evidence.Results, result)
	}
	if len(evidence.Failures) > 0 {
		return evidence, fmt.Errorf("%d stores require retry or review", len(evidence.Failures))
	}
	return evidence, nil
}

func main() {
	workflow := DeletionWorkflow{PolicyVersion: "privacy-2026-10"}
	evidence, err := workflow.Run(context.Background(), "dsar-42", "subject-token-7")
	fmt.Println(evidence.PolicyVersion, err)
}

An empty Stores list is not a successful production deletion; inventory validation should reject a workflow whose expected stores are missing.

Deletion, Correction, and Model Artifacts

Deletion Propagation

For each source object, define behavior for:

Location Possible action
primary record delete, restrict, or retain under exception
object storage delete object and derivatives
vector index delete chunks and rebuild affected index state
cache purge keys and invalidation replicas
traces/logs delete, redact, or isolate under approved rule
analytics delete person-level events or apply approved aggregation treatment
evaluation dataset remove sample and publish a new dataset version
pending training job block or rebuild before execution
backups expire under documented schedule and prevent ordinary restore
external processor send request and retain completion evidence

Deletion from training data does not mathematically remove its influence from an already trained model. Whether retraining, unlearning, output controls, restriction, or another response is required depends on the legal and technical assessment. Maintain dataset-to-model lineage so the decision is possible.

Correction Propagation

Do not silently overwrite immutable evidence. Mark the old value superseded, apply the correction to authoritative stores, rebuild derived artifacts where necessary, and prevent obsolete values from being re-ingested from a cache or dataset snapshot.

Controller, Processor, and Subprocessor Boundaries

For every external model, vector database, observability service, support tool, and evaluation vendor, record:

  • service and legal entity;
  • role for each purpose;
  • data categories received;
  • training or product-improvement use;
  • retention and deletion capability;
  • storage and processing locations;
  • subprocessors and change notice;
  • international transfer mechanism;
  • security and incident terms;
  • rights-request assistance;
  • configuration evidence and contract version.

A "do not train" UI toggle addresses one purpose. It does not establish zero retention, no human review, regional processing, deletion support, or the absence of subprocessors.

Release Gates

New AI Feature

  1. Processing matrix approved for every purpose.
  2. Data-flow and lineage graph matches the implementation.
  3. Raw-content logging defaults are reviewed.
  4. Provider role, retention, training, region, and subprocessors are documented.
  5. Rights workflows cover primary and derived stores.
  6. Deletion and correction tests include caches, vectors, exports, and processor failures.
  7. Retention jobs produce verifiable evidence.
  8. Access controls and break-glass use are auditable.
  9. The privacy notice and in-product controls match actual behavior.
  10. The risk assessment has an owner and re-review trigger.

New Evaluation or Training Dataset

  1. Every sample has provenance and purpose.
  2. Service-delivery data is not reused by default.
  3. Legal basis and notice analysis are recorded.
  4. Sensitive and special-category handling is explicit.
  5. Deduplication and redaction do not substitute for rights support.
  6. Dataset snapshots are immutable and linked to model/eval versions.
  7. Deletion can produce a new dataset version.
  8. Downstream model impact can be identified.

Common Failure Modes

Claim or design Why it fails Better control
"we do not train, so privacy is solved" logs, vendors, traces, and rights remain govern every processing purpose
one consent covers all AI use purposes and legal bases differ separate service, security, analytics, eval, training
embeddings are anonymous transformation may preserve linkability keep lineage and assess risk
deleting the account deletes everything derived and external copies remain execute graph-based deletion
DSAR marked complete after queueing processors may fail or time out require per-system completion evidence
vendor region equals data residency support, logs, and subprocessors may differ document the full processing boundary
backup deletion means instant overwrite immutable backups may expire later isolate, schedule expiry, prevent ordinary restore

FAQ

Must prompts always be stored?

No. Many reliability and cost signals can be recorded without raw content. Store content only for a defined purpose, with minimization, access, retention, and rights behavior.

No. Consent must meet legal requirements and be withdrawable; it can be inappropriate where processing is not genuinely optional. Legal counsel should select the basis per purpose.

Does deleting a vector delete its source?

No. Source, chunks, embedding, index replicas, cache, and exports are separate objects. Link them and define deletion order and verification.

Can a model be declared anonymous after removing its training dataset?

No. Dataset deletion does not prove model anonymity. Use the case-specific assessment described by the EDPB and test extraction and identifiability risks.

How much identity verification should a rights request require?

Use the approved rule for the request and risk. Excess verification exposes more data and can obstruct rights; insufficient verification can disclose data to the wrong person.

Primary Sources

Summary

Privacy-safe AI is not achieved by deleting names, disabling training, or publishing a policy. It requires a processing matrix that constrains every purpose, a lineage graph that reaches derived and external data, and rights workflows that return evidence rather than optimistic status.

Build that control plane before production data spreads into vectors, traces, evaluation sets, and model versions. Retrofitting lineage after a deletion or regulatory request is slower, less reliable, and harder to prove.