Dashboard

What Is PII? Personal Data Your AI App Must Not Leak

PII is information that identifies a person, alone or combined with other data. Here is what counts, where it leaks in AI apps, and a short checklist for keeping it contained.

Cecilia Iona
Cecilia Iona
Senior Editor, AI & Product
30 October 20261 min read

PII stands for personally identifiable information: any detail that can identify a specific person, either on its own or when combined with other details. A name, an email address, a phone number, a home address and a government ID number are the obvious ones. Less obvious ones count too, such as an IP address, a precise location, or a combination of job title, employer and city that only one person matches.

The key word is "combination". A postcode alone points at thousands of people. A postcode, a birth date and a gender can narrow it to one.

PII, personal data and sensitive data

Three terms get mixed up, and they are not identical.

  • PII is the common term in United States usage, and has no single universal definition.

  • Personal data is the legal term in the European Union. Article 4 of the GDPR defines it as any information relating to an identified or identifiable natural person, and it explicitly covers identifiers such as a name, an ID number, location data and an online identifier. It is broader than most people expect.

  • Sensitive data is a subset that carries extra risk if exposed: health details, financial account numbers, biometric data, and similar.

If your users are in the EU, treat the GDPR definition as the working one. It is the wider net, so anything caught by PII is almost certainly caught by it.

Common examples

  • Name, email address, phone number, postal address

  • Government and tax IDs, passport numbers

  • Payment card and bank details

  • IP address, device identifiers, cookie IDs

  • Photos of faces, voice recordings

  • Health, employment and education records

  • Free-text messages that mention any of the above

That last item catches people out. A support chat, a form "notes" field or an uploaded document is full of PII that nobody typed into a labeled column.

Follow one email address through your app

Take one customer, Maria, who signs up with maria@example.com and asks your AI chatbot a question. Here is where her email ends up in a typical AI-built app:

  1. The database. The expected place, in a users table.

  2. Application logs. A request log line or a debug console.log(user) prints the whole object, email included. Logs are often kept longer, and read by more tools, than the database.

  3. The error tracker. An exception thrown while handling her request ships the request body and user context to a third-party service.

  4. The prompt. Your code puts her profile, order history and message into the model's context so it can answer. Now her data is in a request to an AI provider.

  5. The vendor's side. The provider and any tool in the chain may keep prompts for some period, according to their own policies and your plan.

That is five copies, in five places, with five different retention rules and owners. When Maria asks you to delete her data, you have to find all of them. This is the real PII problem for small teams: not "what is PII" but "where did it get copied".

Practical rules for AI apps

Minimize what goes into prompts. The model usually needs the question and the relevant facts, not the whole customer record. Send a first name and an order status, not the full profile. Replace identifiers with placeholders where the answer does not depend on them, and put the real value back afterward in your own code.

Keep PII out of logs. Log ids, not objects. Configure your error tracker to scrub fields like email, phone and address before sending. Search your codebase for console.log of whole user or request objects. The related habit of logging AI API calls safely is worth adopting early.

Check your vendor terms. Find out how each AI provider handles your prompts: retention, training use and region. How to tell if an AI vendor is GDPR compliant walks through the questions.

Give deletion a path. Build the ability to find and remove one person's data across tables and tools. See GDPR data deletion for an AI-built app.

Say what you collect. A plain privacy policy that matches reality is part of the job.

Restrict who and what can read it. Give an AI coding agent access to test data, not a production copy. An agent that can read the live customer table can also paste it into a prompt, a commit or a log. See can an AI chatbot leak your customers' data for how it happens through the chat side.

What this is not

This is a practical explainer, not legal advice. Which laws apply depends on where your users live and what you collect, and for health, children's or financial data the rules get stricter. If you handle that kind of data, talk to a qualified professional before you launch.

A prompt to audit your own app

Search this codebase for places where personal data could be copied outside
the main database: logging statements, error reporting config, analytics
events, and any code that builds a prompt for an AI model. For each, list
the fields involved and propose the minimum needed. Do not change anything
yet, only report.

Read the report yourself. It tells you more than any checklist, because it is about your code.

FAQ

What does PII stand for?

Personally identifiable information. It is data that can identify a specific person, directly or when combined with other data.

Is an email address PII?

Yes. An email address usually identifies a person directly, and under the GDPR it counts as personal data.

Is an IP address PII?

It can be. The GDPR lists online identifiers among the things that make a person identifiable, and an IP address can identify a person in combination with other information.

Should I put customer data into AI prompts?

Only what the task needs. Send the minimum, replace identifiers where you can, and check your AI vendor's data terms first.

What is the difference between PII and personal data?

PII is the common US term with no single legal definition. Personal data is the EU legal term and is generally broader.

How did this land?

About the author

Cecilia Iona
Cecilia Iona

Senior Editor, AI & Product

Cecilia leads the Swarmz editorial desk. She has spent a decade turning complex AI and product topics into writing people actually finish, and she owns the blog's quality bar.

Share

Get the next post in your inbox

One email a month. Product updates, engineering posts, and the best of Built with Swarmz.

I agree to receive emails about AI building tips and Swarmz product news. Unsubscribe any time.