Skip to content
mentoor

Keeping PII out of LLM pipelines

For engineers

Keeping personal data out of prompts, logs, traces and vector stores in LLM apps with redaction, minimization, provider controls, retention and leak tests

See where you stand

110 questions across four stages: Understand, Apply, Solve and Judge.

Try 5 questions

Practice items, not counted towards your mastery. No account needed.

Check yourself · 1 of 5

What is the main benefit of replacing a name with a token like <PERSON_1> before the model call?

Choose one answer

Check yourself · 2 of 5

Why is an allowlist of fields safer than a denylist for building a prompt?

Choose one answer

Check yourself · 3 of 5

A provider says it does not train on your API data. What can you still conclude?

Choose one answer

Check yourself · 4 of 5

A user asks to delete their account. Their chats were also embedded into a vector index with no user_id metadata. What is the problem?

Choose one answer

Check yourself · 5 of 5

What is a canary in a PII leak test?

Choose one answer

Topics

  1. Detecting and redacting PII before the model5 min read · Regex, NER and LLM-based detectors such as Presidio, reversible pseudonymization tokens, and the PII they still miss
  2. Data minimization in prompts and context5 min read · Field allowlists for prompt builders, tool outputs and retrieval results so the model sees only what the task needs
  3. Provider data controls for API calls5 min read · Zero data retention, abuse-monitoring retention, regional processing, and turning off stored responses and files
  4. Retention for logs, traces and embeddings5 min read · Where PII lands in an LLM app, from traces and eval sets to vector stores and caches, and how to set TTLs and delete by user
  5. Testing pipelines for PII leaks5 min read · Seeded canary PII, log and output scanning, and redaction recall tests that run in CI

Start here

110 questions · last verified 2026-12