How AI Understands Files to Prevent Data Leaks

Peter Bubenik · Uber AI · · Source
How AI Understands Files to Prevent Data Leaks

After studying this material, you should be able to:

  1. Explain why traditional DLP systems fail at semantic data classification
  2. Describe the architecture and components of an AI-powered File Semantic Analyzer
  3. Understand how GenAI processes files through each pipeline stage
  4. Identify the risks of LLM-based systems and their mitigations
  5. Evaluate the business impact of semantic analysis over pattern matching

Step-by-Step Teaching Guide

Step 1: Understanding the Problem First

Why Does This Problem Exist?

Before learning the solution, you must deeply understand what is broken.

Large organizations like Uber have thousands of employees generating files daily:

File TypeExampleSensitivity
PersonalVacation photosLow
Business CriticalMerger agreementVery High
NeutralPublic marketing PDFNone
Sensitive PIICustomer databaseHigh

The core challenge:

When files leave the organization (via email, USB, cloud upload), how do you automatically determine if they contain sensitive information at scale?


Why Traditional DLP Systems Fail

DLP stands for Data Loss Prevention. Traditional DLP works like this:

File → Scan for keywords → Match patterns → Alert

Example of keyword scanning:

IF file contains "confidential" → ALERT
IF file contains "SSN pattern ###-##-####" → ALERT

The fundamental flaw is it cannot understand meaning.

ScenarioWhat DLP DoesWhat Should Happen
Personal note saying "this is confidential between us"🚨 Alerts (False Positive)✅ Ignore
Sensitive merger plan with no obvious keywords✅ Passes through (False Negative)🚨 Should Alert

Two critical failure modes:

  • False Positives → Security team drowns in irrelevant alerts → Alert Fatigue
  • False Negatives → Real threats slip through undetected → Data Breach Risk

💡 Key Insight: Traditional DLP reads characters and patterns. It cannot read meaning and context. This is the gap that needs solving.


Step 2: Understanding the Solution Concept

Semantic Understanding vs. Pattern Matching

Think of it this way:

Pattern Matching:  "Does this file CONTAIN the word 'confidential'?"
Semantic Understanding: "Does this file MEAN something confidential?"

A human analyst reading a document can:

  • Understand context
  • Infer intent
  • Summarize content
  • Recognize sensitivity without keywords

The goal of FSA is to replicate this human-level understanding at machine scale.

This is achieved using Generative AI (GenAI) and specifically Large Language Models (LLMs).

💡 Key Insight: LLMs are trained on vast amounts of text and can understand language meaning, not just characters. This makes them ideal for semantic file classification.


Step 3: The FSA Pipeline — Stage by Stage

Think of the FSA as an assembly line where each station transforms the file into increasingly useful information.

Raw File → Extract Text → Chunk → AI Analysis → Classification → Action

Stage 1: Data Collection and Labeling

Before building the AI, you need training data.

Human experts manually label thousands of files:

file_001.pdf → "Business Critical"
file_002.jpg → "Personal"
file_003.xlsx → "Business Critical - Financial"
file_004.docx → "Neutral"

Why this matters:

  • This labeled dataset becomes the ground truth
  • The AI learns patterns from these human judgments
  • Quality of labels directly determines quality of AI output

⚠️ Important: This is the most labor-intensive phase. Garbage in = Garbage out.


Stage 2: Pre-Processing

Raw files come in many formats. The AI needs plain text to work with.

Sub-stages of pre-processing:

2a. Content Extraction

PDF → Plain Text
DOCX → Plain Text
XLSX → Plain Text
HTML → Plain Text

2b. OCR for Image-Based Files

Some files contain text as images (scanned documents, screenshots).

Scanned PDF image → OCR → Machine-readable text → Plain Text

OCR = Optical Character Recognition — technology that converts images of text into actual text characters.

2c. Intelligent Chunking

Problem: LLMs have a token limit (maximum amount of text they can process at once).

A 200-page document cannot be fed to an LLM all at once.

Solution: Chunking

Large Document (200 pages)
        ↓
Chunk 1: Pages 1-10 (Introduction + Context)
Chunk 2: Pages 11-20 (Financial Data)
Chunk 3: Pages 21-30 (Strategic Plans)
        ↓
