Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Redact the offending span in place and forward the rest; dropping the whole response wastes work, passing through risks regulatory exposure, and retrying burns cost without fixing the root cause.
Imagine a letter that turns out to have one sensitive sentence in the middle. You could shred the entire letter, but then the recipient loses the helpful parts that were fine. You could mail it anyway, but you might get sued. The sensible move is to take a marker, black out the one sensitive sentence, and send the rest. That is span-level redaction. The recipient still gets value from most of the letter, the sensitive bit never reaches them, and you keep an unredacted copy in a locked drawer for the security team to investigate why it appeared in the first place.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 min: the four reaction options, why span-level redaction wins on UX-safety trade-off, marker style choice, access-controlled audit logging, production implementations (Bedrock, Azure, Presidio), edge cases (streaming, multilingual).
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Dropping the entire response on every PII hit; the model may have produced a useful answer with one accidental span, and full-drop is a UX hammer where redaction is the scalpel.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.