GDP-Agent: AI-Enhanced PII Detection Architecture
GDP-Agent is an intelligent email monitoring system that combines **Microsoft Presidio** for pattern-based PII detection with **Azure AI Foundry** for contextual analysis and false positive filtering. The system transforms raw technical findings into actionable business intelligence and professional communication.
GDP-Agent: AI-Enhanced PII Detection Architecture
Executive Summary
GDP-Agent is an intelligent email monitoring system that combines Microsoft Presidio for pattern-based PII detection with Azure AI Foundry for contextual analysis and false positive filtering. The system transforms raw technical findings into actionable business intelligence and professional communication.
Core AI-Enhanced Business Flow
graph TD
A[π§ Email Sent] --> B[Email Monitoring]
B --> C[Basic Email Processing]
C --> D[π Presidio PII Scan]
D --> E{Raw PII Detected?}
E -->|No| F[β
No Action Needed]
E -->|Yes| G[π§ AI Analysis & Filtering]
G --> H[π― False Positive Review]
H --> I{Real PII Confirmed?}
I -->|No| J[β
Filtered Out - No Alert]
I -->|Yes| K[π Risk Assessment]
K --> L[π€ AI Communication Generation]
L --> M[π§ Professional Follow-up Email]
M --> N[π Business Action Items]
style A fill:#e1f5fe
style G fill:#f3e5f5
style H fill:#fff3e0
style L fill:#e8f5e8
style M fill:#fce4ec
AI-Powered PII Detection Pipeline
1. Dual-Layer AI Detection β Enhancement
sequenceDiagram
participant Email as π§ Email Content
participant PresidioCore as π Presidio Core Patterns
participant PresidioAI as π€ Presidio AI Extension
participant AIAnalysis as π§ Azure AI Analysis
participant Filter as π― False Positive Filter
participant Business as π Business Logic
Email->>PresidioCore: Standard pattern detection
Email->>PresidioAI: AI-enhanced entity detection
PresidioCore->>AIAnalysis: Pattern results (8 entities)
PresidioAI->>AIAnalysis: AI context results (5 entities)
AIAnalysis->>Filter: Combined results (10 unique entities)
Filter->>AIAnalysis: "7 are false positives"
AIAnalysis->>Business: Confirmed: 3 real PII entities
Business->>AIAnalysis: Generate business-friendly report
AIAnalysis-->>Email: Professional notification sent
2. Extended Presidio with AI Enhancement
graph TB
subgraph "Extended Presidio Engine"
A[π§ Email Content] --> B[Core Presidio Analyzers]
A --> C[π€ AI Enhanced Recognizer]
B --> D[Pattern-Based Detection]
D --> E[SSN: 123-45-6789<br/>Phone: 555-0123<br/>Email: contact@company.com]
C --> F[AI Context Detection]
F --> G[Unusual Name Formats<br/>Business Context Entities<br/>Contextual PII]
E --> H[Combined Results]
G --> H
end
subgraph "AI Analysis Layer"
H --> I[π§ Azure AI Foundry Analysis]
I --> J[Business Context Filter]
I --> K[False Positive Detection]
I --> L[Risk Assessment]
end
subgraph "Business Intelligence"
L --> M[π Final PII Assessment]
M --> N[Professional Communication]
M --> O[Compliance Guidance]
end
style B fill:#ffebee
style C fill:#e8f5e8
style I fill:#f3e5f5
style M fill:#fff3e0
Extended Presidio Architecture
AI-Enhanced Recognizer Integration
GDP-Agent extends the standard Presidio framework by injecting a custom AI Enhanced Recognizer directly into Presidio's analyzer engine. This creates a hybrid detection system that combines pattern-based precision with AI contextual understanding.
graph TB
subgraph "Standard Presidio Framework"
A[AnalyzerEngine] --> B[Built-in Recognizers]
B --> C[Regex Patterns]
B --> D[ML Models]
B --> E[Spacy NLP]
end
subgraph "GDP-Agent Extension"
F[AIEnhancedRecognizer] --> G[Azure AI Foundry]
G --> H[Prompty Template]
H --> I[Context Analysis]
I --> J[Unusual Format Detection]
end
A --> F
F --> A
subgraph "Detection Results"
K[Core Presidio Results] --> L[Combined Entity List]
M[AI Enhanced Results] --> L
end
C --> K
D --> K
E --> K
J --> M
style A fill:#ffebee
style F fill:#e8f5e8
style G fill:#f3e5f5
style L fill:#fff3e0
Key Features of AI Extension
- Seamless Integration: Plugs directly into Presidio's
AnalyzerEngineas a custom recognizer - Contextual Detection: Identifies PII that pattern-based methods miss
- Confidence Calibration: AI results use lower confidence scores to let built-in recognizers take precedence
- Format Flexibility: Detects names, addresses, and identifiers in unusual formats
- Business Context: Understands when entities are business-relevant vs. personal
Detection Enhancement Examples
| Scenario | Core Presidio | AI Enhancement | Combined Result |
|---|---|---|---|
| "John Smith from ABC Corp" | Detects "John Smith" as PERSON | Detects "ABC Corp" as ORGANIZATION | Both entities with appropriate context |
| "Call me at five-five-five-zero-one-two-three" | Misses (unusual format) | Detects as PHONE_NUMBER | Phone number identified |
| "CEO Jane Doe" | Detects "Jane Doe" as PERSON | Adds business context (title) | Enhanced person entity with role |
| "john.smith.ceo@company.co.uk" | Detects email pattern | Identifies professional context | Email with business relevance |
AI Template System Architecture
The system uses three specialized Prompty templates:
1. Presidio Analysis Template (presidio_analysis.prompty)
Purpose: Transform raw Presidio detections into business-intelligent insights
Key Functions:
- Filter false positives (company names detected as persons)
- Apply business context to PII findings
- Determine actual risk levels based on data sensitivity
- Generate actionable recommendations
graph LR
A[Raw Presidio Data] --> B[presidio_analysis.prompty]
B --> C[Filtered Results]
B --> D[Risk Assessment]
B --> E[Business Context]
style B fill:#f3e5f5
2. Follow-up Report Template (follow_up_report.prompty)
Purpose: Generate professional business communications
Key Functions:
- Translate technical findings to business language
- Create anonymized examples for user education
- Provide practical impact assessments
- Generate actionable next steps
graph LR
A[Technical Findings] --> B[follow_up_report.prompty]
B --> C[Business Summary]
B --> D[Impact Assessment]
B --> E[Action Items]
style B fill:#e8f5e8
3. Entity Detection Template (pii_entity_detection.prompty)
Purpose: Enhance pattern-based detection with AI context understanding
Key Functions:
- Identify PII in unusual formats
- Understand contextual relevance
- Detect entities missed by pattern matching
- Provide confidence scoring
Technology Integration Points
graph TD
subgraph "External Services"
A[Microsoft Graph API]
B[Azure AI Foundry]
C[Microsoft 365]
end
subgraph "AI Components"
D[Presidio Engine]
E[Prompty Templates]
F[GDPAgentManager]
end
subgraph "Business Logic"
G[Enhanced Email Processor]
H[Notification Service]
I[Report Generator]
end
C --> A
A --> G
G --> D
D --> F
F --> B
E --> F
F --> I
I --> H
H --> A
style B fill:#e3f2fd
style D fill:#f3e5f5
style F fill:#fff3e0
Business Value Proposition
Before AI Enhancement (Standard Presidio)
- Limited pattern detection β Misses contextual PII
- High false positive rate β Company names flagged as people
- Format restrictions β Misses "five-five-five" phone numbers
- Technical jargon β Users confused about actions
- Generic recommendations β Poor adoption
After Dual-Layer AI Enhancement
- Extended detection coverage β AI finds contextual and unusual format PII
- Intelligent false positive filtering β 70% reduction in noise
- Context-aware analysis β Business vs. personal data distinction
- Professional communication β User-friendly explanations
- Actionable guidance β Specific privacy improvement steps
Detection Improvement Examples
- Coverage: Standard Presidio finds 8 entities β AI extension adds 5 more β Combined system identifies 10 unique entities
- Accuracy: Raw 10 detections β AI filters 6 false positives β 4 confirmed real PII
- Context: "John Smith, ABC Corp CEO" β System understands John Smith is a person, ABC Corp is a company, CEO is a business title
Key AI Capabilities
Enhanced Detection Layer
- Extended Pattern Recognition: AI recognizer finds PII in unusual formats that regex patterns miss
- Contextual Entity Detection: Identifies business entities, professional titles, and industry-specific terms
- Format Flexibility: Detects phone numbers written as "five-five-five-one-two-three-four"
- Confidence Calibration: AI results complement rather than compete with core Presidio patterns
Analysis & Filtering Layer
- Contextual Understanding: Distinguishes between "John Smith" as a customer vs. email signature
- Business Relevance: Identifies when phone numbers are company contacts vs. personal data
- False Positive Intelligence: Filters out company names incorrectly detected as person names
- Risk Calibration: Adjusts severity based on data type and business context
Communication Layer
- Professional Communication: Converts technical findings into user-friendly explanations
- Educational Approach: Provides learning-focused guidance rather than punitive warnings
- Compliance Intelligence: Delivers relevant regulatory guidance based on detected PII types
- Actionable Recommendations: Offers specific steps users can take to improve privacy practices
Compliance & Privacy Features
- Data Anonymization: All PII examples in communications are masked
- Audit Trail: Complete logging of AI decisions and filtering logic
- Risk Categorization: GDPR/CCPA-aligned risk level assessment
- Professional Notifications: Business-appropriate communication tone
- False Positive Learning: AI continuously improves context understanding
This architecture enables proactive privacy protection while minimizing user disruption through intelligent filtering and professional communication.
Related Documents
Browser-only development
This document provides guidance for AI assistants working on the Image MetaHub codebase.
Claude Agents β Reference & Recommendations
Quick guide to available agents. Pick the one that best matches your task.
Golden DKG Prototype -- Master Plan
Rust prototype of the Golden non-interactive Distributed Key Generation protocol.
Swarms Examples Index
A comprehensive index of examples from the [Swarms Framework](https://github.com/The-Swarm-Corporation/swarms-examples).