← All news and guides
Data protection

DPDP-Compliant AI Architecture: Where Prompts, Embeddings and Logs Live

Where personal data lives in a chatbot, RAG or agent: prompts, vector stores, logs, caches and fine-tunes, and how to control, keep and erase each under DPDP.

Mono Team ·

An empty engineering office in Bengaluru at night, rows of desks with closed laptops and a glass-walled server room glowing faintly blue at the far end.

Short answer: a DPDP compliant AI feature is one where you know every place personal data goes, and each of those places has an owner, a purpose, access control, a retention period and a way to erase. In a chatbot, RAG search or agent, personal data does not only sit in your database. It is copied into prompts, vector stores, the model provider's systems, outputs, logs and traces, eval datasets, caches and sometimes fine-tuned weights. The DPDP Act does not ban foreign AI APIs and does not require you to self-host a model. As of 19 November 2026 we found no country restricted under Section 16. What it asks is that you, as the Data Fiduciary, control all of those copies.

This guide is for engineering leads building AI features on personal data. It maps the data flow, goes through each store, then covers provider settings, cross-border transfers and architecture options. If your question is about staff using ChatGPT or Copilot at work, read our guide to ChatGPT at work under DPDP instead. The core duties discussed here, including notice, consent, rights, Rule 6 security, breach intimation, retention and Section 16 transfers, apply from 13 May 2027.

Where does personal data go in an AI feature?

Start with a map. Take one request through your system and write down every place the data is copied, stored or sent. For a support chatbot with retrieval, the flow usually looks like this:

  • 1. Input. The user types a message or uploads a file. It may hold names, phone numbers, Aadhaar or PAN, health details or someone else's data.
  • 2. Prompt assembly. Your code adds a system prompt, chat history, the user's profile, retrieved documents and tool results. The assembled prompt often holds more personal data than the user typed.
  • 3. Retrieval. A query embedding is matched against a vector store of chunks from tickets, contracts, CRM notes or knowledge articles.
  • 4. Model provider. The prompt goes to an API, an India-region deployment or your own model server, which may log or cache it.
  • 5. Output. The answer is shown to the user, saved to the conversation, written back into a ticket or CRM, or passed to a tool.
  • 6. Logs and traces. Your gateway, observability tool and app logs record the request. Many tracing tools store the full prompt and response by default.
  • 7. Eval datasets. Engineers copy real conversations into test sets to measure quality.
  • 8. Caches. Prompt caches at the provider, response caches in your stack and semantic caches keyed on embeddings.
  • 9. Fine-tunes. Some teams train or tune a model on transcripts. The data then lives inside the weights.

Each of these is a store or a transfer. Under the Act, processing includes collection, storage, indexing, retrieval, use and disclosure by transmission (Section 2(x)). So every step above is processing, and each needs to be on your data map. Our post on why DPDP starts with a data map covers how to build the map for the rest of your systems.

Is each AI store personal data, and who is responsible for it?

Long rows of grey metal archive shelves holding plain unlabelled boxes in a dim storeroom, one box pulled out on a lower shelf, soft light from a high window.

The Act defines personal data as any data about an individual who is identifiable by or in relation to that data (Section 2(t)). That test is wide. If a store can be linked back to a person, treat it as personal data. The Data Fiduciary decides the purpose and means of processing (Section 2(i)). A Data Processor processes on its behalf (Section 2(k)). The Fiduciary stays responsible for what its processors do (Section 8(1)) and needs a valid contract with each of them (Section 8(2)).

