How do you handle PII in AI systems? A developer outlined a lifecycle approach to handling personally identifiable information in AI systems, treating PII as a data-minimization problem before it becomes a filtering one. The guidance covers stripping unnecessary fields before prompts, detecting and redacting or tokenizing sensitive values ahead of vector stores, traces and logs, and testing redaction recall against labeled examples including obfuscated formats. It also recommends reviewing provider retention and training terms and building deletion workflows that span application records, logs and vector indexes. Whether you can apply PII controls across data collection, model prompts, logs, storage, retention, and deletion while testing redaction effectiveness. I would treat PII as a data-minimization problem first, not only as a filtering problem. Before sending data to a model, I need to know whether the prompt actually needs each field, so I remove names, contact details, or account identifiers when they are not necessary. I would also review provider retention and training terms to confirm that submitted data is not retained or used in ways the application cannot accept. No model or provider setting makes unnecessary data safe to collect. Next, I would detect and handle PII before it reaches prompts, vector stores, traces, or application logs. Detection can cover structured identifiers and patterns such as email addresses, phone numbers, and payment information. Redaction replaces sensitive values with placeholders, while tokenization can create reversible references when the application needs to restore a value later. I would prefer a deterministic rule for well-defined fields and a tested model-based detector for more varied text. Whatever I use, I would keep the original mapping outside the prompt and logs. Security controls must cover the rest of the data lifecycle. I would encrypt data at rest and in transit, restrict access to sensitive mappings, apply retention limits, and build a workflow for deletion requests across the application, logs, and vector indexes. I would test redaction recall with labeled examples, including obfuscated and unusual formats, because missed PII can expose sensitive data in logs. I would also monitor detection failures and review any change to the pipeline with the same tests. What is the difference between redaction and tokenization? Redaction replaces the sensitive value so it cannot be restored directly. Tokenization substitutes a reference that a separate authorized system may map back to the original value when the application needs it. How do I test whether my PII redaction works? I would use a labeled set that includes common identifiers, unusual formats, and obfuscated values, then measure how many sensitive values escaped into prompts and logs. I would review false positives as well. What should a deletion workflow cover? It should identify the relevant application records, logs, vector indexes, and retained mappings so the deletion request can be handled consistently rather than only removing one database row. This article was prepared with AI assistance and reviewed before publishing. The original lives on the free question bank: