Personal Data Hidden in Support Memos and Remarks Fields: Can AI Find and Replace It?

· DataMint · 7 min read

You converted every resident registration number (RRN, Korea's national ID number) and phone number column in the customer table. You marked it done on the checklist. Then you open the memo column of the support history table and find this.

홍길동 고객(900101-1234568) 본인 확인 후 카드 분실 신고 접수.
연락처 010-1234-5678로 회신 요청. 배우자 김영희 님이 대신 받을 수 있음.

(A made-up sample in Korean. It reads: "Customer Hong Gildong (900101-1234568), identity verified, lost card report received. Asked for a call back at 010-1234-5678. Spouse Kim Younghee can take the call instead.")

The column is named MEMO and its type is a long string. It was not on the list of personal data columns. Every system has columns like this, and they are usually found last.

To answer the question first: yes, it can be found and replaced. But numbers and names are found in different ways, and AI should handle only part of the job. Leaving all of it to AI makes the result worse.

Personal data also lives outside columns

Where people type by hand, they write about people. These are the places we have seen most often.

  • Memos and handling notes in support and complaint histories
  • Remarks and special notes, one of which exists in almost every table
  • Delivery requests in shipping tables ("if I am out, call 010-...")
  • Opinions in review and approval tables
  • Whole messages (JSON, XML) stored in interface tables
  • Attached documents stored as files in the database (application forms, contracts, Excel rosters)

Emptying these fields entirely is one option. But to test features that read memos to classify them, or search features, there has to be content. So you need a way to keep the sentences and replace only the personal data.

Numbers are found with rules

RRNs, phone numbers, card numbers, account numbers and email addresses have a set shape. They have a length, separators, and many have a check digit. These are found faster and more accurately with patterns and check formulas.

It can be tempting to hand numbers to an AI model as well, but we do not recommend it. When we measured it ourselves, the model did not find any additional numbers that the rules had missed, and instead it mistook barcodes and product model names for RRNs and passport numbers. Numbers are better verified by calculation than by context.

Names and addresses are found from context

Names have no shape. In Korean text, a name with an honorific attached, as in "김영희 님" (roughly "Ms. Kim Younghee"), can be found with rules, but the given name alone in a sentence like "Youngsoo says he will receive it instead" cannot. In the other direction, ordinary words such as 고객 ("customer") and 정상 ("normal") must not be picked up as names, even though 고 and 정 are also family names. With a list of family names alone, every word that starts with 한, 정 or 고 gets caught.

This is the part for AI. The technique of picking out things like person names, addresses and organization names from sentences is called named entity recognition. It judges from what comes before and after in the sentence, so it also finds names without an honorific.

What is found with what
TargetMethodReason
RRN, card number, business registration numberPattern + check digitCan be verified by calculation
Phone number, email, account numberPattern + surrounding wordsThe shape is fixed
NameAI modelNo shape, known only from context
AddressPattern + AI modelStreet names by pattern, building names and unit numbers by context

One thing has to be pointed out here. If you send memos to an external AI service to find personal data, you are sending personal data outside in order to protect it. The model has to run inside the company's own servers. A large model is not needed for this purpose. A small model is enough to pick out names and addresses.

After finding: the same value as the column

What you replace it with matters as much as finding it. If a number in a memo is replaced with any random number, this happens.

When the column and the memo are converted separately
LocationOriginalConverted
CUSTOMER.RRN900101-1234568900101-1947305
Inside the support memo900101-1234568900101-2205817

The customer table has a person whose number ends in 1947305, but that person's support memo has a different number in it. Test a feature that looks up the customer by the number in the memo, and nobody comes back. The values in memos have to be converted with the same rule and the same key used for the columns for the two places to match.

What about attached documents

Documents stored as files in the database need one more step. The file has to be opened, the text taken out, replaced, and saved again in the same format. Word, Excel, PowerPoint and HWPX (Hangul word processor documents) are compressed XML inside, which makes this possible.

The problem is files whose text cannot be taken out, such as scanned images and PDFs. They cannot be read, so there is no way to know what is in them. Move such files as they are, and copies of ID cards go into the test database. For files that cannot be read, the safe choice is to empty them instead of moving them.

Some things are not found

It would be a lie to say this approach finds everything. Here are cases it actually misses.

  • Misspelled names, and names written only as initial consonants (in Korean, "ㄱㅇㅎ 고객", like writing "customer K.Y.H.")
  • Numbers spelled out in words ("oh one oh, one two three four")
  • Descriptions with no name or number that still tell you who it is ("the owner of the pharmacy on the third floor")
  • Identifiers used only inside the company (employee numbers, customer numbers) are found only if you supply the format separately

So there has to be a step where someone looks at the result before saving. The right way is to feed in a few real memos, see what changes and what remains, and then decide whether to apply the rule. For a column where a lot remains, emptying it entirely is the better choice.

Free-text transformation in DataMint Core

DataMint Core has free-text transformation rules for long text such as memos and remarks, and for document files. Numbers are found with rules, and names and addresses are found from context by an AI model that runs inside the server. Nothing is sent outside. Found values are replaced in the same way as structured columns, so the values in tables and the values inside memos match each other.

DataMint Core free-text transformation rule editor showing an input memo on the left and, on the right, the result with the name, RRN and phone number replaced
Before saving a rule, you enter real sentences and preview the result. The surrounding text stays as it is and only the personal data is replaced. (The console is shown in Korean. The data on screen is demo data.)

Document files

It reads text, CSV, Word, Excel, PowerPoint, HWPX and compressed text, and converts them in the same way. Documents whose text cannot be read, such as images and PDFs, are emptied so that the original does not get through.

Closing

Working through the list of personal data columns is not the end. The fields where people write freely remain, and they hold information you cannot tell from the column name. Find numbers with rules and names and addresses from context, and replace them with the same values as the columns. Then, at the end, a person takes one look.

If you first need to find which columns hold personal data, where is the personal data in our database should help.

  • #PII in unstructured data
  • #free text de-identification
  • #support memos
  • #named entity recognition
  • #test data
  • #PII detection

Reviewing how you handle test data?

Tell us how you do it today and what databases you run, and we will look at the options with you.

More posts