StorePersonal data?Usual rolesErasure difficulty
Prompts and chat historyPersonal data?: Yes, usuallyUsual roles: You are the Fiduciary, or a Processor if you are a SaaS serving a business customerErasure difficulty: Easy if keyed by user ID
Vector storePersonal data?: Yes: chunk text and metadata are stored with the vectorsUsual roles: Same as the source dataErasure difficulty: Moderate: delete by source ID, then confirm the index has dropped them
Model providerPersonal data?: Yes, while it holds the promptUsual roles: Provider is usually your Data Processor; check the contractErasure difficulty: Depends on provider retention settings
Outputs saved back to systemsPersonal data?: YesUsual roles: Same as the system they land inErasure difficulty: Easy if tagged with source
Logs and tracesPersonal data?: Often yesUsual roles: You, plus your observability vendor as ProcessorErasure difficulty: Hard if logs are locked and hold full text
Eval datasetsPersonal data?: Yes, if copied from real useUsual roles: YouErasure difficulty: Hard if copies sit in notebooks and buckets
CachesPersonal data?: Yes, while liveUsual roles: You, or the provider for its prompt cacheErasure difficulty: Easy with short expiry
Fine-tuned weightsPersonal data?: Treat as yesUsual roles: You, and the training vendor as ProcessorErasure difficulty: Very hard: retrain without the data

Two points need care. First, if a provider uses your prompts to train its own models, it is using the data for its own purpose, and its role may no longer be a simple processor. Turn that off, and ask counsel how to describe the provider in your contracts. Second, if you are a SaaS company running AI on your customers' data, you are usually their Data Processor. Your customers will then ask you every question in this guide.

Can you delete a person from embeddings, indexes, caches and fine-tuned weights?

Section 8(7) asks the Fiduciary to erase personal data when consent is withdrawn or the purpose is no longer served, unless another law requires it to be kept, and to make its processors erase it too. Section 12 gives the Data Principal a right to ask for erasure. For an AI feature that means every copy, not just the primary database.

Embeddings and vector indexes

An embedding is a list of numbers, but it is rarely stored alone. Vector databases keep the chunk text and metadata next to it, and published research has shown that text can be partly reconstructed from some embeddings. Treat embeddings as personal data when the source is.

  • Store a source ID and a person ID on every chunk. For example `source_type`, `source_id`, `data_principal_ids[]`, `tenant_id`, `ingested_at`. Without these you cannot find what to delete.
  • Delete by filter, then verify. Delete every vector whose metadata matches the person or the source record, then run a query to confirm none remain.
  • Check that deletes are real. Some vector stores mark vectors as deleted and only remove them later, when a background clean-up or compaction job runs. Read your store's documentation, know how long that takes in your store and include it in your erasure timeline.
  • Re-ingest from the source of truth. If the source record is corrected or erased, re-chunk and re-embed.

Caches

Give every cache a short expiry and key it by tenant and user. Semantic caches match similar prompts, so one user's cached answer can reach another. Scope them per tenant, and per user where answers hold personal data. On erasure, flush entries tagged with that user.

Fine-tuned weights

No reliable method is known, as of November 2026, for removing one person's data from trained weights. Research on extracting training data has shown models can repeat parts of what they were trained on. The practical answer is to keep personal data out of fine-tuning sets: mask or synthesise it before training. If you must train on personal data, keep the training set versioned, record which people are in it, and plan to retrain without them when an erasure request arrives. Ask counsel how that delay fits your erasure duty.

Eval datasets

Eval sets are the copy teams forget. Build them from masked or synthetic data, keep them in one registered location, and give them a retention date.

How do you keep LLM logs for a year without hoarding prompts?

Rule 6(1)(c) asks for visibility on access to personal data through logs, monitoring and review. Rule 6(1)(e) asks you to keep those logs and personal data for one year to detect and investigate unauthorised access, unless another law requires otherwise. Rule 8(3) separately asks you to keep personal data, traffic data and other logs of processing for at least one year from the date of processing, including processing done by your Data Processors. CERT-In's Directions of 28 April 2022 ask for logs of ICT systems to be kept for a rolling 180 days within Indian jurisdiction.

But a year of full prompts and responses is a second copy of your customer data, usually less well guarded. Split the log into two layers:

LayerWhat it holdsRetention and access
Access and processing logWhat it holds: Request ID, time, tenant, user or service ID, feature, model, region, provider, token counts, retrieved source IDs, tool calls, outcomeRetention and access: At least one year in a write-once store; security team read access
Content logWhat it holds: Prompt and response text, masked at the sourceRetention and access: Retention set with counsel; tightly limited access; erasable by user ID

