Data Retention Policy
This document sets out the target data-retention periods and lifecycle management for data processed by the pilot built for ZOL (the ZOL Intelligent Search system). Retention is the operational expression of GDPR Art. 5(1)(e) storage limitation: personal data shall be kept "in a form which permits identification of data subjects for no longer than is necessary for the purposes for which the personal data are processed".
This schedule is the project team's proposal. It has not been reviewed by a data protection officer. The project's internal data-retention note of 12 June 2026 records that, at that date: stored conversations had no automatic expiry; conversation content was not anonymised or pseudonymised; and backups of conversation and audit tables (kept 30 days, taken every two hours since the June 2026 incident) are not purged when a user's rows are deleted, so erasure completes only when those backups expire. Where the table below says "automated expiry", read it as the intended behaviour, not as evidence that it is running.
The policy is calibrated by data class — there is no single "retention period" that fits all data. Audit logs need a different retention than ephemeral session caches; analytics need a different retention than personal-data-touching feedback events. Each row in the schedule below is anchored to the specific GDPR article that supplies its lawful basis.
Retention schedule
| Data category | Storage | Target retention period | Deletion method | Proposed lawful basis (GDPR) |
|---|---|---|---|---|
| User conversations | PostgreSQL | Intended: session-based. In practice no automatic expiry at 12 June 2026 (see note above) | Soft delete; hard delete on user-account removal through an authenticated administrative deletion function | Art. 6(1)(f) legitimate interest; Art. 17 right to erasure on request |
| Audit logs | PostgreSQL (audit tables) | 90 days (target) | Scheduled expiry (intended) | Art. 6(1)(c) legal obligation (security monitoring); Art. 32 |
| PII detection events | PostgreSQL (within audit logs) | 90 days | Expires with parent audit log | Art. 6(1)(f); Art. 32 |
| Semantic cache | PostgreSQL | Indefinite (performance optimisation; PII-flagged queries are designed to be excluded) | Manual purge by an administrator; flushed after an embedding-model migration | Art. 6(1)(f); Art. 5(1)(c) (PII excluded) |
| Rate-limiting data | Redis | Ephemeral (1-minute to 24-hour TTL) | Automatic Redis key expiry | Art. 6(1)(f); Art. 5(1)(e) |
| Session tokens | Keycloak (server-side sessions) | Managed by Keycloak session policy (configurable idle and absolute timeouts) | Keycloak session invalidation on logout; revocation endpoint | Art. 6(1)(f); Art. 32 |
| Analytics events | PostgreSQL | 1 year (target; aggregated, no individual tracking) | Scheduled expiry (intended) | Art. 6(1)(f) |
| Hospital content | pgvector, taxonomy tables, object storage | Indefinite (refreshed on re-crawl) | Replaced on content update | Art. 6(1)(e) public interest (public-domain content) |
| Voice transcripts (redacted) | PostgreSQL via structured logs | Per audit-log retention (90 days, target); redacted before write | Expires with audit log | Art. 5(1)(c); Art. 32(1)(a) pseudonymisation |
| Voice call audio | NOT STORED | Not retained | n/a | Art. 5(1)(c) data minimisation — only transcripts are retained, audio is discarded post-STT |
| Evaluation results | File system (JSON) | Indefinite (development artifact, no PII) | Manual deletion | Not personal data |
Key principles
Data minimisation (Art. 5(1)(c))
- No patient medical records are indexed or intentionally processed; users can still type health-related text into queries
- No health-insurance data enters the system
- Semantic cache excludes PII by design: queries flagged by the PII detector are not cached
- Analytics are pre-aggregated: individual query text is not stored in analytics events
- Voice audio is not retained: only the (redacted) transcript reaches structured logs
Purpose limitation (Art. 5(1)(b))
| Data | Permitted use | Prohibited use |
|---|---|---|
| Conversations | Generating search responses; follow-up context within a session. In practice also: adding real user questions to the evaluation set, and reading stored conversations for incident audits | Marketing, profiling |
| Audit logs | Security monitoring; compliance reporting (Art. 30); incident investigation | Performance reviews; user-behaviour analysis |
| Analytics | System improvement; content-gap identification; aggregate reporting | Individual user tracking |
Storage limitation (Art. 5(1)(e))
Data with defined retention periods is intended to be managed automatically (see the status note above):
Retention-period rationale (per category)
| Category | Why the chosen period | Why not longer | Why not shorter |
|---|---|---|---|
| Audit logs (90 days) | Standard incident-response window; covers seasonal-pattern analysis | Retaining longer increases breach-impact surface (audit logs themselves contain user_id and IP) | Shorter would lose the compliance-investigation window after a delayed report |
| Analytics events (1 year) | Year-over-year trend analysis (seasonal demand, language drift) | No personal data after pre-aggregation, but retention longer than purpose requires would violate Art. 5(1)(e) | Less than a year would cut off seasonal comparison, the primary analytics use case |
| Conversations (session-based) | Conversation context across a single session is the primary use; the intended design is session-based context, but in practice stored conversations have no automatic expiry (12 June 2026 note) and have been used for quality work: real user questions from negative feedback can be added to the evaluation set, and stored conversations were read in the June 2026 incident audit | Cross-session retention without explicit basis would exceed legitimate-interest balancing | Session shorter than the user's task would force users to repeat queries — UX failure with no privacy benefit |
| Voice audio (not retained) | The transcript is sufficient for product purposes; audio adds biometric-data risk under Art. 9 | Even short retention of audio creates an Art. 9 special-category-data surface | n/a |
Data-subject requests (GDPR Chapter III)
When a data subject exercises their rights:
| Request type | Article | Process | Timeline |
|---|---|---|---|
| Access | Art. 15 | Export conversation history via authenticated session or an administrative function | Within 30 days (Art. 12(3)) |
| Erasure | Art. 17 | An authenticated administrative deletion function exists to honour GDPR erasure requests; it removes the user's conversations, messages, feedback, analytics events and audit records. Copies in backups expire separately (up to 30 days). | Within 30 days |
| Restriction | Art. 18 | Disable user account; retain data in restricted state per Art. 18(2) | Within 72 hours of request |
| Rectification | Art. 16 | Corrections to hospital content corrected at source; system re-ingests on next crawl | Within 30 days of source-data update |
| Portability | Art. 20 | Conversation export in JSON format through an administrative function | Within 30 days |
The deletion function requires administrator authentication and returns a structured summary of deleted records across the data categories, providing an audit trail for compliance documentation.
Documents uploaded by the user are NOT deleted (they belong to the tenant, not the individual user). This is the intended behaviour — the document data is processed under the tenant's lawful basis, not the user's, and erasure of an individual user does not transfer to data the tenant retains under separate basis.
Third-party data sharing (GDPR Art. 28 processor relationships)
| Recipient | Data shared | Purpose | Lawful basis | Safeguard |
|---|---|---|---|---|
| OpenAI (LLM provider) | Query text, retrieved-context chunks, embedding inputs | Response generation; embeddings | Art. 6(1)(f); Art. 28 (processor) | OpenAI's standard data processing addendum is the intended safeguard; execution for this deployment is not evidenced in the project repository |
| Twilio (PSTN provider, voice channel) | Caller phone number; SIP signalling metadata | Voice channel termination per ADR-0050 | Art. 6(1)(f); Art. 28 | Data processing agreement not evidenced in the project record |
| Deepgram (speech-to-text, voice channel) | Call audio stream during the call (audio is not stored by the project) | Transcription | Art. 6(1)(f); Art. 28 | Data processing agreement not evidenced in the project record |
| ElevenLabs (text-to-speech, voice channel) | Answer text to be spoken | Speech synthesis | Art. 6(1)(f); Art. 28 | Data processing agreement not evidenced in the project record |
| Jina (reranking) | Query text and retrieved passages | Result reranking | Art. 6(1)(f); Art. 28 | Data processing agreement not evidenced in the project record |
Retention of query text by the provider is governed by OpenAI's published terms, which the project has not independently verified. This is the basis for the residual-risk classification of R2 in the DPIA, which is itself the project team's own assessment.
ISO/IEC 27001 alignment (target, not certification)
The retention policy is structured to be auditable against the relevant ISO/IEC 27001:2022 controls — A.5.34 (privacy and protection of PII), A.8.10 (information deletion), A.8.11 (data masking). Neither the hospital nor the project is claimed to hold ISO/IEC 27001 certification; the policy is a target alignment, not a certification claim.
See ISO/IEC 27001:2022. See ISO/IEC 27018:2019.
Review
This policy is intended to be reviewed:
- Annually from the date of production deployment;
- When new data categories are introduced (the most recent change was the addition of voice-transcript redaction in 2026-05);
- When retention periods are modified;
- When regulatory requirements change (GDPR amendments, AI Act enforcement actions, sectoral guidance updates);
- Following any data-protection incident, regardless of the Art. 33–34 notification threshold.
Document version: 2.0 (2026-05-10), revised October 2026 | Last revised: October 2026 | Author: SOFT4U BV (project team). Not reviewed by a data protection officer.
References
- Regulation (EU) 2016/679 — General Data Protection Regulation, Articles 5, 6, 12, 15–21, 28, 30, 32.
- Data Protection Impact Assessment — risk assessment that this policy implements.
- PII Protection — detection and redaction strategy.
- OpenAI Data Processing Addendum — https://openai.com/policies/data-processing-addendum/.