Quick answer
From 13 May 2027, Rules 6(1)(e) and 8(3) of the DPDP Rules require Data Fiduciaries to keep personal data, traffic data and processing logs for at least one year, then erase them. For LLM systems, satisfy this with tiered logs: full metadata for a year, masked prompt content with restricted access, raw content only briefly, and automated erasure when the retention clock ends.
- Rule 6(1)(e) requires logs and personal data to be kept one year for detecting, investigating and remediating unauthorised access.
- Rule 8(3) requires a minimum of one year from processing for Seventh Schedule purposes, then erasure unless another law requires longer.
- Minimisation and retention are compatible if logs record what happened without storing more content than needed.
- Mask identifiers before traces are written, and keep the token vault in a separate access boundary.
- CERT-In's 2022 Directions separately require ICT logs for a rolling 180 days within India.
Who this is for: Platform and SRE teams, ML engineers running LLM tracing, Security operations teams, Data Protection Officers, CTOs of AI products
Minimisation vs the one-year minimum: is there a conflict?
DPDP pulls LLM logging in two directions.
Towards less. Consent under section 6(1) is limited to personal data necessary for the specified purpose. Section 8(7) requires erasure once the purpose is served. Every full-text prompt you store is another copy to secure and erase.
Towards more. Rule 6(1)(c) requires "visibility on the accessing of such personal data, through appropriate logs, monitoring and review". Rule 6(1)(e) requires such logs and personal data to be retained for one year for detecting unauthorised access, investigating it, remediating it and continuing processing. Rule 8(3) adds that personal data, associated traffic data and other logs of the processing must be retained "for a minimum period of one year from the date of such processing" for Seventh Schedule purposes, then erased unless another law requires longer.
The two are reconciled by being precise about what a log contains. Minimisation limits content; retention fixes duration. A one-year log of who called which model, with what data references, under which policy, and what happened, satisfies the retention rules without keeping every customer's raw words for a year.
From 13 May 2027 the design question is not "log or don't log" but "log what, masked how, readable by whom, and erased when".
What to log for every LLM call
Split each trace into tiers with different content and retention.
| Tier | Contents | Masking | Retention |
|---|---|---|---|
| T1 Event metadata | Timestamp (NTP-synced), request ID, user/subject ID, tenant, model and version, gateway policy, token counts, latency, status | Pseudonymous IDs | One year minimum, then erase |
| T2 Data-access record | IDs of documents, chunks and records retrieved; tool calls and their target resources; detokenisation events | IDs only, no content | One year minimum, then erase |
| T3 Masked content | Prompt, retrieved context and response with identifiers tokenised | Tokenised at gateway | Up to one year, restricted access |
| T4 Raw content | Unmasked prompt and response | None | Hours to days, debug only, or not at all |
| T5 Security signals | Prompt-injection detections, policy blocks, anomaly scores | Pseudonymous | One year minimum |
T1, T2 and T5 carry most of the investigative value: they tell you whose data was touched, by which component, and when. T3 helps reconstruct model behaviour. T4 is where minimisation bites — keep it off by default and enable it per tenant with an expiry.
Whether Rule 8(3)'s "such personal data" requires content-level copies for every call is an interpretive question. A defensible position is that T1–T3, together with the source records you already retain, let you reconstruct the processing.
How to mask LLM logs without losing debuggability
Mask at the gateway, before anything is written to disk or shipped to an observability vendor.
- Typed, stable tokens. Replace values with
<EMAIL_a91c>rather than***. Engineers can still see that the model mishandled an email without seeing the email. - Per-tenant salt. Derive tokens with a tenant-specific key so the same person is not linkable across customers.
- Structured fields first. Put user IDs, account IDs and order numbers in structured span attributes, not free text, so they can be hashed consistently.
- Mask retrieved context too. RAG traces often log the full retrieved chunks; those chunks contain other people's data.
- Mask tool outputs. Agent tool calls that return CRM or database rows must be masked before entering the trace.
- Sample content, not metadata. Keep 100% of T1/T2 events; sample T3 content where volume is high.
Test masking recall against a labelled sample monthly. Regex catches structured identifiers; names, addresses and medical terms need NER. More technique detail is in masking and tokenisation for AI pipelines.
Access controls on the log store
A year of LLM traces is a high-value target. Rule 6(1)(b) requires access control over computer resources, and Rule 6(1)(c) requires visibility on access to personal data — including access to the logs themselves.
- Role separation. Product engineers see T1 and T3 for their service. Only security and incident roles see T2 across services. Nobody has standing access to T4.
- Break-glass for raw content. Time-boxed, ticket-linked, approved by a second person, and itself logged.
- Separate vault. Detokenisation of T3 goes through the token vault with its own permissions; the observability tool never holds the mapping.
- Tenant scoping. Customer-success staff can view only their assigned tenants' traces.
- Audit the auditors. Ship log-store access events to a write-once store owned by security.
- Vendor settings. If a hosted tracing tool is your processor, check its own retention, region and staff access, and put the terms in the contract as Rule 6(1)(f) expects.
For incidents, these logs feed the Rule 7 breach reports: the description of nature, extent and timing, and the 72-hour detailed report to the Board. See the breach response playbook.
Then erase: automating the end of the retention clock
Rule 8(3) ends with a duty, not an option: after the minimum period, the fiduciary "shall cause such personal data and logs to be erased", unless further retention is required by another law or notified by the Government.
Implement erasure as configuration, not as a quarterly clean-up:
- Stamp every record with
processed_atand aretention_class(T1–T5). - Set lifecycle policies — object-storage lifecycle rules, index lifecycle policies, or partition drops — at one year plus a short operational buffer for T1, T2, T3 and T5; hours or days for T4.
- Legal holds. Allow a hold flag that suspends deletion for records tied to an open investigation, Board inquiry or litigation, with an owner and review date.
- Processors. Configure the same lifecycle in every vendor that stores your traces. Rule 8(3)'s cloud illustration makes you responsible for processor retention and erasure.
- Backups. Ensure backup retention does not silently extend log life beyond your policy.
- Evidence. Record each deletion run: class, date range, row counts.
Individual erasure requests follow the same tiers: purge T4 and live features now, keep T1–T3 under restriction until the clock expires. See erasure in LLMs and vector databases.
Overlaying CERT-In: 180 days in India
The CERT-In Directions of 28 April 2022, issued under section 70B(6) of the IT Act, operate alongside DPDP:
- Maintain logs of ICT systems securely for a rolling 180 days within Indian jurisdiction.
- Report specified cyber incidents within 6 hours of noticing them.
- Synchronise system clocks to NIC or NPL NTP servers, or sources traceable to them.
- Designate a point of contact for CERT-In.
For an LLM stack this means the gateway, model-serving layer, vector DB, agent tool-execution layer and authentication logs all count as ICT system logs. Keep at least the T1, T2 and T5 tiers for 180 days in India; if your observability vendor stores traces abroad, maintain an Indian copy of the security-relevant tiers.
The DPDP one-year retention and the CERT-In 180-day rule stack rather than conflict: one year satisfies both on duration, and the location requirement applies to the CERT-In logs. Clock synchronisation also matters for the 72-hour DPDP breach timeline, because you will need to prove when you became aware. More on this in CERT-In rules for AI systems.
Further reading on suhasbhairav.com
Before 13 May 2027
Compliance checklist
Define log tiers and retention classes
Separate metadata, data-access records, masked content, raw content and security signals, each with its own retention.
Rule 8(3)
Log data-access references for every call
Record which documents, chunks, records and tools each LLM call touched, by ID.
Rule 6(1)(c)
Mask prompts and context at the gateway
Tokenise identifiers before traces are written or exported to any vendor.
Rule 6(1)(a)
Disable raw content logging by default
Allow it per tenant with an expiry measured in hours or days and break-glass access.
DPDP Act s. 6(1)
Restrict and audit log-store access
Apply role separation, tenant scoping and write-once audit trails for log access.
Rule 6(1)(b)
Automate erasure after one year
Use lifecycle policies with a short buffer and a documented legal-hold exception.
Rule 8(3)
Align vendor trace retention
Configure hosted tracing tools to the same retention and erasure schedule and put it in the contract.
Rule 6(1)(f); Rule 8(3)
Keep security tiers in India for 180 days
Maintain ICT logs within Indian jurisdiction and NTP-synchronise clocks.
CERT-In Directions 2022
Test masking recall monthly
Measure detector recall on a labelled sample and fix gaps in names, addresses and free text.
Rule 6(1)(g)
Key dates
CERT-In Directions issued (180-day logs, 6-hour reporting)
DPDP Rules notified
Rules 6 and 8(3) one-year retention apply
Answers
Frequently asked questions
Do I have to keep LLM prompts for one year under DPDP?
Do I have to keep LLM prompts for one year under DPDP?
From 13 May 2027, Rule 8(3) requires personal data, associated traffic data and processing logs to be kept for at least one year from processing. It does not specify storing raw prompt text. A defensible design keeps full metadata and data-access records for a year and masked content under restricted access, with raw text kept only briefly.
Does the one-year retention rule conflict with data minimisation?
Does the one-year retention rule conflict with data minimisation?
Not if you separate content from duration. Minimisation limits what personal data you collect and store; Rule 8(3) fixes how long processing records are kept. Logging pseudonymous IDs, data references and masked content for a year satisfies both, while unmasked full-text logs kept for a year satisfy retention but undermine minimisation.
What happens to LLM logs after one year?
What happens to LLM logs after one year?
Rule 8(3) requires the Data Fiduciary to cause the personal data and logs to be erased after the minimum period, unless further retention is required by another law or notified by the Government. Automate this with lifecycle policies, apply it to processors and backups, and record each deletion run.
Can my observability vendor store LLM traces outside India?
Can my observability vendor store LLM traces outside India?
DPDP does not generally require localisation, but CERT-In's 2022 Directions require ICT system logs to be maintained for a rolling 180 days within Indian jurisdiction. Keep at least the security-relevant tiers in India, and check sectoral rules such as RBI's payment data storage requirements if they apply to you.
If a user deletes their account, do I delete their LLM traces?
If a user deletes their account, do I delete their LLM traces?
Remove them from any live feature immediately, but Rule 8(3) requires processing logs to be retained for at least one year from processing even if the user deletes the account, as the Rule's e-book illustration shows. Hold them under restricted access and erase when the clock expires.
Who should be able to read LLM trace logs?
Who should be able to read LLM trace logs?
Only people who need them, scoped by role and tenant. Product engineers can see masked traces for their service; security staff can see cross-service access records; raw content should require time-boxed break-glass approval. Rule 6(1)(b) and 6(1)(c) require access control and visibility on access, including access to the logs themselves.
Legal references and sources
- Digital Personal Data Protection Rules, 2025 — Rule 6(1)(c) and 6(1)(e) (official text)
- Digital Personal Data Protection Rules, 2025 — Rule 8(3) and Seventh Schedule (official text)
- Digital Personal Data Protection Act, 2023 — Sections 6(1) and 8(7) (official text)
- CERT-In Directions under s. 70B(6), IT Act (28 April 2022) — Log retention and incident reporting (official text)
- DPDP Rules, 2025 (G.S.R. 846(E)) ↗
- CERT-In Directions, 28 April 2022 ↗
- MeitY data protection framework ↗
This guide explains the law for engineering and business teams. It is not legal advice; confirm how it applies to your organisation with qualified counsel, and check the Gazette for later notifications or amendments.
About the author