Mask Aadhaar numbers, PANs, phone numbers, card numbers and email addresses before anything is written, and test the masking on real Indian formats. Turn off full payload capture in tracing tools unless it is masked. Note that Rule 8(3) reads as a one-year minimum for personal data and processing logs, so do not set a short retention on content logs without counsel's view. Our post on one-year log retention on AWS, Azure and GCP covers the cloud settings.

What should an audit log for an AI feature keep, redact and delete?

The two-layer split above sets the structure. An audit log has a narrower job: to show later who did what through the AI feature, what the model saw and what it did, without holding the personal data itself. Plan it event by event.

EventKeepRedact or leave outHow long
User requestKeep: Request ID, time, tenant, user ID, feature, model and model version, prompt template version, region, providerRedact or leave out: The prompt text itself (it belongs in the masked content log, if anywhere)How long: At least one year (Rules 6(1)(e) and 8(3)); 180 days within India for CERT-In
RetrievalKeep: Source IDs and chunk IDs returned, the permission filter appliedRedact or leave out: Chunk text, which is a copy of the source documentHow long: Same as the request it belongs to
Tool calls and agent actionsKeep: Tool name, target system, record IDs touched, result code, whether a person approved itRedact or leave out: Payloads holding personal data, API keys and tokensHow long: At least one year
OutputKeep: Output ID, safety or masking checks that fired, whether a person edited or rejected itRedact or leave out: Response text, except in the masked content logHow long: At least one year for the event; content log retention set with counsel
Admin and config changesKeep: Who changed the model, prompt, retention, masking or access settings, and whenRedact or leave out: Secrets in the changed configHow long: At least one year
ErasureKeep: Request received, stores cleared, date verified, by whomRedact or leave out: The erased data, and anything that would rebuild itHow long: Long enough to prove the erasure; agree the period with counsel
  • Redact before writing, not after. Mask Aadhaar numbers, PANs, phone numbers, card numbers and email addresses in the code that writes the log, so raw values never reach the log store, tracing tool or backups.
  • Log IDs, not content. A source ID and a user ID let an investigator rebuild what happened from the primary systems, which have their own access controls and erasure.
  • Make the audit log write-once. Store it where application code and the people being audited cannot change or delete it, and log access to it.
  • Expire it on purpose. Set a lifecycle rule that deletes entries after the period you have decided, and write that period down. A log kept for ever is a store you must also defend.

For the storage settings on AWS, Azure and GCP, see our post on one-year log retention in the cloud. How long to keep content logs beyond the one-year minimum is a question for counsel.

Can you train or fine-tune a model on customer data under DPDP?

The Act has no special rule for AI training. Training on personal data is processing like any other, so the same three questions apply: what purpose, on what basis, and how you erase.

  • Purpose. Consent must be for a specified purpose and limited to the personal data that purpose needs (Section 6(1)). Serving a support chat and training a model on those chats are different purposes. If you plan to train, name training as a purpose in the notice; under Rule 3 the notice must itemise the data and purposes. Data collected for one feature should not drift into a training set because it is already there.
  • Basis. DPDP offers consent or the closed list of legitimate uses in Section 7. There is no legitimate interests basis, as there is under GDPR. For most commercial training, that leaves consent, and consent that is free and not bundled with the service. If you are a SaaS company acting as your customer's Data Processor, your contract with the customer decides whether you may train on their data at all. Using it to improve your own model may be a purpose of your own, which raises the role question in the section above. Ask counsel before you rely on any basis.
  • Withdrawal and erasure. Withdrawal must be as easy as giving consent (Section 6(4)), and processing must stop within a reasonable time after it (Section 6(6)). Section 8(7) then asks you to erase. Since one person cannot be reliably removed from trained weights (see the fine-tuned weights section above), the workable designs are to mask or synthesise personal data before training, or to keep a versioned training set that records who is in it and retrain without them on a schedule you can defend.

