# Aequor Privacy-Preserving AI

Interactive demonstration of privacy features for secure AI interactions

## Privacy Features Overview

🔐
Intent Encoding
Transform queries into 768-dimensional vectors with ε-differential privacy. Cloud sees semantic intent, not your actual words.
🛡️
PII Redaction
Automatically detect and redact 12 types of personally identifiable information with context-aware analysis.
🔄
R-A Protocol
Redaction-Addition Protocol for functional privacy: Redact locally, process remotely, re-hydrate locally.
📊
Privacy Classifier
Categorize queries by privacy level: LOGIC, STYLE, or SECRET with confidence scoring.
🔥
Privacy Firewall
Enforce privacy policies with configurable rules, real-time monitoring, and audit logging.
⚡
Zero Overhead
Less than 1% latency overhead. Privacy without sacrificing performance or functionality.

### 📈 Performance Metrics

Operation | Latency | Throughput
--- | --- | ---
Intent Encoding | 8-12ms | 80-100 qps
PII Redaction | <5ms | 1000+ qps
R-A Protocol | <1% overhead | N/A
Privacy Classification | <1ms | 2000+ qps

## 🔐 Intent Encoding Demo

Enter your query:
Privacy Level (ε):

### 📊 Encoding Results

768
Vector Dimensions
1.0
Privacy Loss (ε)
High
Reconstruction Difficulty
Intent Vector (first 16 dimensions):
✅ Privacy Guarantee:

- Cloud receives 768-dimensional vector (not your text)
- Original query cannot be reconstructed from vector
- ε-differential privacy provides mathematical guarantee
- Semantic meaning preserved for routing/processing

## 🛡️ PII Redaction Demo

Enter text with PII:
Redaction Strategy:

### 📊 Redaction Results

❌ Original (UNSAFE):
✅ Redacted (SAFE):
0
PII Detected
0
PII Types
Detected PII Types:

## 🔄 Redaction-Addition Protocol Demo

🏠
Local Device
Your query
→
🛡️
Redact Locally
Remove PII
→
☁️
Cloud AI
Process structure
→
💧
Re-hydrate
Restore PII
Enter your query:

### 📊 R-A Protocol Flow

Step 1: Original Query
Step 2: Redacted (sent to cloud)
⚠️ Cloud sees placeholders only - PII never transmitted!
Step 3: Cloud Response
Step 4: Re-hydrated (shown to you)
✅ Your PII restored locally - cloud never saw it!

## 📊 Privacy Classifier Demo

Enter your query:

### 📊 Classification Results

LOGIC
Privacy Category
95%
Confidence
Direct
Recommended Action
PII Detected:
Classification Reasoning:
💡 Privacy Categories:

- LOGIC: No PII detected, safe to transmit directly
- STYLE: Indirect PII patterns, rewrite recommended
- SECRET: Direct PII detected, apply R-A Protocol