Skip to main content

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".

Target schedule, not a verified state

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 categoryStorageTarget retention periodDeletion methodProposed lawful basis (GDPR)
User conversationsPostgreSQLIntended: 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 functionArt. 6(1)(f) legitimate interest; Art. 17 right to erasure on request
Audit logsPostgreSQL (audit tables)90 days (target)Scheduled expiry (intended)Art. 6(1)(c) legal obligation (security monitoring); Art. 32
PII detection eventsPostgreSQL (within audit logs)90 daysExpires with parent audit logArt. 6(1)(f); Art. 32
Semantic cachePostgreSQLIndefinite (performance optimisation; PII-flagged queries are designed to be excluded)Manual purge by an administrator; flushed after an embedding-model migrationArt. 6(1)(f); Art. 5(1)(c) (PII excluded)
Rate-limiting dataRedisEphemeral (1-minute to 24-hour TTL)Automatic Redis key expiryArt. 6(1)(f); Art. 5(1)(e)
Session tokensKeycloak (server-side sessions)Managed by Keycloak session policy (configurable idle and absolute timeouts)Keycloak session invalidation on logout; revocation endpointArt. 6(1)(f); Art. 32
Analytics eventsPostgreSQL1 year (target; aggregated, no individual tracking)Scheduled expiry (intended)Art. 6(1)(f)
Hospital contentpgvector, taxonomy tables, object storageIndefinite (refreshed on re-crawl)Replaced on content updateArt. 6(1)(e) public interest (public-domain content)
Voice transcripts (redacted)PostgreSQL via structured logsPer audit-log retention (90 days, target); redacted before writeExpires with audit logArt. 5(1)(c); Art. 32(1)(a) pseudonymisation
Voice call audioNOT STOREDNot retainedn/aArt. 5(1)(c) data minimisation — only transcripts are retained, audio is discarded post-STT
Evaluation resultsFile system (JSON)Indefinite (development artifact, no PII)Manual deletionNot 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))​

DataPermitted useProhibited use
ConversationsGenerating 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 auditsMarketing, profiling
Audit logsSecurity monitoring; compliance reporting (Art. 30); incident investigationPerformance reviews; user-behaviour analysis
AnalyticsSystem improvement; content-gap identification; aggregate reportingIndividual 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)​

CategoryWhy the chosen periodWhy not longerWhy not shorter
Audit logs (90 days)Standard incident-response window; covers seasonal-pattern analysisRetaining 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 auditCross-session retention without explicit basis would exceed legitimate-interest balancingSession 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. 9Even short retention of audio creates an Art. 9 special-category-data surfacen/a

Data-subject requests (GDPR Chapter III)​

When a data subject exercises their rights:

Request typeArticleProcessTimeline
AccessArt. 15Export conversation history via authenticated session or an administrative functionWithin 30 days (Art. 12(3))
ErasureArt. 17An 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
RestrictionArt. 18Disable user account; retain data in restricted state per Art. 18(2)Within 72 hours of request
RectificationArt. 16Corrections to hospital content corrected at source; system re-ingests on next crawlWithin 30 days of source-data update
PortabilityArt. 20Conversation export in JSON format through an administrative functionWithin 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)​

RecipientData sharedPurposeLawful basisSafeguard
OpenAI (LLM provider)Query text, retrieved-context chunks, embedding inputsResponse generation; embeddingsArt. 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 metadataVoice channel termination per ADR-0050Art. 6(1)(f); Art. 28Data 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)TranscriptionArt. 6(1)(f); Art. 28Data processing agreement not evidenced in the project record
ElevenLabs (text-to-speech, voice channel)Answer text to be spokenSpeech synthesisArt. 6(1)(f); Art. 28Data processing agreement not evidenced in the project record
Jina (reranking)Query text and retrieved passagesResult rerankingArt. 6(1)(f); Art. 28Data 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​