Whatever you decide, buyers will ask about it. Our post on answering "do you train on our data?" covers how to answer and what evidence to show. These duties start on 13 May 2027.

Which AI provider settings matter under DPDP?

Provider terms change often and differ by product, plan and region. Check the current official documentation and your signed contract, not a blog post. These are the settings to look for and record for every model provider and AI tool vendor in the flow:

  • Training use. Whether prompts and outputs are used to train or improve the provider's models, the default for your plan, and how to opt out in writing.
  • Retention. How long prompts and outputs are kept, including for abuse monitoring. Some providers offer zero or limited retention on request or for eligible accounts. Find out what is still kept even then.
  • Region. Where the model runs and where data is stored at rest. These can differ. Check whether the model and features you use are available in the region you pick.
  • Stored features. Conversation state, file stores, batch jobs and prompt caches can keep data longer than a plain request.
  • Breach notice and deletion. How fast the provider will tell you about a breach, and how you confirm deletion at the end of the contract.

Record these with the date checked. Rule 6(1)(f) asks for security safeguards in the contract with each Data Processor. Rule 7 gives you, not the provider, the duty to tell affected people and the Board without delay, with a detailed report to the Board within 72 hours, so the provider's notice period has to fit inside that.

Can I use US AI APIs under DPDP?

A long aisle in a data hall seen from floor level, bundles of grey and blue cables running overhead in trays toward a distant doorway, cool low light.

Yes, as the law stands in November 2026. Section 16(1) lets the Central Government restrict transfers to countries it notifies. That is a negative list: transfers are allowed unless a country is restricted. Section 16 itself comes into force on 13 May 2027, and as of 19 November 2026 we found no country notified under it. Check the Gazette before you rely on that. Rule 15 adds that the Government may set requirements, by general or special order, for making personal data available to a foreign State or entities under its control.

Three things still apply:

  • Sector rules. Section 16(2) keeps any Indian law that gives a higher degree of protection or restricts transfers. The RBI's direction of 6 April 2018 on storage of payment system data requires payment system providers to store the full end-to-end transaction data only in India, with an allowance for the foreign leg of a cross-border transaction. Its FAQ of June 2019 says banks are covered, and allows processing abroad if the data is deleted there and brought back to India within one business day or 24 hours of processing, whichever is earlier. If your AI feature touches payment data for a bank or payment company, design for that. Check your own regulator's rules too.
  • Customer contracts. Banks and large enterprises often restrict where their data may go, whatever the Act says. A US API can be lawful under DPDP and still breach your customer's contract.
  • Future notifications. The list can change. Separately, Rule 13(4) lets the Government name personal data that a Significant Data Fiduciary must not transfer outside India. As of 19 November 2026 we found no such order. Keep the provider behind your own gateway so you can switch region or vendor without rewriting the feature.

DPDP has no general data localisation rule and does not require you to self-host a model. The one localisation power in the Rules is Rule 13(4), which applies only to Significant Data Fiduciaries and only to data the Government specifies. Choosing an India region is a business, contract or sector decision, not a DPDP default.

Which AI architecture should you choose?

OptionHow it worksStrengthsTrade-offsFits when
Public API with controlsHow it works: Calls to a provider's API through your own gateway, with masking, training opt-out and limited retention where offeredStrengths: Best model choice; fast to build; low running effortTrade-offs: Data leaves India; you rely on provider terms and settings; some features store dataFits when: No sector or contract rule against offshore processing
API in an India regionHow it works: Same models or similar, hosted in an Indian cloud region by the provider or a cloud platformStrengths: Data processed and stored in India; easier answers for bank and regulated buyersTrade-offs: Fewer models and features in some regions; check each one; still a third-party processorFits when: Regulated buyers ask for in-country processing
Private or self-hosted modelHow it works: Open-weight model on your own cloud account or serversStrengths: Full control of logs, retention, region and deletion; no provider retentionTrade-offs: You run security, scaling, updates and evals; smaller models may be weakerFits when: Strict data rules, high volume, or a need to own the stack

