Skip to content
Faisal Mahmud TusherDigital marketing, SEO & analytics
with Faisal Tusher

AI in Marketing › AI Governance for Marketing Teams

Minimising and Redacting Data Before Prompting

A routine for stripping personal data before material enters an AI tool: choose the fields, aggregate, pseudonymise, mask free text and check what is left.
Tutorialintermediate9 min readUpdated

Why minimisation comes before the prompt

The GDPR lists data minimisation among its principles: personal data should be adequate, relevant and limited to what is necessary for the purpose. It also expects data to be processed for specified purposes and not further processed in ways incompatible with them. For AI tools the practical consequence is simple. Whatever reaches the tool has been processed, wherever it goes next, so the decision about what to share has to be made before the material is pasted or uploaded.

Three things make this harder with AI than with other tools. Material is often unstructured: a transcript or a ticket thread carries names, addresses and account details in free text where no column header warns you. Exports of First-Party Data are easy to make with every field, because filtering takes more clicks than not. And the output can carry data onwards: a summary that quotes a customer's message, or a draft email that includes an order number, puts personal data into a new document with its own retention.

Minimisation also helps the work. A model given only the fields relevant to a question is less likely to latch onto irrelevant ones, and an aggregated table is easier to check than thousands of rows. The ICO's direct marketing guidance explains how UK data protection and electronic marketing rules apply to marketing activity, and the privacy and consent guide covers how consent and lawful basis follow data through the stack. Neither is satisfied by a vendor's good terms alone; both start with what you choose to send. When whole exports and transcripts are already reaching AI tools as a habit rather than a one-off, the diagnosis for customer data pasted into AI tools traces it to the missing rule, tool, routine, supplier terms or training behind it.

Before you start

  • An approved tool. The disclosure guide's data rule decides which tools may receive personal data. If no approved tool exists for the task, the routine below can still produce aggregated, non-personal material, or the task is done without AI.
  • The material and its origin. Know where the export, transcripts or tickets came from, what the people in them were told about how their data would be used, and whether this use is compatible with that.
  • A spreadsheet or data tool. Something that can drop columns, group rows and run find-and-replace; most of the work is ordinary data handling.
  • A pattern list. The identifiers your business holds: email address formats, phone formats, order and account number patterns, postcode formats, names of staff who appear in tickets.
  • A place to keep the key. If you pseudonymise, the lookup between codes and real identifiers lives in an access-controlled location, never alongside the material sent to the tool.
  • The data dictionary. The field definitions in your data operations and taxonomy documentation tell you what each column actually holds, which matters when a harmless-looking field contains free text.

The routine, step by step

  1. State the task

    Write one sentence describing what the AI tool is being asked to do and what the output will be used for. "Group last quarter's cancellation reasons into themes for the retention plan" is a task. "Analyse the customer data" is not, because it cannot tell you which fields are needed. The task sentence is also the purpose you will record at the end, and it is the test for whether this use fits the purpose the data was collected for. If it does not obviously fit, stop and ask whoever handles data protection.

  2. List the fields it needs

    From the task sentence, list the fields the work genuinely depends on. Theming cancellation reasons needs the reason text and perhaps the plan type and tenure band for comparison; it does not need names, email addresses, payment details or full order histories. Be strict: for each field, ask what the output would lose without it. Fields used for Segmentation comparisons (plan, region, tenure band) are often needed; fields that identify a person are almost never needed for the analysis itself.

  3. Drop everything else

    Remove every column not on the list, in the source system's export settings where possible rather than after export, so the extra fields never leave the system at all. Check for hidden and merged columns, notes fields and metadata such as file properties and tracked changes in documents. If the material comes from a CDP or CRM, a saved export view with only the needed fields makes the next time faster and safer.

  4. Aggregate where rows are not needed

    Many tasks need patterns, not individuals. If the question is how cancellation reasons differ by plan, a table of counts by reason and plan answers it without a single customer row. Group to the level the task needs, and suppress or merge very small groups, since a group of one or two people can identify them as surely as a name. Aggregated data that no longer relates to an identifiable person is outside the GDPR's scope; individual rows, however reduced, are not.

  5. Pseudonymise identifiers

    Where the task does need individual rows, for example to keep a ticket's messages together, replace direct identifiers with codes: customer IDs, email addresses and order numbers become neutral reference codes. Keep the key separately with restricted access. Remember the GDPR's position that pseudonymised data is still personal data, so the material still goes only to an approved tool. Pseudonymising reduces what the tool sees; it does not change the category of the data.

  6. Mask free text

    Free text is where identifiers hide. Run find-and-replace over message bodies, notes, transcripts and review text using your pattern list: email addresses, phone numbers, postcodes, order and account numbers, card fragments and staff names, each replaced with a tag such as [EMAIL] or [ORDER]. Then search for the less regular identifiers: customers signing off with their name, mentions of family members, health details explained in a complaint, addresses written out in words. Anything sensitive that the task does not need is removed, not tagged.

  7. Check a sample by eye

    Automated masking misses things, so read a sample of the prepared material in full before it goes anywhere. Read more than you think you need, and read the longest and messiest records, since those are where identifiers survive. Use the table in the next section as the checklist. If the sample turns up a missed identifier, add its pattern to the list, re-run the masking and take a fresh sample.

  8. Record what was shared

    Keep a short record next to the AI register entry for the use: the task sentence, the source system, the fields kept, the method (aggregated, pseudonymised, masked), the tool and plan, the date and who prepared it. The record makes the next run repeatable, shows what was done if anyone asks, and lets a deletion request be traced to anything still held. Delete working copies of the full export once the prepared version exists.

