Cognni InsightsBook a Demo
Guide

How do I classify unstructured data accurately?

By Guy Eisdorfer · Updated

Short answerClassify documents by meaning, not only by pattern. Regex, keywords and sensitive information types find structured identifiers like card numbers and national IDs, but most business-critical documents, such as board minutes, contracts, deal models and R&D, contain none. Accurate classification reads the content and decides what the document is, how sensitive it is and who should see it, then maps that to your own labels so policy can enforce it. Measure accuracy on a sample of files you already know.

Why unstructured data is hard to classify

Unstructured data is everything that isn't in a database: documents, spreadsheets, presentations, PDFs, email and chats. It's most of what an organization creates, and most of it is unlabeled.

It's hard to classify for three reasons:

  • The risk is in the meaning. A board pack, a supplier contract and a pricing model are sensitive because of what they are, not because they contain a pattern.
  • Look-alikes are everywhere. A real contract and a contract template contain almost the same words. A live deal model and a training example look identical to a rule.
  • People don't label consistently. Manual labeling depends on each user's judgment, so coverage stays thin.

Three ways to classify, compared

ApproachGood atMisses
Regex, keywords and sensitive information typesStructured identifiers: card numbers, national IDs, health record numbersDocuments with no pattern; fires on templates and test data
Trainable classifiersA category you define and train with examplesAnything you didn't define; needs a training set and ongoing tuning per category
Classification by meaningWhat the document is, its purpose and sensitivity, out of the boxNeeds mapping to your own labels and categories during setup

Most organizations need all three working together. Patterns stay useful for regulated identifiers. Classification by meaning covers the much larger share of business content that patterns can't see.

How to classify unstructured data accurately

  1. Decide the categories that matter. Start from business risk: board and governance, finance, legal, HR, R&D and intellectual property, customer and personal data.
  2. Classify by what the document is. Identify the document's purpose (a clinical study report, a site agreement, a long-range plan), not only the data elements inside it.
  3. Add context. Combine what the file is with who owns it, where it sits and who can reach it. A sensitive file in a restricted folder is a different risk from the same file shared with everyone.
  4. Map to your own labels. Classification is only useful if it lands on the labels your policies use.
  5. Test accuracy on files you know. Pick a folder of documents whose sensitivity you already know and check what each tool calls them, and how specific the resulting labels are.
  6. Keep it continuous. Classify new and changed files as they arrive, not in a one-off project.

What good results look like

Specific classifications are worth more than broad ones. A label like "Compliance" or "Internal" tells a DLP rule almost nothing. In one pharmaceutical proof of concept, the difference looked like this:

DocumentBroad or pattern-based resultClassified by meaning
Regulatory submission dossierCompliance (generic)Regulatory Affairs, Pre-Approval
Clinical pipeline forecast spreadsheetUnclassified (no personal data found)Financial and Clinical Pipeline Forecast
Site investigator contractLegal Document (broad)Clinical Trial Site Agreement and SOW

Most of the high-severity exposures found in that evaluation involved no traditional personal data at all.

Where Cognni fits

Cognni classifies unstructured data by meaning, using its own AI models with more than 400 information types built in and no rules to write. It covers Microsoft 365, Google Workspace, file servers, cloud storage and other sources, maps its results to your own labels, and writes them into Microsoft Purview so your existing policies enforce them.

Frequently asked questions

What is unstructured data?

Data that isn't stored in rows and columns: documents, spreadsheets, presentations, PDFs, email, chats and similar files.

Is AI classification accurate enough to act on?

Test it on your own files. Choose documents you already know are sensitive and compare what each approach finds and how specific its labels are.

Do we still need regex and sensitive information types?

Yes, for structured identifiers they work well. They just can't recognize business documents with no pattern, which is where most of the risk sits.

How long does classification take?

With Cognni, connecting Microsoft 365 takes about 60 seconds of admin consent, and first findings typically arrive in about a week.

See it on your own data

Cognni shows which sensitive files your people and AI tools can reach, and what to fix first.

Book a Demo