Suhas Bhairav
Systems architect and applied AI practitioner who designs production AI systems for Indian and global companies, with a focus on privacy-by-design under the DPDP Act and the EU AI Act.
Related guides
- DPDP Rules 2025DPDP One-Year Log Retention: What to Keep and for How LongTwo DPDP rules require one year of retention: Rule 6(1)(e) for security logs and Rule 8(3) for personal data, traffic data and processing logs. What to keep, where, and how to protect it.
- India AI & sector rulesCERT-In Rules for AI Systems: Incident Reporting & LogsHow CERT-In's April 2022 directions on 6-hour incident reporting, 180-day logs in India and clock sync apply to LLM gateways, model APIs and AI agents, and how they meet DPDP.
- AI & personal dataEncryption, Masking and Tokenisation for AI Pipelines Under DPDPRule 6(1)(a) names encryption, obfuscation, masking and virtual tokens as minimum safeguards. Here is how to apply each one to prompts, embeddings, training sets and model gateways.
- AI & personal dataHandling DPDP Erasure Requests in LLMs and Vector DatabasesHow to honour a DPDP erasure request across vector databases, prompt logs, fine-tuning sets, eval sets and model weights — while respecting Rule 8(3)'s one-year retention minimum.
- DPDP Rules 2025DPDP Reasonable Security Safeguards Under Rule 6Rule 6 lists the minimum security safeguards every Data Fiduciary must take from 13 May 2027. Failure can attract a penalty of up to ₹250 crore, the highest in the DPDP Act.
- AI & personal dataAI Agents and Personal Data: DPDP Controls for Agentic SystemsAI agents read, write and share personal data through tools. These are the DPDP controls for tool scopes, approvals, memory, action logs and breach response.