consent and data rights

The right of individuals to know what data is collected about them, how it is used in AI training, and to opt out or request deletion.

Syntax

ai-ethics
GDPR/CCPA: inform → obtain consent → enable opt-out → enable deletion

Example

ai-ethics
// Data rights implementation:

// 1. Explicit consent:
const consent = await user.confirm(
  "We may use your responses to improve our AI model. Opt out anytime."
);

// 2. Data inventory — know what you have:
// For each user: what data, where, how used in training

// 3. Right to deletion:
async function deleteUserData(userId) {
  await db.deleteUserRecords(userId);
  // Complex: if used in training, may need retraining
  await notifyUser("Your data has been deleted");
}

// 4. Opt-out of AI training:
// Do not use this user's data in model training