Case File: The Customer List in the Chat Box
A member of staff pasted a whole page of customer messages into a free online AI tool to get better replies. The messages held phone numbers, emails and bank account numbers. Text that goes into an online tool leaves your control, so personal details must be replaced before it is pasted. Split each message into words, strip the punctuation at the end of each word, and recognise an email (one @ with a dot in the domain), a phone (11 digits starting with 0, or +234 and 10 digits) and an account (exactly 10 digits). Replace each with a tag, keep the punctuation, and report what was found, which messages were unsafe and how many were clean. Run it on messages that you cannot see. The messages are generated for you alone.
Sabi Logistics · Desk 1
The Customer List in the Chat Box
A free online AI tool now holds a page of real customer phone numbers, and nobody knows what it does with them
Ngozi Compliance officer · Phone call
Ngozi. A member of staff wanted better replies to customers, so they pasted a whole page of customer messages into a free online AI tool. Some of those messages had phone numbers, email addresses and bank account numbers in them. I cannot get that text back. I want a rule that every message goes through before it is pasted anywhere.
I have a file of messages. Please find the emails, phones and account numbers in each, replace them with a tag, and tell me which messages were unsafe and how many were clean. I would like to know the exact rules that you used, because people will argue about a number with twelve digits.
The brief
What you need to know first.
- Words first. Split the message on white space. For each word, the core is the word without the punctuation at its end (any of
. , ; : ! ?); the removed punctuation is the tail and is kept in the output, so08031234567,becomes[PHONE],. - The three kinds. An EMAIL has exactly one
@, something before it and a dot inside what comes after it. A PHONE is 11 digits starting with 0, or+234followed by exactly 10 digits. An ACCOUNT is exactly 10 digits. A word of 12 digits (an order number) or 9 digits is not data of these kinds, and neither isada@shop(no dot after the @). - The order of the tests matters. An 11-digit word that starts with 0 is a phone, not an account; test the email first, then the phone, then the account.
- The output. The redacted text is the words joined by single spaces. Count the three kinds per message.
unsafeis the sorted ids of messages where anything was found;n_cleanis how many had nothing. - Fill in
scan(req)returning{"rows", "total_found", "unsafe", "n_clean"}, thenresultandtotal_found. The checks runscanon messages that you cannot see: a phone with a comma after it, a +234 number with a full stop, a ten-digit account, 12-digit and 9-digit numbers, a broken email, an empty message, and an empty list.
The lab gives you the data for this case, invented and generated for you alone.
Preparing your data…
On the bench
The lab checked the rule with a script. These are the checks that show the same thing in a real office.
| You want to | Do this | What you see |
|---|---|---|
| see what a tool does with the text you paste | Read the privacy page and the data settings of the tool: whether chats are used for training, how long they are kept and how to delete them | whether pasted text can be kept or used, which decides what may be pasted |
| test your redaction rule | Write ten invented messages with phones, emails, accounts and decoys and run the rule on them | what the rule misses, before a real message finds it |
| check the history and sharing settings | Open the settings of the account and see whether chat history is on and whether chats can be shared by link | copies of pasted text that stay in the account |
Practise with invented data only. Never paste real customer, patient, pupil or staff details into an online AI tool, and never rely on an assistant for a decision about money, health or law without a person checking it.
Ngozi: “The rule found 11 personal details in 17 messages. But a staff member says that people also write their numbers as 0803 123 4567 with spaces, and the rule misses those. Is the rule good enough to rely on?”
🔒 The debrief unlocks when you close the case. Finish the lab above.
The debrief
Ngozi: “So a rule like this catches the common cases, and I must not tell people that it catches everything.”
What a careful AI user would do next. Treat a redaction rule as a safety net, not a guarantee. It is good at fixed shapes (a bank account is ten digits) and bad at free text (a name, an address, “the lady in the blue house on Adeola street”). So layer the defences: do not paste personal data at all when you can avoid it (ask for a template reply and fill in the name yourself), use the business version of a tool that has a data agreement (no training on your data, retention limits, a place to delete), or run a model on your own computer for the sensitive jobs. Widen the rule over time with the formats that really appear (numbers with spaces or dashes, BVN and NIN patterns, names from your customer list), and test it with a list of nasty examples, as you did here. Write a one-page policy: what may go into which tool, who decides, and what to do after a mistake (tell the compliance officer the same day, ask the vendor to delete, note it in the log). Under the Nigeria Data Protection Act (NDPA 2023) a business that handles personal data has duties: a lawful reason, only what is needed, security, and telling the regulator about a serious breach; the details belong to your lawyer or data protection officer, not to this course. Train the staff with the real example (this one), and check the tool settings (history on or off, sharing links).
The trap. Believing that a rule that finds most of the numbers makes it safe to paste the rest. The names and the addresses are still there.
Write the redaction note
Write the note for the compliance officer: the rules that were used to find an email, a phone and an account (and why a 12-digit or a 9-digit number is not one), what the scan found in the messages (the total, the unsafe messages and the clean ones), what the rule cannot find (names, addresses, numbers with spaces), and what to do beyond a rule (avoid pasting personal data, a business version of the tool with a data agreement or a local model, widening and testing the rule, a short policy, training, what to do after a mistake, and the data protection law).
🧪 Want to practise this on your own computer? See how to set up your lab →