Each chunk fed to LLM separately

Key principle: Chunks must maintain contextual coherence — split by paragraphs, sections, or semantic topics, NOT arbitrarily mid-sentence.

💡 Why this matters: Poor chunking = lost context = AI misunderstands the document.


Stage 3: The GenAI Interpretation Engine

This is the brain of the FSA. Each text chunk is fed into a fine-tuned LLM.

The LLM performs three key tasks:

Task A: Summarization

Input: 10 pages of dense legal text
Output: "This is a draft merger agreement between Company A and 
         Company B, outlining acquisition terms of $2.3B, 
         scheduled for Q4 2026."

Value: Analysts can understand a file in seconds instead of hours.

Task B: Entity Extraction

The LLM identifies and extracts named entities:

Entities Found:
- Person Names: "John Smith (CFO)", "Sarah Lee (Legal)"
- Organizations: "Acme Corp", "Global Ventures LLC"
- Financial Figures: "$2.3 Billion", "Q3 Revenue"
- Project Codes: "Project Falcon"
- Sensitive Phrases: "unreleased product specifications", 
                     "customer database export"

Task C: Semantic Intent Classification

The LLM reasons over all extracted information and provides:

Classification: "Business Critical - Legal/Financial"

Confidence: High

Explanation: "This file is classified as Business Critical 
because it discusses a merger agreement, references 
unreleased acquisition figures of $2.3B, and lists 
key executive contacts involved in the deal."

Notice the explanation. This is a critical feature — the AI shows its reasoning, not just its answer.

💡 Key Insight: The explanation allows human analysts to verify the AI's logic, catching errors before action is taken.


Stage 4: Classification and Policy Enforcement

The AI output feeds into a rule-based engine that decides what action to take.

Examples of rules:

IF classification = "Unreleased Product Specification" 
AND destination = external domain
THEN → ALERT + BLOCK

IF classification = "Customer PII" 
AND destination = personal email address
THEN → ALERT + BLOCK

IF classification = "Personal Vacation Photos"
AND destination = external email
THEN → ALLOW (no alert)

Why combine AI + rules?

  • AI provides semantic understanding (what the file means)
  • Rules provide deterministic enforcement (what to do about it)
  • Together they are more powerful than either alone

Stage 5: Human-in-the-Loop Validation

The system does not act fully autonomously. High-risk findings go to human analysts.

The analyst's role is transformed:

Before FSAAfter FSA
Read entire documents manuallyReview AI-generated summaries
Guess at file sensitivitySee AI classification with explanation
Hours per caseMinutes per case
Reactive, overwhelmedStrategic, empowered

Feedback loop:

Analyst reviews finding
        ↓
Analyst agrees or disagrees with AI
        ↓
Feedback used to refine AI prompts and fine-tuning
        ↓
AI becomes more accurate over time

💡 Key Insight: Human feedback continuously improves the AI. The system learns from corrections.


Step 4: The Complete Architecture

Now you can see how all components connect:

┌─────────────────────────────────────────────────────────┐
│                    FILE EGRESS POINTS                    │
│         (Email, Cloud Upload, USB, File Shares)          │
└─────────────────────┬───────────────────────────────────┘
                      │
                      ▼
┌─────────────────────────────────────────────────────────┐
│                   FILE CONNECTOR                         │
│         Ingests files from all egress points             │
└─────────────────────┬───────────────────────────────────┘
                      │
                      ▼
┌─────────────────────────────────────────────────────────┐
│                  FILE PROCESSING                         │
│   Content Extraction → OCR → Intelligent Chunking        │
└─────────────────────┬───────────────────────────────────┘
                      │
                      ▼
┌─────────────────────────────────────────────────────────┐
│                  PROMPT BUILDING                         │
│      Constructs optimized prompts for the LLM            │
└─────────────────────┬───────────────────────────────────┘
                      │
                      ▼
┌─────────────────────────────────────────────────────────┐
│              GENAI INTERPRETATION ENGINE                 │
│   Summarization + Entity Extraction + Classification     │
└─────────────────────┬───────────────────────────────────┘
                      │
                      ▼
