bhylu.com

Advertisements

AI Data Privacy

Minimise collected fields without claiming automatic anonymity.

How it works

Training and evaluation records should have a clear purpose and a legitimate data-handling basis. This fictional record includes a reserved example address only to show an allowlist transformation. Removing a direct identifier can reduce exposure but does not establish anonymity; features and combinations may still identify a person or reveal sensitive information.

Run the code

Try in playground loads this complete standard-library Python example without executing it. Choose Run when ready. Local review uses Python 3.12.14; the existing browser editor uses Pyodide 0.27.7. These small fictional examples need no account, external data, model-provider key or database service.

Download the complete privacy.py

Example

privacy.py

record = {"session_id":"K12","trays":4,"visitor_email":"visitor@example.invalid"}
allowed_features = ("trays",)
features = {key:record[key] for key in allowed_features}
print("retained fields:", sorted(features))
print("address retained:", "visitor_email" in features)

Expected result

retained fields: ['trays']
address retained: False

An allowlist excludes newly added fields by default. Real projects also need appropriate access controls, retention decisions, data provenance and a review of third-party processing. This tutorial does not make a legal-compliance claim or upload records to a model service.

Technical references