AI & personal dataUpdated 22 November 20268 min read

DPDP Compliance for RAG Chatbots and Knowledge Assistants

RAG chatbots copy personal data into chunks, embeddings and chat logs. This guide maps DPDP duties to ingestion, retrieval, generation and deletion.

By Suhas Bhairav · Reviewed against the DPDP Rules, 2025 (G.S.R. 846(E), 13 Nov 2025)

Main risk
Retrieving data the user is not entitled to
Security baseline
Rule 6(1)(a)–(g)
Log retention
At least 1 year (Rule 8(3))
Erasure
Sections 8(7) and 12 — includes vectors and caches
Accuracy duty
Section 8(3) for decision-making use
Applies from
13 May 2027

Quick answer

A RAG chatbot processes personal data at four points: ingesting documents into a vector index, retrieving chunks for a query, sending them to a model, and logging the conversation. Under the DPDP Act and Rules, each needs a lawful purpose, Rule 6 safeguards such as permission-aware retrieval and redaction, at least one year of processing logs under Rule 8(3), and erasure that reaches the vector store.

  • Embeddings derived from documents about people are personal data processing, not anonymous vectors.
  • Enforce the user's document permissions at retrieval time; cross-user retrieval is a personal data breach risk.
  • Redact or tokenise personal data at ingestion when the assistant does not need it to answer.
  • Key every chunk and vector to its source document so erasure can delete all derived copies.
  • Retrieval logs — which chunks were shown to whom — are core Rule 6(1)(c) evidence.
  • Where answers feed decisions about people, section 8(3) requires reasonable accuracy and completeness.

Who this is for: Teams building internal knowledge assistants, Customer support chatbot builders, Platform and search engineers, CISOs, Data Protection Officers

Where does personal data live in a RAG system?

Retrieval-augmented generation makes personal data harder to see, not less present. A typical knowledge assistant copies data into at least seven places:

  1. Source systems — wikis, drives, CRM, ticketing, HR systems.
  2. Ingestion staging — extracted text and OCR output.
  3. Chunk store — the text segments, often with metadata such as author and customer name.
  4. Vector index — embeddings of each chunk. These are derived from personal data and, with the chunk text alongside, can be used to recover it.
  5. Prompt context — chunks sent to the model with the user's question.
  6. Model provider — processing and any retention on the vendor side.
  7. Conversation logs, caches and feedback datasets.

Under the DPDP Act, every one of these is processing of digital personal data, and the Data Fiduciary (you, or your customer if you are a SaaS processor) is responsible for all of them, including the parts run by vendors (section 8(1)).

Two RAG types carry different risk. An internal assistant over company documents mostly processes employee and customer data under existing purposes; its main risk is over-broad retrieval. A customer-facing bot over a user's own account data processes her data for her request; its main risk is returning someone else's data.

Permission-aware retrieval: the control that matters most

The most common RAG data incident is retrieval that ignores the source system's permissions. An intern asks the HR assistant a vague question and receives chunks from salary files. A customer's support bot query returns a chunk from another customer's ticket. Either can be a personal data breach under the Act — unauthorised disclosure compromising confidentiality — triggering Rule 7 intimation to affected people and the Board.

Design pattern

  • Carry ACLs into the index. Store allowed_principals or group IDs with each chunk at ingestion, synced from the source system.
  • Filter before ranking. Apply the user's entitlements as a hard filter in the vector query, not as a post-filter on the top results.
  • Re-check on fetch. Before inserting a chunk into the prompt, verify the user still has access in the source system for sensitive collections.
  • Tenant isolation. For multi-tenant SaaS, use separate indexes or mandatory tenant filters enforced in the data layer, and test them.
  • Sync deletions and permission changes promptly; stale ACLs are a breach waiting to happen.

Test it

Write automated tests where users with known entitlements ask questions designed to pull restricted content, and fail the build if any restricted chunk is retrieved. Rule 6(1)(b) requires appropriate access control over the computer resources involved; for RAG, the retrieval layer is that control.

Ingestion: minimise before you index

The cheapest personal data to protect is data you never indexed.

  • Scope collections. Decide which sources the assistant needs. A policy assistant does not need the HR case-management system.
  • Classify documents at ingestion — public, internal, confidential, personal — and exclude or route sensitive classes to restricted indexes.
  • Redact or tokenise personal data that the assistant does not need to answer questions: phone numbers, account numbers, addresses, ID numbers in scanned forms. Rule 6(1)(a) names masking, obfuscation and virtual tokens.
  • Strip metadata that is not needed, such as author emails on every chunk.
  • Handle children's data carefully: section 9(3) bars behavioural monitoring of children, so do not build profiles of child users from chat histories.
  • Record lineage — source_system, source_doc_id, ingested_at, classification, data_principal_ids where known — on every chunk.

For customer-facing assistants over account data, prefer retrieval at query time from the source API under the user's session, instead of pre-indexing everyone's records into a shared vector store. It keeps the source system's access control in charge.

Generation: accuracy, notice and vendors

Accuracy for decisions

Section 8(3) requires a Data Fiduciary to ensure the completeness, accuracy and consistency of personal data where it is likely to be used to make a decision affecting the Data Principal or disclosed to another Data Fiduciary. If an assistant summarises a customer's history for a credit, claims or HR decision, grounding and citation are compliance controls, not just quality features. Show source links, keep the retrieved chunks in the log, and require human review for decisions.

Notice

Your Rule 3 notice should describe AI-assisted processing where personal data is used, with an itemised description of data and the purpose. For internal assistants, update the employee privacy notice.