┌─────────────────────────────────────────────────────────┐
│              DECISION / POLICY ENGINE                    │
│         Rule-based actions on AI output                  │
└──────────┬──────────────────────────┬───────────────────┘
           │                          │
           ▼                          ▼
    AUTO-ALLOW/BLOCK           MANUAL REVIEW
                                      │
                                      ▼
                              FEEDBACK LOOP
                           (Improves AI over time)

Step 5: Understanding and Managing AI Risks

Using LLMs introduces specific risks you must understand.

Risk 1: Hallucinations

What it is: The LLM confidently states something that is factually wrong or invented.

Example Hallucination:
File: Personal recipe collection
AI Output: "This file contains confidential pharmaceutical 
            formulas and trade secrets."

Mitigation: Require the AI to always provide an explanation with evidence. Analysts can verify the reasoning against the actual file.


Risk 2: Context Loss from Chunking

What it is: When a large file is split into chunks, the AI might miss connections between distant sections.

Chunk 1: "Project Falcon will launch in Q4..."
Chunk 10: "...the $500M budget has been approved"

If processed separately, AI might miss that 
"Project Falcon" and "$500M budget" are connected.

Mitigation: Intelligent chunking strategies that preserve semantic coherence. Overlapping chunks or section-aware splitting.


Risk 3: Autonomous Errors Causing Business Disruption

What it is: If the AI acts fully autonomously and makes a wrong decision, it could block legitimate business files.

Mitigation: Human-in-the-loop validation for high-fidelity findings before irreversible actions are taken.


Risk Summary Table

RiskDescriptionMitigation
HallucinationsAI invents false detailsRequire explanations; human verification
Context LossChunking breaks meaningIntelligent semantic chunking
Autonomous ErrorsWrong automated actionsHuman-in-the-loop validation

Step 6: Measuring Impact

Understanding why this matters reinforces the learning.

Quantified Results at Uber

MetricBefore FSAAfter FSA
Time per file reviewHoursMinutes
Time saved per file—~5 minutes
Files analyzed annually—150,000
Total time saved—~4 person-years
False positive reductionBaseline97% reduction
Incident response timeMultiple hoursFew minutes

The Math Behind 4 Person-Years

5 minutes saved × 150,000 files = 750,000 minutes saved
750,000 minutes ÷ 60 = 12,500 hours saved
12,500 hours ÷ ~2,000 work hours per year = ~6.25 person-years

(Article states ~4 person-years, accounting for overhead)

Step 7: Future Directions

Understanding where the technology is heading completes the picture.

Multimodal GenAI

Current FSA: Text files → Text analysis

Future FSA:

Images → Direct visual analysis (not just OCR)
Videos → Frame-by-frame analysis
Audio → Speech-to-text + semantic analysis

DLP Transformation

Current DLP: Keyword matching → Block/Allow

Future DLP:

Semantic classification → Block/Allow based on TRUE MEANING

This represents a fundamental shift from reactive pattern detection to proactive semantic enforcement.


Summary: The Complete Mental Model

PROBLEM:
Traditional DLP = Pattern Matching = High False Positives + False Negatives

SOLUTION:
FSA = Semantic Understanding via GenAI = True Content Comprehension

PIPELINE:
File → Extract Text → Chunk → LLM Analysis → Rules → Action → Human Review → Feedback

KEY CAPABILITIES:
✓ Summarization (what does this file say?)
✓ Entity Extraction (what sensitive elements exist?)
✓ Intent Classification (what does this file MEAN?)
✓ Explainability (WHY was it classified this way?)

RISK MANAGEMENT:
✓ Hallucinations → Require explanations
✓ Context Loss → Intelligent chunking
✓ Autonomous Errors → Human-in-the-loop

IMPACT:
✓ 97% false positive reduction
✓ 4 person-years saved annually
✓ Hours → Minutes incident response

Quick Knowledge Check

Test your understanding with these questions:

  1. Why does keyword matching fail to identify a sensitive merger document that contains no obvious keywords?

  2. What is the purpose of chunking, and what risk does poor chunking introduce?

  3. What three tasks does the GenAI Interpretation Engine perform on each text chunk?

  4. Why is explainability a critical feature of the AI classification output?

  5. How does the human feedback loop improve the system over time?

  6. Calculate: If FSA saves 5 minutes per file and analyzes 150,000 files per year, how many hours are saved annually?

More to study