Sub topic 5
Classifying Data and Deciding What May Go Into an AI Tool
Prerequisites and scope
This chapter assumes you have used an AI chat or coding assistant. It also assumes you know roughly what your customers' records contain, and that you have read your employer's acceptable-use policy. The chapter on customer data types explained what counts as customer data. This chapter turns that knowledge into a decision: given a piece of data and a specific tool, may the data go in?
The answer depends on two things. One is how sensitive the data is. The other is where the tool sends it. Neither alone is enough.
What data classification is
Data classification is the practice of sorting information into a small number of levels. Each level has its own handling rules. The point is to decide once, in advance, so that nobody has to reason from scratch each time they paste something into a prompt.
Most organizations use three to five levels. Your employer's scheme may use different names, so treat the table below as a typical example and not a standard.
| Level | Typical meaning | Typical examples |
|---|---|---|
| Public | Already published or safe to publish | Marketing pages, published pricing, public documentation |
| Internal | Not secret, but not meant for outsiders | Meeting notes without customer details, internal process documents |
| Confidential | Harm if disclosed; includes most customer data | Customer names, emails, order history, support tickets, contracts |
| Restricted | Serious harm or legal exposure if disclosed | Payment card numbers, health records, government IDs, credentials, security keys |
Two points about the table matter in practice.
- Customer data usually starts at Confidential. A support ticket with a name and an order number is Confidential even though each field looks harmless on its own.
- Combining fields can raise the level. An email address alone is Confidential. An email address, a home address, and a date of birth together may be enough for identity fraud, so treat the bundle as Restricted if your policy says so.
Classify the data, then check the tool
The decision has two inputs, and you must look at both.
- The data's classification.
- The tool's approval status, which the chapter on approved tools covers in detail. In short, an approved tool has a vendor contract that restricts how your data is used, and your organization has configured it.
A common rule set looks like the matrix below. Your own policy takes precedence over this example.
| Data level | Unapproved or personal AI tool | Approved enterprise AI tool | Approved tool with extra controls |
|---|---|---|---|
| Public | Allowed | Allowed | Allowed |
| Internal | Not allowed | Allowed | Allowed |
| Confidential | Not allowed | Allowed for the approved purpose, ideally minimized | Allowed |
| Restricted | Not allowed | Not allowed unless the policy names the tool for that data | Only if explicitly approved |
The key row is Confidential. Even in an approved tool, approval is usually tied to a purpose, such as drafting support replies. Using the same tool to analyze a different data set may fall outside the approval. When the matrix does not clearly cover your case, the answer is no until someone with authority says yes.
Worked examples
The following cases show how the two inputs combine. Assume the company uses the matrix above and has one approved enterprise assistant.
Case 1: Summarizing a public help article
The article is Public. Any tool is acceptable by the matrix, though you should still prefer the approved tool so that you build one habit.
Case 2: Rewriting a customer's angry email
The email contains a name, an email address, an order number, and a complaint. That is Confidential. In the approved enterprise assistant, the matrix allows it. In a personal chatbot account, it does not. Even in the approved tool, you can remove the signature block and contact details, because the rewrite does not need them.
Case 3: Debugging with a production database export
A developer wants to paste 200 rows from the customer table to find a bug. The rows include names, emails, and hashed passwords. Credentials and password hashes are Restricted in most schemes. The right move is to build a synthetic sample with the same shape, with invented values, and paste that.
Case 4: Analyzing a spreadsheet of support tickets for themes
The spreadsheet has free-text fields. Free text is the hardest to classify because customers write anything in it: phone numbers, health details, card numbers typed by mistake. Treat a free-text field as having the highest level of anything it could contain, unless you have scanned it.
Classify the bundle, not the label
Data often arrives in containers, such as a spreadsheet, a PDF, a chat log, or a code repository. The label on the container ("Support export") rarely tells you the classification. Apply these rules.
- Classify by the most sensitive thing inside. One card number in a 5,000-line log makes the log Restricted.
- Check hidden content. Spreadsheets have hidden columns and other tabs. PDFs have metadata. Email threads include earlier messages quoted further down.
- Check what you get when you derive data. A summary of Confidential data usually remains Confidential, because it may still identify people or reveal their situation. Aggregated statistics with large groups and no identifiers may be lower.
- Check images and screenshots. A screenshot of a CRM screen carries every field visible in it, including the sidebar you forgot was open.
A simple classifier you can run
Automation can support the human decision. The script below flags text that looks like Restricted or Confidential data, so you can stop and think before pasting. It is a screening aid. It will miss names, addresses, and free-form identifiers, so a pass from the script does not mean the data is safe.
import re
PATTERNS = {
"Restricted": {
"card number": re.compile(r"\b(?:\d[ -]?){13,19}\b"),
"private key": re.compile(r"-----BEGIN [A-Z ]*PRIVATE KEY-----"),
"api key": re.compile(r"\b(?:sk|pk|AKIA)[A-Za-z0-9_-]{16,}\b"),
},
"Confidential": {
"email": re.compile(r"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}"),
"phone": re.compile(r"\+?\d[\d\s().-]{7,}\d"),
},
}
ORDER = ["Public", "Internal", "Confidential", "Restricted"]
def screen(text: str) -> tuple[str, list[str]]:
"""Return the highest level detected and the reasons."""
level = "Public"
reasons = []
for label, checks in PATTERNS.items():
for name, pattern in checks.items():
if pattern.search(text):
reasons.append(f"{label}: {name}")
if ORDER.index(label) > ORDER.index(level):
level = label
return level, reasons
sample = "Refund Ana at [email protected], card 4111 1111 1111 1111."
level, reasons = screen(sample)
print(level)
print(reasons)Running this prints Restricted and a list containing the card number and email reasons. Note that the default result is Public only because nothing matched. The script cannot know that "Ana" is a customer's name. That is why "Public" from a screening tool means "nothing obvious found", not "cleared".
Common errors
- Classifying the field, not the context. A first name seems harmless. In a ticket that says "Maria's chemotherapy claim was denied", the whole message is sensitive health information.
- Trusting the tool's reputation. A well-known assistant on a personal account is still unapproved. Approval comes from your organization's contract and settings, not from brand recognition.
- Assuming deletion after use. Deleting a chat in the interface may not remove data from vendor logs or backups. Decide as if the data will persist, and check retention settings as covered in a later chapter.
- Treating "internal use only" as "safe for AI". Internal data sent to an unapproved tool still leaves your organization.
- Reclassifying downward without authority. You may strip identifiers and call the result lower-level, but only if your policy defines what counts as properly de-identified. Without that definition, keep the original level.
- Skipping the check under time pressure. Most leaks happen when someone is in a hurry and pastes a whole thread.
Edge cases
- Ambiguous data. If you cannot tell whether something is Confidential or Restricted, use the higher level and ask the data owner.
- Data from a different customer's contract. Some contracts forbid third-party processing, including by AI vendors, regardless of the internal level. The legal duties chapter covers this. Check the contract if a large or regulated customer is involved.
- Data about employees or contractors. It is not customer data, but it is usually Confidential as well. Apply the same process.
- Data from other countries. Where the data came from can change what is allowed, particularly for cross-border transfers. When in doubt, ask your privacy team.
- Code and configuration. Source code is often Internal or Confidential, and configuration files often hold Restricted credentials. Scan before pasting.
Putting it together
A repeatable routine takes under a minute.
- Name the data and find its highest level, including hidden content and free text.
- Name the tool and confirm it is approved for this purpose and this level.
- If both pass, reduce the data to the minimum the task needs.
- If either fails or is unclear, stop and ask. A delay costs little. A leak can cost a lot.
The next chapters build on this routine. They cover how to choose and verify approved tools, and how to minimize and mask data once you have decided it may be used.
Exercise
A colleague wants to paste a CSV of 500 support tickets into the company's approved enterprise assistant to find common complaints. The CSV has columns for ticket ID, customer name, email, and a free-text "description". The policy matrix allows Confidential data in the approved tool for support analysis. What level do you assign, what should you check, and what would you do before pasting?
Show answer
Assign at least Confidential because of the name and email. Treat the free-text column as potentially Restricted until scanned, since customers may have typed card numbers, health details, or credentials. Confirm the tool is approved for support analysis specifically. Before pasting, remove the name and email columns (the analysis does not need them), scan the description column for Restricted patterns, and consider pseudonymizing any names left in the text. If the scan finds Restricted data, remove or mask it, or stop and ask.
Exercise
A screening script returns "Public" for a pasted text. Does that mean you can send it to any AI tool? Explain.
Show answer
No. The script only checks for patterns such as emails, phone numbers, card numbers, and keys. It cannot detect names, addresses, health details, or other free-form identifiers. A "Public" result means nothing obvious was found, so a person must still review the text and confirm the tool is approved for the data.
Exercise
You remove names and emails from a Confidential ticket export but keep a token-to-name mapping in a local file. Can you treat the remaining text as Public?
Show answer
No. Because the mapping lets anyone re-identify the people, the text is pseudonymized, not anonymous. Keep its original classification unless your policy explicitly defines a lower level for pseudonymized data. You may be able to use it in an approved tool, since the identifiers are gone, but the decision still needs the policy.