Topic 4 of 5 · 5 min read
User controls for delete, export and opt-out
Goal: Specify the delete, export and opt-out controls an AI feature needs and how each one reaches logs, caches and vendors.
A user control is only real if pressing the button changes what happens in every system that holds the data, not just what the screen shows. A "Delete chat" button that hides a row in the interface, while the prompt stays in logs, an index and a vendor's storage, is a promise that is not kept.
Check yourself · 1 of 3
A user deletes a chat. Which copy is most likely to be forgotten?
Why it matters
People have rights over their data, including the right to have it erased in many cases (GDPR Article 17) and to receive a copy in a usable form (Article 20). Even where no law applies, users expect a delete button to delete. AI features copy data into more places than ordinary apps, so deletion is where privacy by design is tested.
How to do it
Use your data map. For each control, list every system the data reaches and say what happens there.
- Delete. For one chat or memory: remove the stored record, the embeddings built from it, cached answers, search indexes, analytics events and exports. For logs and backups, state a short expiry and a rule that restored backups re-apply deletions. For the vendor, use their delete call or rely on their short retention, and check it in the contract.
- Export. Give the user their chats, memories and settings in a common file such as JSON or CSV. Include what the AI "remembers" about them, not only what they typed.
- Opt-out. Separate the choices: use for model improvement, personalised memory, and the feature itself. Switching one off must stop the processing, including for data sent later, and the system must check the flag at the point of use.
- Prove it. Write a test that creates data, deletes it and searches every store.
Before and after
Before: Delete sets hidden = true on a chat row.
After: Delete queues a job that removes the chat, its embeddings and its cache keys, calls the vendor's delete endpoint, writes a completion record without the content, and shows the user "Deleted. Backups clear within 35 days."
What goes wrong
- Soft delete only. The data is still there, and a later breach or request exposes it.
- Forgetting derived data. Summaries, embeddings and memories are copies in another shape.
- Opt-out that applies to new data only. Say clearly what happens to data already used.
- Delete that is hard to find. If it takes five screens, few people will use it.
Examples
Delete job checklist
A deletion job for one chat removes: the chat row, the embedding vectors built from it, cached model answers keyed by it, search index entries, and analytics events with its text. It then calls the model vendor's delete endpoint if one exists. The job writes a record with the chat id and time, but not the content.
An end-to-end deletion test
def test_delete_removes_all_copies(user, chat):
delete_chat(chat.id)
assert db.chats.get(chat.id) is None
assert vector_index.search_by_chat(chat.id) == []
assert cache.get(f"answer:{chat.id}") is None
assert not any(chat.text in line for line in read_logs())
The last line is the one teams skip.
Key points
- A control is real only when it reaches every store on the data map: databases, indexes, caches, logs and vendors.
- Derived data such as summaries, memories and embeddings must be deleted with the source.
- Export should include what the AI remembers about the user, in a common file format.
- Offer separate opt-outs for model improvement, memory and the feature itself.
- Test controls end to end by creating data, deleting it and searching every store.
Common mistakes
- Marking a record as hidden and calling it deleted.
- Deleting the chat but keeping the memory the AI built from it.
- Making export a manual support ticket.
- Letting an opt-out stop the interface from showing data while processing continues.
Check yourself · 2 of 3
What should a data export for an AI assistant include?
Check yourself · 3 of 3
A user turns off Help improve the model. What must happen next?
Practice items, not counted towards your mastery.
Start here
- NIST Privacy Framework (opens in a new tab)DocsFree
A free, vendor-neutral framework for mapping data and managing privacy risk.
More for this topic
- Art. 17 GDPR: Right to erasure (opens in a new tab)StandardFree
When a person can demand deletion, and what the controller must do about it.
Where to go in your country
- GDPR Article 25: Data protection by design and by default (opens in a new tab)StandardFreeEU
Article 25 says data protection must be built into the defaults, which includes controls that work.
- EDPB Guidelines 4/2019 on data protection by design and by default (opens in a new tab)DocsFreeEU
The regulator's own reading of how to build data protection into a product from the start.
- GDPR Article 28: processor (opens in a new tab)DocsFreeEU
What a data processing agreement must contain, including subprocessors and deletion.
- GDPR Article 13: Information to be provided (opens in a new tab)StandardFreeEU
The list of facts a notice must give when you collect personal data from a person.
- EDPB Opinion 28/2024 on data protection aspects of AI models (opens in a new tab)DocsFreeEU
How EU regulators treat personal data in AI model training, including legitimate interest and anonymity.