ThinkWithPrompt by SynotticThinkWithPrompt

De-identify a dataset before sharing it

A plan to remove or mask personal data in a dataset while keeping it useful for analysis, including re-identification risk checks.

Data & AnalysisFew-ShotStandardData & AnalyticsLegalCodingAnalyze

The prompt

Help me de-identify a dataset so it can be shared for analysis without exposing personal information. Dataset description and columns: [PASTE column names, types, and a few masked example values] Who will receive it and for what: [e.g. "external vendor building a churn model", "internal team for a workshop"] What analysis must still be possible: [e.g. "join across tables by customer", "trends by region and age band"] Rules that may apply: [e.g. GDPR, HIPAA, CCPA, internal data policy - or "unsure"] Steps: 1. Classify each column: direct identifier (name, email, phone, ID numbers), quasi-identifier (date of birth, ZIP/postal code, gender, job title, rare attributes), sensitive attribute (health, finances), or safe. 2. Recommend a treatment per column: drop, pseudonymize with a keyed hash or random token (and keep the key separate), generalize (age bands, 3-digit ZIP, month instead of date), suppress rare values, add noise, or keep. 3. Check re-identification risk from combinations of quasi-identifiers: suggest a k-anonymity threshold and how to find small groups. 4. Check free-text fields and file names for hidden personal data. 5. Explain the trade-off: what analysis is lost by each treatment. 6. List controls for the receiving party: access limits, no attempts to re-identify, deletion date. Return a column treatment table (Column | Category | Treatment | Analysis impact), code outline in [SQL / Python] to apply it, a re-identification checklist, and a sign-off checklist. This is general guidance, not legal advice: confirm requirements with my privacy or legal team before sharing.

Highlighted [brackets] are blanks to replace with your own details.

Fill in the blanks and use this promptMore Data & Analysis prompts

What to fill in

  • PASTE column names, types, and a few masked example values
  • e.g. GDPR, HIPAA, CCPA, internal data policy - or "unsure"
  • SQL / Python

How this prompt is built

This prompt follows the Few-Shot structure (Few-shot prompting). A few-shot prompt includes one or more worked examples of the input and the output you want, so the model can copy the pattern instead of guessing it.

Related prompts

Find more prompts like this