How to Store and Delete AI Chat Conversation History
This article covers why a service with AI features keeps conversation history, the responsibility that comes with keeping too much, and how to design for deletion as well.
Ren

Procura
Reasons to keep history
- To keep the conversation natural by building on what came before
- To investigate the cause when there is a bug or a wrong answer
- To understand usage and help improve the feature

Ren

Procura
What to decide in the design
- Decide the retention period in advance, and delete automatically after it passes
- Give users a way to delete their own history
- Limit the people who can view history (including operator staff) to the minimum
- State in your privacy policy what you store
Design for deletion too
Many people think about designing to "keep" from the start, but designing to "delete" tends to be put off. If you try to add deletion later, you have to delete copies scattered everywhere, including backups and related logs, which takes more work than you'd expect. Think through the deletion procedure from the initial design stage.
- Decide how to handle backups and logs, not only the main database
- Document in advance what to do when a deletion request arrives
- Check regularly that expired data has actually been deleted

Ren

Procura
Consider an export feature
Beyond deletion, offering an export feature that lets users take out their own conversation history also reassures them. It isn't required for every service, but for features that get used for personal matters, having a way to take your own data out yourself is a comforting point for users.
- Consider whether to offer export, depending on the nature of your service
- If you do, check carefully that other people's history doesn't get mixed into the output
- Record who made each export request and when

Procura

Ren
This article is translated from the Japanese original. If the two differ, the Japanese version is the one we keep up to date.