Checking what is left

Use this table when reading the sample in step seven. Each row is a kind of identifier that commonly survives automated masking in marketing material.

What to look forWhere it hidesWhat to do
NamesSign-offs, greetings, quoted colleagues, staff names in repliesReplace with a role tag or remove
Contact detailsSignatures, forwarded threads, phone numbers written with spaces or wordsMask with a tag; extend the pattern list
Account, order and booking numbersSubject lines, pasted confirmations, URLsPseudonymise or mask
Addresses and locationsDelivery complaints, postcodes in free text, workplace namesRemove; keep only the region if the task needs it
Special-category detailsHealth explanations, family circumstances, beliefs mentioned in complaintsRemove entirely
Small groupsAggregated cells with very few peopleMerge or suppress the cell
Indirect identifiersRare job titles, unusual products, exact dates combined with locationsGeneralise to a band or category
Attachments and metadataImages, file properties, document commentsStrip before upload

When the sample passes, the material is ready. If it keeps failing, the task may need aggregated data only, or a different approach that does not involve sending individual records at all, such as running the work inside the platform where the data already lives.

Illustrative example — not a real result

Saltinghame Cycles prepares cancellation data

Saltinghame Cycles, an invented bike retailer with a servicing subscription, wants themes from last quarter's cancellations. The full export has 1,840 rows and 27 columns, including names, emails, addresses, card expiry dates and a free-text reason field. The task sentence ("theme cancellation reasons by plan and tenure band for the retention plan") keeps 4 columns: reason text, plan, tenure band and month. The team builds a table of counts by plan and tenure band for the comparison, merging 3 cells with fewer than 5 customers. For the themes it keeps the reason text with a row code only. Pattern masking finds 212 email addresses, phone numbers or order numbers inside reason text. A read of 150 records finds 9 more identifiers, mostly customers signing off with their first name and 2 mentioning a medical condition, which are removed and added to the pattern list. The record of what was shared takes 5 lines in the register.

Verify it worked

  • Read the task sentence beside the kept fields. Each field should answer the question "what would the output lose without it?".
  • Open the prepared file. Only the listed columns should remain, with no hidden columns, notes, file properties or tracked changes.
  • Check every aggregated table. No cell should hold very few people, because small groups are merged or suppressed.
  • Check the pseudonymised rows. Codes should replace identifiers, and the key should sit elsewhere, access-controlled.
  • Read a sample in full using the table above. Confirm the record of what was shared exists and the working copies of the full export are gone.

If it goes wrong

  • The read-through keeps finding identifiers. The pattern list is probably incomplete. Add each pattern, re-run the masking and take a fresh sample. If it keeps failing, aggregate only.
  • An aggregate table has a group of one or two people. Small groups can identify individuals. Merge or suppress the cell.
  • You cannot name the fields the task needs. The task sentence is probably too vague. Rewrite it. If the use does not fit the purpose the data was collected for, stop and ask whoever handles data protection.
  • The key sits beside the prepared file. That undoes the pseudonymisation. Move the key to an access-controlled location.
  • A summary or draft quotes a customer. Check outputs for identifiers before sharing them.

Next steps

Common mistakes

  • Exporting everything and filtering later. Fields that never leave the source system cannot leak; filter in the export.
  • Treating pseudonymised data as anonymous. It is still personal data and still belongs only in an approved tool.
  • Relying on a prompt instruction. Telling the model to ignore personal data does not stop the tool receiving it.
  • Masking columns but not free text. Reasons, notes and messages are where most identifiers survive.
  • Keeping the key with the material. A code list stored beside the prepared file undoes the pseudonymisation.
  • Skipping the read-through. Pattern matching misses sign-offs, written-out numbers and sensitive details that no pattern describes.
  • Forgetting the output. Summaries and drafts can quote customers and carry identifiers into new documents; check them before they are shared.
  • Not recording what was shared. Without a record, the next person repeats the work from the full export and nobody can trace what left the system.

Frequently asked questions

Is pseudonymised data safe to put into any AI tool?

No. The GDPR treats pseudonymised data as personal data, because it can be linked back to a person with the key or with other information. Pseudonymising reduces what a tool sees and is a sensible safeguard, but the material still belongs only in tools approved for personal data. Data that has been aggregated so that no individual can be identified is a different matter, which is why this routine aggregates wherever the task allows.

Can I just tell the AI tool to ignore the personal data in what I paste?

No. An instruction to ignore data does not stop the tool receiving, processing or storing it, and what happens to it then depends on the vendor's terms, not the prompt. Minimisation has to happen before the material reaches the tool. Once the data has been sent, the only controls left are the ones in the vendor's contract.

Do I need to minimise data if we use an enterprise AI tool with good terms?

Yes. Good contractual terms decide what the vendor may do with data; they do not make it necessary to send. Data protection law expects processing to be limited to what the purpose needs whatever the tool, and every field you send is another field in prompt histories, logs and outputs that has to be retained, secured and deleted later. Minimising also tends to produce better answers, because the model is not distracted by irrelevant columns.

Terms used on this page

Where this page is used

Also related

Sources

  1. Regulation (EU) 2016/679 (GDPR) — EUR-Lex
  2. Direct marketing guidance — Information Commissioner's Office (UK)

Related