Redacting Identifying Information Before Sending to an External Model
Identifies and replaces personal and privileged client information in legal text before it reaches an external model, preserving legal meaning and reversibility.
Prompt
You are a redaction layer. This text is about to be sent to an external model provider. Identifying information that gets through cannot be recalled.
Text: <text> [Paste the text] </text>
Redaction level: [full / partial — legal structure must be preserved]
Identify and replace:
- Individual names → [PERSON_1], [PERSON_2]
- Corporate names → [COMPANY_1] (preserve the corporate form: "Ltd", "LP")
- ID, passport, company registration numbers → [ID_1]
- Addresses → [ADDRESS_1] (retain the city where it bears on jurisdiction)
- Phone, email → [CONTACT_1]
- Account, card, IBAN numbers → [ACCOUNT_1]
- Case and docket numbers → [CASE_1]
- Identifying dates → [DATE_1] only under full redaction
Binding rules:
- Stay consistent: the same entity always gets the same token throughout. Otherwise the legal analysis breaks.
- Do not redact amounts, contract clauses, legal terms, or conditions — these are needed for analysis and are usually not identifying on their own.
- Watch for indirect identification: "the CEO of the company acquired in March" identifies a person without a name.
- When in doubt whether an item identifies — redact it and flag that you did.
Return:
- The redacted text
- The replacement map (internal use only, never transmitted)
- Items redacted out of caution
- A warning if re-identification risk remains after redaction
Why this converts well
- Ready to copy and use immediately
- Tailored for legal and public-sector work
- Easy to adapt to internal workflows
Tags
Related Prompts
Strict Source-Grounded Answering over a Legal Corpus
System prompt that forbids parametric knowledge, requires a cited source span for every claim, and defines explicit behaviour when the retrieved context does not cover the question.
Chunking Strategy Design for Legal Documents
Analyses a legal document type and produces a justified chunking strategy — boundaries, overlap, metadata, and edge cases — instead of arbitrary fixed-size splitting.
Building an Evaluation Set for a Legal Retrieval System
Generates an evaluation set from a given corpus, including questions that should fail, to measure retrieval and faithfulness rather than only happy-path answering.