prompt

Privacy-Compliant Data Aggregation

Design aggregation rules and anonymization for {{sensitive_data}} that meet {{regulation}} requirements.

Updated June 2026
The prompt
Design privacy-compliant aggregation for {{sensitive_data}} under {{regulation}}:

1. Regulatory requirements:
   - What PII is in scope? (name, email, IP, location, etc.)
   - Minimum aggregation level to comply?
   - Retention policies?

2. Aggregation strategy:
   - Suppress low-count cells (k-anonymity: min group size {{min_group_size}})
   - Generalize quasi-identifiers (e.g., zip code → region)
   - Hash or tokenize identifiers before analysis
   - Differential privacy noise (if needed)

3. Practical implementation:
   - SQL / dbt logic for safe aggregates
   - QA checks to prevent de-anonymization
   - Access controls (who can query raw vs aggregated data?)

4. Trade-offs:
   - Utility loss from aggregation (coarser granularity)
   - Risk mitigation: what re-identification attacks are we protecting against?

5. Documentation:
   - Data governance policy
   - Audit log for data access

Deliverables: aggregation rules + SQL implementation + compliance checklist.
Did it work? Rate this prompt

Variables

Type of sensitive data (e.g. 'user IPs and payment methods')
Regulation (e.g. 'GDPR', 'CCPA', 'local privacy law')
Minimum group size for k-anonymity (e.g. 5)

Details

Author

AI Khazna

License

Security

Type

prompt

Related assets

More curated picks in Data & Analytics.

Audit before you install

Run any source through our checks - AI visibility, security, performance, and stack detection.

More in Data & Analytics