Prompt library Civil servants, Introductory, Across government, Staying safe

Replace personal details with placeholders

Swap names, CNIC numbers, phone numbers and addresses in a text for placeholders, with a list of what was replaced.

Last reviewed: . Reviewer: Muhammad Asadullah.

Before you paste anything: replace names, CNIC numbers and other personal details with placeholders and never use classified material. Use only AI tools your department allows.

When to use it

You want to use a text with an AI tool, but it contains names, CNIC numbers or other details that identify people. Run this prompt only in a tool your department has approved for that data. If you do not have one, remove the details by hand first, because pasting the original into a public chatbot shares the very data you are trying to protect.

The prompt

Replace every detail in the text below that could identify a person with a placeholder. Do not change anything else in the text.

Replace:
- names of people with [PERSON 1], [PERSON 2] and so on
- CNIC numbers with [CNIC]
- phone numbers with [PHONE]
- email addresses with [EMAIL]
- house or postal addresses with [ADDRESS]
- account, file, case or registration numbers linked to a person with [NUMBER]
- any other detail that could identify a person, such as a job title held by only one person or a very specific description, with [DETAIL]

Use the same placeholder each time the same person or detail appears. Do not add, remove or reword any other content. Do not guess at details that are not in the text.

After the text, give a table with two columns: placeholder and type of detail replaced (for example "name" or "phone number"). Do not repeat the original details in the table. If you are unsure whether something identifies a person, replace it and mark that row [CHECK].

Text:
[Paste the text]

How to fill it in

  • Check first that the tool you are using is approved by your department for this kind of data. If it is not, do the replacement by hand.
  • Paste the full text, so the same person gets the same placeholder throughout.
  • Keep your own private key of which placeholder stands for whom, outside the AI tool.

Before you use the result

  • Read the whole text again yourself. AI tools miss details, especially names written in Urdu or unusual formats.
  • Look for details that identify someone indirectly, such as a rare post, a village name or a date of an incident.
  • Only then use the cleaned text with another AI tool. See data minimisation and anonymisation.

Related guide: Using AI safely.