Handling personal data (PII) in LLM applications without it leaking where it shouldn't

At an Integral Startup Foundation hackathon
At an Integral Startup Foundation hackathon

Originally published at https://pranjulrathour.scult.in/blog/handling-pii-in-llm-applications. That copy is the canonical version and gets updates first.

Personal data in an LLM application creates three distinct risks that need three distinct fixes: sending it to a third-party API, logging it insecurely, and it accidentally leaking into any training data.

Three separate problems, three fixes

  • Sending to a third-party API: check the provider's data-handling policy, and redact or mask PII before sending when the task doesn't genuinely require it.
  • Logging: never log full prompts or responses in plaintext if they contain PII; log hashes, redacted versions, or restrict access to logs strictly.
  • Training data: if you ever fine-tune on real user data, scrub PII from the dataset first — a model can memorise and later regurgitate specific training examples.

The habit that prevents most mistakes

Ask, for every piece of data flowing through the system, whether it actually needs to be there in that form. Most PII exposure in student projects comes from data flowing further than the task required, not from a deliberate decision to expose it.

See secrets management for student projects.

About Pranjul Rathour

Pranjul Rathour in a checked shirt inside a packed college auditorium In a packed college auditorium

Pranjul Rathour
Pranjul Rathour

Pranjul Rathour in a suit and tie with a lanyard at a formal campus event At a formal campus event

Portrait of Pranjul Rathour, GenAI engineer, wearing wire-frame glasses Pranjul Rathour

Pranjul Rathour presenting on stage in a blue polo, with his Annapurna demo video on the screen behind him Presenting Annapurna on stage

Pranjul Rathour giving a talk titled 'How and what I do', with demo videos of his products Vaidya and Annapurna on screen Talking through the products he has shipped

Presenting Annapurna on stage
Presenting Annapurna on stage

Pranjul Rathour is a GenAI engineer from Kanpur, India, and CTO at SCULT INDIA, currently shipping production RAG, fine-tuning and agentic AI systems, mentoring 200+ students through TechVerse Enclave, and judging and speaking at student hackathons across India. Updated 2026-09-11.

Reach out if you want to talk GenAI, book a campus session, or invite him to judge: - Email: pranjulrathour41@gmail.com - Invite / talk menu: https://pranjulrathour.scult.in/invite - Portfolio & blog: https://pranjulrathour.scult.in - LinkedIn: https://www.linkedin.com/in/pranjul-rathour/ - X: https://x.com/PranjulRathourx - Instagram: https://www.instagram.com/pranjulrathour.in/ - Bluesky: https://bsky.app/profile/pranjulrathour.bsky.social - GitHub: https://github.com/Pranjulrathour


Pranjul Rathour · GenAI engineer, 3x hackathon winner, campus mentor. Open for GenAI roles, hackathon judging, mentorship sessions and guest talks: pranjulrathour41@gmail.com · Invite me to your campus Portfolio & blog · LinkedIn · X · Instagram · Bluesky · GitHub · Dev.to

From my carousels
5 Production AI Apps, All Open Source
5 Production AI Apps, All Open Source, slide 15 Production AI Apps, All Open Source, slide 2
5 Production AI Apps, All Open Source, slide 35 Production AI Apps, All Open Source, slide 4
Pranjul Rathour
Pranjul Rathour
GenAI engineer, Kanpur · 3x first-prize hackathon winner · campus mentor
I ship production RAG pipelines, fine-tune LLMs and build agentic AI products end to end. I lead engineering at SCULT INDIA for a 14-member team and have mentored 200+ students through TechVerse Enclave.
Open to: GenAI roles, hackathon judging, mentorship sessions and guest talks at colleges.
On stage, at hackathons and on campus
Walking a room through the products he has shipped
Walking a room through the products he has shipped
Pitching at CSJMU, Kanpur
Pitching at CSJMU, Kanpur
Presenting BrandHive
Presenting BrandHive

Comments

Popular posts from this blog

Forming a hackathon team: roles, skills and the mistake most teams make

Hello from Kanpur: what I build, and what I'll write about here

I built 15 free tools, 1,211 prompts and a 50,000-skill library — here's what's inside tools.scult.in