You can mix them: a private model for steps that see raw personal data, such as masking, and a public model for steps that see only masked text. Either way, put a gateway in front so routing, masking and logging happen in one place. Our own your AI work covers the private option.

DPDP compliant AI checklist

  • 1. Map the flow. One diagram per AI feature, showing input, prompt assembly, retrieval, provider, outputs, logs, evals, caches and fine-tunes.
  • 2. Name the roles. For each store, who is Fiduciary and who is Processor, and the contract that covers it.
  • 3. Minimise the prompt. Send only the fields the task needs. Mask identifiers before the provider call where the task allows.
  • 4. Tag every chunk. Source ID, person ID and tenant ID on every vector, cache entry and eval record.
  • 5. Test erasure end to end. Erase a test user and confirm they are gone from the database, vector store, caches, content logs, evals and provider stores.
  • 6. Split the logs. A one-year, write-once access and processing log; a masked content log with retention agreed with counsel.
  • 7. Record provider settings. Training use, retention, region, stored features and sub-processors, with the date checked.
  • 8. Check transfers. Section 16 status, RBI or other sector rules, and customer contract limits for every region data reaches.
  • 9. Keep personal data out of fine-tunes. Or keep a versioned training set and a retrain plan.
  • 10. Control access. Role-based access to prompts, traces and vector stores, with the access itself logged.
  • 11. Update the notice. Tell people in plain language that AI processes their data, for what purpose. Legal wording goes to counsel.

Our DPDP and AI tools service maps these flows in your stack and fixes the gaps before 13 May 2027.

This article is general information, not legal advice. How your contracts describe each provider, how erasure and the one-year rules interact, and the wording of your notices are questions for your lawyers.

Sources: Digital Personal Data Protection Act, 2023, Sections 2(i), 2(k), 2(t), 2(x), 6, 7, 8, 12 and 16. Digital Personal Data Protection Rules, 2025, Rules 3, 6, 7, 8, 13 and 15 (G.S.R. 846(E), Gazette of India, 13 November 2025). CERT-In Directions under Section 70B(6) of the IT Act, 28 April 2022. Reserve Bank of India, Storage of Payment System Data, 6 April 2018, and FAQs on Storage of Payment System Data, 26 June 2019. Last reviewed 20 November 2026.

FAQ

What makes an AI feature DPDP compliant?

Knowing every place personal data goes in the feature, from prompts and vector stores to provider systems, logs, caches, eval sets and fine-tunes, and giving each one an owner, purpose, access control, retention period and a working erasure path. The DPDP Act's core duties for this apply from 13 May 2027.

Are embeddings personal data under the DPDP Act?

Treat them as personal data when the source text is. The Act covers any data about an individual who is identifiable by or in relation to it. Vector stores usually keep chunk text and metadata beside each vector, and research has shown text can be partly rebuilt from some embeddings.

Can I use US AI APIs under DPDP?

Yes, as the law stands in November 2026. Section 16 lets the Government restrict transfers to notified countries, and as of 19 November 2026 we found none notified. Sector rules still apply, such as the RBI direction that payment system data be stored only in India, and customer contracts may restrict offshore processing.

Does DPDP require self-hosting AI models or keeping data in India?

No. The DPDP Act and Rules have no general data localisation rule and do not require self-hosted models. Rule 13(4) lets the Government restrict transfer of specified data by Significant Data Fiduciaries, and as of 19 November 2026 we found no such order. You may choose an India region or a private model for sector rules, customer contracts or control, but that is a business decision, not a DPDP default.

How long should LLM logs be kept under DPDP?

Rule 6(1)(e) and Rule 8(3) set a one-year minimum for logs of access to and processing of personal data. Keep an access and processing log for a year in a write-once store, mask prompt text before logging, and agree content log retention with counsel.

Can a person be deleted from a fine-tuned model?

Not reliably with the methods known as of November 2026. The practical approach is to keep personal data out of fine-tuning sets by masking or synthesising it. If you must train on personal data, keep a versioned training set and plan to retrain without that person when an erasure request arrives.

Map where personal data flows in your AI features.