Privacy, Company Data & the DPDP Act
Every prompt you type is sent to a company's servers. It may be stored, reviewed for safety, or, on some consumer plans, used to improve future models. That is fine for a recipe question. It is a serious problem when the prompt contains a customer's phone number, a patient's report or your company's unreleased financial results.
In this lesson you will learn what data is risky to share, how AI services handle your prompts, how to remove personal data before sending text to a model, and what India's Digital Personal Data Protection Act means when you use AI at work.
What not to paste
Treat a public AI chat like an email to a stranger: assume it could be read. Do not paste:
- Passwords, API keys, OTPs or any login details.
- Government ID numbers: Aadhaar, PAN, passport, voter ID.
- Financial details: bank account numbers, card numbers, UPI PINs.
- Health information about you or others.
- Other people's personal data: customer lists, student records, employee files, phone numbers.
- Confidential business information: unreleased results, contracts, source code, client documents, pricing plans, unless your organisation has approved the tool for that data.
How AI services treat your data
Policies differ by company and plan, and they change, so always read the current terms. Broadly:
| Plan type | Typical data handling |
|---|---|
| Free and personal plans | Chats are stored; some services may use them to improve models unless you switch this off in settings |
| Business, enterprise and education plans | Contracts usually promise not to train on your data, with admin controls and stronger security |
| APIs for developers | Data is usually not used for training by default; retention rules are set out in the provider's terms |
For example, Microsoft states that Copilot Chat used with a work (Microsoft Entra) account is covered by its Enterprise Data Protection terms, the same commitments that cover company email and files. That is why using your organisation's approved account is safer than pasting work files into a personal account.
Practical settings to check in any assistant: whether chats are used for training, how long history is kept, whether "memory" is on, and how to delete chats.
Redacting personal data before you send it
Often you can get the help you need without the personal details. Replace them with placeholders first. This program finds common Indian identifiers with regular expressions:
import re
PATTERNS = [
("EMAIL", r"[\w.+-]+@[\w-]+\.[\w.]+"),
("PAN", r"\b[A-Z]{5}[0-9]{4}[A-Z]\b"),
("AADHAAR", r"\b[2-9]\d{3}\s?\d{4}\s?\d{4}\b"),
("PHONE", r"(?:\+91[\s-]?)?\b[6-9]\d{9}\b"),
]
def redact(text):
for label, pattern in PATTERNS:
text = re.sub(pattern, f"[{label}]", text)
return text
complaint = """Customer Priya Sharma (PAN ABCDE1234F, Aadhaar 2345 6789 0123)
called from +91 9876543210 and wrote to priya.s@example.com about a failed
refund of Rs 4,250 on order 778812."""
print(redact(complaint))Customer Priya Sharma (PAN [PAN], Aadhaar [AADHAAR]) called from [PHONE] and wrote to [EMAIL] about a failed refund of Rs 4,250 on order 778812.
The order number and amount are kept, because the model needs them to draft a reply, while the identifiers are replaced. Pattern-based redaction is a safety net, not a guarantee: it cannot catch everything (this example still contains the customer's name), so read the text before you send it.
Pseudonymisation you can reverse
Sometimes you need the names back afterwards, for example when the AI drafts letters to several customers. Pseudonymisation replaces each name with a code, keeps the mapping on your own computer, and restores the names in the reply:
names = ["Priya Sharma", "Rohan Mehta"]
mapping = {name: f"PERSON_{i}" for i, name in enumerate(names, start=1)}
def hide(text):
for name, code in mapping.items():
text = text.replace(name, code)
return text
def reveal(text):
for name, code in mapping.items():
text = text.replace(code, name)
return text
prompt = hide("Write a short apology to Priya Sharma and a thank-you to Rohan Mehta.")
print("Sent to AI: ", prompt)
ai_reply = "Dear PERSON_1, we are sorry for the delay. Dear PERSON_2, thank you for your patience."
print("Shown to you:", reveal(ai_reply))Sent to AI: Write a short apology to PERSON_1 and a thank-you to PERSON_2. Shown to you: Dear Priya Sharma, we are sorry for the delay. Dear Rohan Mehta, thank you for your patience.
The AI service never sees the real names, but your final text has them.
India's DPDP Act and AI use
The Digital Personal Data Protection Act, 2023 (DPDP Act) governs how organisations handle digital personal data of people in India. The government notified the DPDP Rules in November 2025, with duties coming into force in phases over about 18 months. The Act uses two key terms: the data principal is the person the data is about, and the data fiduciary is the organisation that decides why and how the data is processed.
What it means when you use AI with personal data at work:
- Purpose and consent: personal data may be used for the purpose people agreed to (or another lawful purpose). Pasting customer data into an AI tool for a new purpose may not be covered.
- Data minimisation: use only the data you need, which is exactly what redaction does.
- Security safeguards: the organisation must protect personal data, including when it sends data to a service provider, for example the company behind an AI tool.
- Children: processing data of anyone under 18 needs verifiable parental consent.
- Breaches: personal data breaches must be reported to the Data Protection Board of India and to affected people.
- Penalties: fines can reach ₹250 crore for failing to take reasonable security safeguards.
A simple workplace checklist
Before using AI with work material, ask:
- Is this tool approved by my organisation for this kind of data?
- Does the text contain personal or confidential data? Can I remove it?
- Am I signed in with my work account, not a personal one?
- Would I be comfortable if this prompt were read by my manager or the customer?
Common mistakes
- Pasting a whole customer spreadsheet to "find insights". Share structure and made-up samples instead.
- Putting API keys in prompts or code you share. Keep keys in environment variables.
- Using personal accounts for work data because they are convenient.
- Assuming deleting a chat deletes everything. Providers may keep data for a period under their terms.
Key points
- Never paste passwords, ID numbers, financial or health data, or confidential business data into unapproved tools.
- Consumer plans may use chats for training unless you opt out; business plans and APIs usually do not by default.
- Redact or pseudonymise personal data before sending it, and read the text yourself as well.
- The DPDP Act requires lawful purpose, minimal data, security safeguards, care with children's data and breach reporting.
- Use your organisation's approved AI tools with your work account, and follow its policy.
Exercise
Add a pattern for Indian vehicle registration numbers such as "MH 12 AB 1234" or "DL3CAB1234" to PATTERNS, labelled VEHICLE. Test redact on: "Kabir's car MH 12 AB 1234 was towed; call 9123456780."
Show solution
import re
PATTERNS = [
("EMAIL", r"[\w.+-]+@[\w-]+\.[\w.]+"),
("PAN", r"\b[A-Z]{5}[0-9]{4}[A-Z]\b"),
("AADHAAR", r"\b[2-9]\d{3}\s?\d{4}\s?\d{4}\b"),
("PHONE", r"(?:\+91[\s-]?)?\b[6-9]\d{9}\b"),
("VEHICLE", r"\b[A-Z]{2}\s?\d{1,2}\s?[A-Z]{1,3}\s?\d{4}\b"),
]
def redact(text):
for label, pattern in PATTERNS:
text = re.sub(pattern, f"[{label}]", text)
return text
print(redact("Kabir's car MH 12 AB 1234 was towed; call 9123456780."))
print(redact("Vehicle DL3CAB1234 is parked at gate 2."))Kabir's car [VEHICLE] was towed; call [PHONE]. Vehicle [VEHICLE] is parked at gate 2.
The new pattern allows an optional space between the state code, district number, letter series and the four-digit number, so both common ways of writing a number plate are caught.
Quick Quiz
1. Which of these is safe to paste into a public AI chat?
Only content without personal or confidential data is safe in an unapproved public tool.
2. What does pseudonymisation do?
The AI sees only codes, and you restore real names locally afterwards.
3. Under the DPDP Act, who is the "data fiduciary"?
The data principal is the person; the data fiduciary is the organisation responsible for the processing.
4. Why use your work account instead of a personal account for work tasks?
Business plans generally promise not to train on your data and add security controls.
Learn Generative AI with a mentor
Free lessons get you started. Our AI Training & Workshops training adds real projects and code reviews from working developers.
- Project-based learning
- Mentor code reviews
- Free counselling call