Model and embedding vendors

Embedding APIs, model APIs and hosted vector databases are Data Processors. Under section 8(2) and Rule 6(1)(f), contract for: no use of your data to train their models, retention limits, deletion on instruction, breach notice fast enough for a 72-hour Board report, sub-processor transparency and region. See AI vendor due diligence.

Output controls

Add output filters that block identifiers the user should not see, and refuse to answer questions about named individuals outside the assistant's purpose.

Logging and retention for RAG

Rule 6(1)(c) requires visibility on the accessing of personal data through logs, monitoring and review. Rule 8(3) requires personal data, traffic data and processing logs to be retained for at least one year from processing. For RAG, log:

FieldWhy
Request ID, timestamp, user or pseudonymous IDWho asked, when
Purpose ID and assistant IDTies processing to a stated purpose
Retrieved chunk IDs and source doc IDsWhat personal data was accessed
ACL decision (allowed/filtered counts)Evidence the permission filter ran
Model and version, vendor regionProcessor and transfer record
Output hash or redacted outputInvestigating disclosures
Feedback and escalationQuality and grievance trail

Store full prompt text and outputs in a short-lived debugging tier with restricted access, and the structured log above in a one-year tier. Alert on anomalies such as one user retrieving unusually many documents about different people. See LLM logging and observability.

Erasure in vector stores and caches

When a source document is deleted, or a Data Principal's erasure request is accepted under section 12, every derived copy must go:

  1. Delete by key. Remove chunks and vectors by source_doc_id; for person-level requests, by data_principal_id where tagged.
  2. Reindex where needed. Some vector databases mark deletions lazily; confirm the data is actually purged on compaction.
  3. Clear caches. Semantic and response caches may hold answers built on the deleted content.
  4. Remove from feedback and evaluation sets.
  5. Notify processors. Hosted vector databases and model vendors must erase on your instruction (s.8(7)).
  6. Record completion with timestamps for each store.

Keep any copy needed for the Rule 8(3) one-year minimum in a restricted archive, not in the searchable index. See erasure requests and LLMs.

Further reading on suhasbhairav.com

Before 13 May 2027

Compliance checklist

  1. Scope source collections

    List each source the assistant indexes and drop those it does not need for its purpose.

    Section 6(1)

  2. Carry source ACLs into the index

    Store permissions with every chunk and filter by the user's entitlements inside the vector query.

    Rule 6(1)(b)

  3. Test for cross-user and cross-tenant retrieval

    Add automated tests that fail the build if restricted chunks are retrieved.

    Rule 6(1)(b), (g)

  4. Redact personal data at ingestion

    Mask or tokenise identifiers the assistant does not need.

    Rule 6(1)(a)

  5. Tag lineage on every chunk

    Record source system, document ID, classification and Data Principal IDs where known.

    Section 8(7)

  6. Log retrievals and keep logs for a year

    Capture chunk IDs, ACL decisions, model and user for each request in a one-year log tier.

    Rule 6(1)(c); Rule 8(3)

  7. Contract embedding and model vendors

    Prohibit training on your data and set retention, deletion, breach notice and region terms.

    Section 8(2); Rule 6(1)(f)

  8. Build erasure across index, caches and vendors

    Delete by source and person keys, purge caches and collect vendor confirmations.

    Sections 8(7), 12

  9. Require citations and human review for decisions

    Show sources and keep a human decision-maker where outputs affect a person.

    Section 8(3)

Key dates

  1. DPDP Rules notified

  2. Safeguards, retention and erasure duties apply to RAG systems

Answers

Frequently asked questions

Are embeddings personal data under the DPDP Act?

Embeddings derived from text about identifiable people are produced by processing personal data and, stored with chunk text and metadata, can reveal it. Treat them as personal data: secure them under Rule 6, retain logs under Rule 8(3), and delete them when the source data is erased.

How do I stop a RAG chatbot leaking data to the wrong user?

Carry the source system's permissions into the index and apply the user's entitlements as a hard filter in the vector query, before ranking. Isolate tenants, sync permission changes promptly, and add automated tests that fail if restricted chunks are retrieved.

Is a RAG data leak a personal data breach?

Yes, if the assistant discloses personal data to someone not authorised to see it. Rule 7 requires intimation to each affected Data Principal and to the Board without delay, with a detailed report within 72 hours. There is no materiality threshold in the Rules.

How long should I keep chatbot conversation logs?

Rule 8(3) requires personal data, traffic data and processing logs to be kept for at least one year from processing, then erased unless another law requires longer. Keep structured retrieval logs for a year and full transcripts in a restricted, shorter-lived tier where possible.

How do I delete a person's data from a vector database?

Tag each chunk with its source document and, where known, the Data Principal IDs it concerns. On erasure, delete by those keys, confirm the database purges deleted vectors, clear semantic caches and feedback sets, and obtain deletion confirmation from any hosted vector database provider.

Do I need to tell users that a chatbot uses AI?

The DPDP Act does not have an AI disclosure clause, but your Rule 3 notice must describe the personal data and purposes clearly, which should cover AI-assisted processing. Sector rules and the EU AI Act's Article 50 may require explicit disclosure that users are interacting with AI.

Legal references and sources

  • Digital Personal Data Protection Act, 2023 — Sections 8(3), 8(5), 8(7) (official text)
  • Digital Personal Data Protection Rules, 2025 — Rule 6 (official text)
  • Digital Personal Data Protection Rules, 2025 — Rule 7 (official text)
  • Digital Personal Data Protection Rules, 2025 — Rule 8(3) (official text)

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

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.