←Back to Works / Projects
Full-Stack//AI & ML
LIVE SYSTEM
Full-StackAI & ML

MessyData

Resilient Multi-Source Data Reconciliation & Tiered Entity Resolution Engine

Stack:PythonFastAPIPostgreSQLSQLAlchemyRapidFuzzDocker ComposeStreamlit
YOUR ROLE & SCOPEData & Backend Engineer
TIMELINE4 Weeks
CORE CONSTRAINTSReconciling mismatched, dirty customer records from legacy CSV encodings and APIs without data loss
DEPLOYMENTPython 3.10 + PostgreSQL + RapidFuzz + Docker Compose
error_outline

// 01. THE PROBLEM

Organizations aggregating user records across multiple legacy databases end up with duplicate, corrupted, and poorly formatted profiles that skew analytics.

account_tree

// 02. SYSTEM ARCHITECTURE & PIPELINE FLOW

STAGE 01EXTRACTION

Multi-Source Extraction & Normalization

Ingests raw records from PostgreSQL, REST APIs, and varied CSV encodings into normalized data schemas.

STAGE 02RESOLUTE

Exact Key & RapidFuzz Similarity Matching

Executes exact key matching followed by C++ accelerated Jaro-Winkler string distance scoring.

STAGE 03MERGING

Golden Record Synthesis & Auto Merges

Clusters candidate profiles above 88% confidence and writes unified golden customer records.

STAGE 04TRIAGE

Streamlit Lineage & Manual Triage Queue

Routes borderline matches (80%-88%) to a 20-record manual triage queue with full lineage tracking.

balance

// 03. TECHNICAL APPROACH & DECISION MATRIX

01Tiered Entity Resolution Engine

✓ DECISION CHOSEN

Exact Key Matching + C++ RapidFuzz (Jaro-Winkler + Token Sort)

Exact SQL matching misses human typos. RapidFuzz provided C++ accelerated string distance calculations across thousands of records in milliseconds.

✕ REJECTED ALTERNATIVE

Naive SQL LIKE Pattern Matching

SQL LIKE clauses failed on transposed names, missing middle initials, and varied phone formats.

02Lineage Dashboard & Triage Queue

✓ DECISION CHOSEN

Streamlit Observability Dashboard + Manual Triage Queue

Borderline similarity scores (80%–88%) are safely routed to a manual triage queue, guaranteeing zero accidental merges on ambiguous records.

✕ REJECTED ALTERNATIVE

Silent Automated Merges Without Threshold Gates

Auto-merging below 88% risk corrupting distinct customer accounts with similar names.

terminal

// 04. CORE ARCHITECTURAL LOGIC

Tiered fuzzy matching engine utilizing RapidFuzz C++ algorithms for record clustering.

pipeline/entity_resolution.py
1234567891011121314151617
def reconcile_customer_records(raw_records: pd.DataFrame, cutoff: float = 88.0) -> DeduplicationSummary: golden_records, triage_queue = [], [] clustered_groups = defaultdict(list) for idx, record in raw_records.iterrows(): matched = False for group_id, members in clustered_groups.items(): # C++ accelerated RapidFuzz Token Sort & Jaro-Winkler similarity score = fuzz.token_sort_ratio(record["name"], members[0]["name"]) if score >= cutoff: members.append(record) matched = True break if not matched: clustered_groups[record["id"]].append(record) return DeduplicationSummary(merged=len(clustered_groups), triage_count=len(triage_queue))
task_alt

// 05. TRADE-OFFS & HONEST REFLECTION

Setting conservative fuzzy matching cutoffs (88%) required maintaining a manual triage queue for edge cases, but guaranteed 100% data integrity for golden records.

query_stats

// 06. CONCRETE OUTCOMES & VERIFIED METRICS

518
Verified Profile Merges
Automated entity resolution
20
Triage Queue Records
Borderline human audit safety gate
100%
CI/CD Pass Rate
Automated GitHub Actions workflow