AI System DesignData and Feature InfrastructureModule 12 — Advanced data architecture

Designing Cross-System Entity Resolution for Reliable Downstream AI

Question 40 of 47 · Updated

On this page

Build an evidence-backed, versioned identity registry rather than a destructive deduplication job. Resolve source-specific records into canonical entities using scoped candidate generation, deterministic identifiers and calibrated probabilistic matching. Apply cluster-level constraints and human adjudication before publishing an identity mapping. Preserve every source record, provenance, mapping history and reversible correction. Downstream features, datasets and predictions must pin the mapping revision they used; a merge or split is a data change with potentially large consequences, not merely an update to a display name.

How would you design entity resolution across inconsistent CRM, catalog and transaction identifiers for downstream AI systems?

ASD-091 | Module 12 — Advanced data architecture | Learning order 27. This begins the fourth module in progressive learning order. The published graph-based RAG entity-resolution lesson explains mention matching, graph node consolidation and citation preservation. Retriever deduplication consolidates repeated search hits, and the pending document-deduplication lesson concerns near-identical content. This lesson concerns persistent operational identity across CRM, product catalog and transaction systems, including type and tenant boundaries, pair-to-cluster consistency, revisioned merge/split decisions and feature migration. ASD-009 establishes source capture, ASD-013 reproducible dataset construction and ASD-016 geographic placement constraints. The following examples and capacity assumptions are fictional. The implementation tests were run locally; they are not empirical matching results.

1. Define what it means to be the same entity#

In a retail business, CRM customer 7 is recorded as "Mira Shah", the point-of-sale system records buyer 93 as "M. Shah", and an online order refers to buyer 94. The product catalog has SKU 7, which is unrelated to CRM customer 7. A second tenant also uses CRM key 7. A canonical identifier must not be inferred simply from the numeric value or the normalized name.

Entity resolution determines whether records refer to the same entity at a specified granularity and time. Deduplication is one use of resolution, but multiple source records can be legitimate and must be retained. Two separate orders from one customer are not duplicate orders. Two variants of one product family are not necessarily the same sellable SKU. A household is not an individual customer. A business's successor after acquisition is not necessarily the same legal entity. Define each type and equivalence rule with domain owners.

Entity typeIdentity unitExamples of related but different objects
CustomerIndividual account holder under the approved scopeHousehold, shared address, payment account
ProductSpecific sellable variant/pack under catalog contractProduct family, substitute, different package size
OrganizationDefined business or legal entityBranch, subsidiary, successor
TransactionSpecific source-authoritative operationOther purchases by the same customer
RelationshipTyped link between distinct entitiesCustomer purchased product; product belongs to family

Use typed relations for associations rather than merging their endpoints. The design must be explicit about whether it resolves people, accounts or devices. Do not infer a real person's identity outside the organization's authorized data and purpose. Sharing a phone number or device may be evidence of association, not proof of the same person.

Set requirements for matching precision, recall, unresolved coverage, correction latency, auditability, tenant isolation and downstream impact. False merges may expose another person's purchase history or contaminate fraud features; false splits may miss useful history. The relative costs depend on the consumer. A recommendation experiment may tolerate some under-linking; an account-sensitive workflow may require a verified binding and independent current authorization regardless of confidence score.

2. Reference architecture#

Loading diagram…

This is a logical architecture. A small deployment can use a relational registry, batch matching workers and a review interface. A large deployment may use distributed blocking, graph computation, a durable event log and independent consumer materialization. Choose based on candidate volume, cluster complexity, operational SLOs and ownership—not a requirement to deploy a graph database for every operation.

Keep authoritative source identity distinct from canonical entity identity. Source owners maintain source record meaning and correction semantics. The resolution team owns candidate policy, evidence models, cluster consistency, mapping versioning and audit. Domain owners approve merge/split decisions and identity rules. Consumer teams own feature rebuilding and operational use. Security and privacy owners approve allowed linking purposes and access. The entity resolver cannot confer access to source records by declaring them related.

3. Data model and canonical identifiers#

A source key should be namespaced by tenant, source system, source object type, native identifier and source incarnation where IDs can be reused. Keep the immutable version of each source record and its effective/recorded time. Use opaque, stable canonical entity IDs issued by the registry; do not derive them from mutable names, emails or addresses. Reserve retired IDs and prevent accidental reassignment to unrelated entities.

ObjectKey and important metadata
source_recordTenant, source, native ID, incarnation, type, source revision, effective time, recorded time, artifact reference
normalized_recordSource revision, normalization release, typed attributes, quality flags
candidate_pairScoped unordered pair, blocking rules, evidence revision
match_evidencePair, field comparisons, model/rule release, confidence, constraints and provenance
cluster_proposalExact current mapping epoch, affected members, target assignment, evidence and expected predecessor
adjudicationProposal digest, authorized reviewer, decision, rationale, effective interval
canonical_entityOpaque ID, type, scope, creation and lifecycle status
identity_mappingSource identity, canonical ID, valid-time range, recorded-time range or immutable revision
mapping_releaseScope, epoch, immutable mapping/operation manifest, approval and validation
dependency_indexConsumers, mapping versions, derived aggregates, dataset groups and replay obligations

A canonical profile, sometimes called a golden record, is a separately derived attribute view. Matching records to an entity does not decide which address, name or account status is authoritative. Field survivorship uses a reviewed source and time policy, and preserves conflicts and origin. ASD-092 will focus on reconciliation of conflicting numerical facts. Do not let an attractive profile conceal an uncertain identity assignment.

A canonical entity may reference source records with different permissions. An entity ID is not a bearer credential. Enforce current authorization on lookup and on every joined source fact. Entity equivalence should not implicitly grant cross-account access, expand permitted purpose or merge consent.

4. Normalization and deterministic evidence#

Normalize for comparison without losing original data. Apply Unicode normalization, case folding and whitespace cleanup where appropriate; keep original script and language-specific semantics. Normalize telephone numbers only when the region context and numbering conventions are known. Distinguish apartment/unit details, product pack size, model numbers, leading zeros and significant punctuation in identifiers. A blanket removal of all nonalphanumeric characters may destroy meaning.

Deterministic linking can use an approved issuer-scoped identifier or existing source crosswalk. A key that is unique in one system may not be unique elsewhere. Validate issuer, type, namespace, incarnation, effective dates, uniqueness and the trust level of the claim. Exact email matches are not necessarily verified individual identity: addresses may be shared, changed or reassigned. Treat missing values separately from agreements and disagreements.

Example: an authoritative order-to-CRM foreign key under the same tenant and validated source contract may establish a deterministic customer link. A catalog's manufacturer product identifier plus variant and unit specification may support a deterministic product link. A guessed match from a product title or shipping address should not bypass uncertainty rules. Some identifiers have formal checksums; passing a checksum validates form, not ownership or actual identity.

Hard cannot-link constraints capture authoritative distinctions: different tenants when cross-tenant resolution is forbidden, different entity types, confirmed distinct customer IDs under a defined identity contract, or mutually incompatible product variants. Distinguish authoritative contradictions from noisy source disagreements. An old changed address is not automatically a hard cannot-link.

5. Candidate generation and blocking at scale#

Comparing every pair of n records requires n(n−1)/2 comparisons. For 10 million records, that is 49,999,995,000,000 pairs, roughly 50 trillion. At a hypothetical aggregate rate of 100,000 pair comparisons/s, an exhaustive pass would take about 500 million seconds, nearly 15.85 years. The calculation excludes I/O and model cost. Blocking reduces the search space before detailed scoring.

Use multiple complementary blocking passes appropriate to each type. For customer records, authorized normalized contact equality, phonetic-name-plus-postal-prefix, or name-token and contextual locality may generate candidates. For products, brand plus model family, normalized manufacturer identifiers, title tokens and permitted approximate nearest-neighbor search can help. Apply tenant/type/purpose filtering before generating or materializing candidate pairs. Avoid making sensitive attributes visible through candidate search results.

TechniqueBenefitRisk
Exact approved keyFast and precise when key semantics holdMisses records with absent or wrong keys
Multi-pass blockingRecovers different error patternsDuplicate candidates and larger blocks
Sorted neighborhoodEfficient approximate lexical candidatesOrdering and window can miss matches
Token/inverted indexesHandles partial textual agreementCommon tokens create huge blocks
Approximate nearest neighborsFinds semantically similar textApproximation misses and spurious semantic similarity

Union candidate pairs using a stable unordered scoped key, but retain which blocking passes generated them. Cap pathological blocks, subdivide by meaningful attributes or route to specialized work. A cap may discard true matches, so measure blocking recall and overflow. Do not declare a record unmatched just because a candidate limit truncated the search.

For an illustrative dataset of 10 million records with an average of 40 symmetric distinct candidates per record, approximately 200 million unordered pairs remain (10m×40/2). At the assumed 100,000/s, comparison computation alone would take about 2,000 seconds or 33.3 minutes. Real candidate generation, skew, joins and expensive learned scoring can dominate. If similarity model inference is costly, apply inexpensive filters first and escalate uncertain pairs to a more expensive matcher. Measure true-pair retrieval recall separately from matcher accuracy; a matcher cannot recover a pair that was never generated.

6. Probabilistic matching and calibrated confidence#

A matcher compares source attributes using typed evidence: exact identifiers, name token/edit similarity, address similarity, time-compatible contact details, product brand/model/variant agreement, and relationship context. Use explicit missingness indicators and source reliability. For names, character similarity can help with typographical variation but fails on common names and transliteration differences. Embeddings help candidate retrieval but semantic similarity does not establish identity.

The classical Fellegi–Sunter model estimates how likely a comparison pattern gamma is among true matches (m) and nonmatches (u). Under a conditional-independence approximation, add log likelihood ratios across comparison fields. Combine with the prior match odds for the actual candidate population. This is an instructive baseline, not a universal calibrated probability. Correlated fields such as city and postal code can double-count evidence; account for dependence or fit a discriminative model and calibrate.

Worked synthetic evidence: prior match probability within a particular blocking population is 0.02. Prior odds are 0.02/0.98 ≈ 0.020408. A rare verified contact comparison has illustrative likelihood ratio 100, name agreement 5 and address agreement 2. If the independence approximation is appropriate, posterior odds are 0.020408×100×5×2 ≈ 20.408, giving probability 20.408/(1+20.408) ≈ 0.9533. A conflicting verified identifier can invalidate the candidate regardless of that score. The ratios and prior are invented; empirical estimation and held-out calibration are necessary. A prior from all possible pairs is not interchangeable with a prior conditional on blocking. If contact agreement was already used to define the candidate cohort, estimate the conditional likelihoods coherently rather than counting it twice.

Learned pair classifiers can use logistic regression, gradient-boosted trees or transformer cross-encoders over approved field comparisons. Train on adjudicated positive and hard-negative pairs, not on a random sea of easy negatives. Prevent entity/group leakage between train and evaluation. Keep source type, region, language and population shifts in evaluation. Human-adjudicated labels are themselves fallible; preserve rubric and evidence revisions. Calibrate against a representative validation population and recheck when blocking, upstream sources or model versions change. A raw similarity score of 0.95 is not a 95% probability of identity.

7. Decision thresholds and risk-aware abstention#

Suppose a calibrated posterior p describes the probability of a true match under a validated pair policy. With a false-merge cost and false-split cost , simplified expected loss of merging is (1−p)C_FP and of leaving separate is p . If the only choices are merge and separate, merge when p exceeds C_FP/(C_FP+C_FN). With fictional costs 100 and 5, the threshold is approximately 0.9524. This toy pair-level model ignores cluster blast radius, review delay, unequal downstream permissions and irreversible effects. Mandatory constraints must be evaluated first.

Use three decision regions under a documented policy: auto-propose high-confidence links, review uncertain cases, and leave insufficient-evidence cases unresolved or separate. Auto-propose does not mean a cluster must be immediately activated. A high pair score can connect two large clusters and contaminate thousands of associations; gate by cluster-level impact, hard constraints and evidence coverage.

If human review has a cost and can reduce expected error, prioritize cases by expected value of review and downstream impact, while reserving a representative audit sample of auto-accepted and rejected decisions. Review-only-the-uncertain data is biased; it cannot measure auto-merge precision reliably. Set review service capacity and queue deadlines. When capacity is exhausted, leave uncertainty visible rather than lower thresholds just to clear the queue.

8. From pair predictions to globally consistent entities#

Loading diagram…

A pair classifier may score A–B and B–C highly while A–C is known to refer to distinct individuals. Naive connected components over high-confidence edges merge all three. Equivalence of true identity is transitive, but uncertain matching evidence is not. This is the bridge/chaining problem.

Union-find is efficient for monotonic merges but does not naturally support splits or uncertain edge retraction. Connected components can be acceptable only when the edge policy and cluster invariants make transitive closure safe. For noisy matches use constrained agglomeration, correlation clustering, graph partitioning or domain-specific assignment constraints. Evaluate cost and complexity; finding a globally optimal clustering under general pair constraints can be difficult. A greedy production approximation must have deterministic ordering, bounded work, recorded alternatives and explicit failure behavior.

Before merging two clusters, check all relevant cannot-links and entity-type and tenant constraints, mutually exclusive authoritative identifiers, effective-time consistency, and source-specific cardinality where appropriate. A single source may legitimately have duplicates; do not impose one-record-per-source universally. Consider cluster size, weak bridge edges, contradictions, score margins and evidence independence. Unobserved pairs are unknown, not automatically negative or positive. Where complete pair checks are too costly, use indexed cluster summaries for hard constraints and targeted member-level evaluation; route uncertain giant components to review.

A synthetic case: CRM A and order B share a verified account link; B and CRM C share a household phone. CRM A and C are independently confirmed distinct accounts. Preserve A–B as one entity and C separately; the household relation may be useful but is not identity equivalence. If the A–B binding is later withdrawn, reevaluate membership rather than remove all evidence indiscriminately.

9. Human adjudication and reversible mapping changes#

A reviewer sees authorized source revisions and comparisons, conflicting evidence, affected cluster memberships, proposed identity change, uncertainty and potential downstream impact. The proposed operation must bind exact source and mapping revisions, not a mutable search result. Provide accept, reject, insufficient-evidence and request-specialist options. Separate identity review from access or business action approval. For high-impact changes require appropriately qualified independent reviewers and separation of duties.

Loading diagram…

Use append-only mapping revisions with an authoritative current pointer or transactional valid-time interval updates plus recorded-time history. A merge records which source members move, surviving entity identity, retired alias IDs, reason, evidence, reviewer and predecessor. A split explicitly assigns all affected members and dependencies to retained or newly issued entities. Do not merely remove an arbitrary graph edge and assume the resulting groups represent truth. Stable survivor selection should follow a documented policy, never the member with the most sensitive profile.

Do not destructively delete original records or rewrite their source-native identities. On correction, publish a new mapping revision. A retired canonical ID may have a historical alias/redirect for a specific epoch; do not unconditionally redirect an old ID after a split, because one old ID may now represent several entities. Resolve with source identity, revision and authorized context or return ambiguous. Prefer fresh IDs for separated clusters under a policy that avoids reusing retired IDs. Preserve predecessor and member history rather than silently reassigning an ID to an unrelated entity.

For concurrency, freeze the proposal's expected component revisions, source evidence versions and rules. At commit recheck authority and current constraints, lock affected entities/records in stable order or use conditional revision checks and retry on conflict. Ensure each active source identity has at most one canonical assignment for the intended equivalence contract. Atomically record changes and an outbox event or use an equivalent durable protocol. A global epoch is simple but can serialize unrelated tenants; production can use scoped component versions and consistent release manifests.

10. Temporal identity and historical correctness#

Identity mapping has at least two clocks: effective time (when the relation is considered valid in the domain) and recorded time (when the platform learned and approved that relation). A source key may be reassigned over time; source incarnation or a verified validity interval is necessary. A brand reorganization may be a typed succession relationship, not identity across every past date.

Suppose on day 10 the CRM and order IDs are separate. On day 20 a merge is approved with evidence supporting identity since day 5. On day 30 the merge is found erroneous and a split is approved. A day-15 as-known training or prediction replay must not use the day-20 decision; a day-25 original replay can use the approved merge even if hindsight later disputes it. A corrected retrospective dataset may apply the day-30 correction to earlier effective dates under its explicit policy. Current serving must use the approved eligible mapping and current permissions. Preserve both temporal axes where needed, not a single mutable updated_at column.

Example mapping API inputs include trusted scope, entity type, source identity, effective cutoff, knowledge or release cutoff, and purpose. Return exact canonical identity and mapping revision, eligibility and optional ambiguity status. For high-risk joins, unknown or ambiguous is preferable to silently returning a guessed identity. Historical lookup must not bypass current deletion and access requirements; reproducibility is distinct from authorization.

11. Downstream feature consistency: identity is part of the model input#

Entity resolution changes feature meaning even when the schema is unchanged. A customer-level rolling spend feature aggregates transactions using a mapping revision. Suppose customer entity A has 3 orders totaling $120, and B has 2 orders totaling $80. A confirmed merge yields 5 distinct orders and $200, assuming no duplicated order identities and compatible observation windows. If one $30 order is recorded in both systems, the correct distinct total would instead be $170 with four unique orders. Resolve transaction identity separately; customer matching alone does not justify deduplicating payments or summing all source rows.

A false merge contaminates aggregates, labels, recommendation history, graph relationships and potentially train/test separation. A split cannot safely copy the old aggregate to both new IDs; rebuild from scoped source facts and correct event identities. Non-additive features such as distinct items, quantiles and learned embeddings generally require recomputation or a validated reversible state representation. Preserve lineage to determine affected windows and consumers.

Loading diagram…

Maintain an explicit dependency index from source members and canonical IDs to feature partitions, training/example groups, indexes, prediction artifacts and authorized consumers. Durable events include old/new mapping revision and affected scope. Consumers use idempotent processing, exact predecessor/ordering contracts and reconciliation for missing events. A consumer should not mix old identity mapping with a new feature aggregate whose membership differs. Publish compatible bundles or invalidate affected use until reconstruction passes. ASD-011 provides isolated rebuild and fenced promotion; ASD-014 provides feature/model compatibility; here identity revision is an additional dependency of both.

A frozen evaluation benchmark can be invalidated by discovery that a training entity and a test entity were actually the same. Preserve old split membership and disclose contamination; issue a new benchmark revision and reevaluate. Do not secretly reshuffle the original benchmark and compare metrics as if unchanged. Past predictions and action receipts retain their actual mapping revision. If a merge affected access or a decision, contain unsafe current use and reconcile actual effects with accountable owners; correcting the mapping does not reverse the decision.

12. Tested implementation: constrained versioned identity mapping#

The standard-library Python fixture models the commit boundary after matching and review. It uses a fixed synthetic set of source records, full mapping snapshots by epoch, hard cannot-link constraints, type and tenant constraints, and a fresh-ID rule. It checks an expected epoch and a trusted approval flag. A merge changes assignments; a split issues a fresh entity ID for the separated member. Prior epochs remain unchanged. This is deliberately not a matching algorithm, graph clustering solver or production authorization implementation.

PYTHON
from dataclasses import dataclass @dataclass(frozen=True, order=True) class Record: tenant: str source: str key: str kind: str class Resolver: def __init__(self, mapping, cannot_link): self.history = [dict(mapping)] self.cannot_link = set(frozenset(p) for p in cannot_link) self.used = set(mapping.values()) def resolve(self, record, epoch): return self.history[epoch].get(record) def publish(self, expected, changes, approved): if expected != len(self.history) - 1 or not approved or not changes: return False old = self.history[-1] if not set(changes) <= old.keys(): return False new = old | changes groups = {} for r, entity in new.items(): groups.setdefault(entity, set()).add(r) old_ids = set(old.values()) for entity, members in groups.items(): if entity in self.used and entity not in old_ids: return False if len({(r.tenant, r.kind) for r in members}) != 1: return False if any(pair <= members for pair in self.cannot_link): return False previous = {r for r in old if old[r] == entity} if previous and not previous & members: return False if new == old: return False self.history.append(new) self.used.update(new.values()) return True a = Record('t1','crm','7','customer') b = Record('t1','orders','93','customer') c = Record('t1','crm','8','customer') d = Record('t2','crm','7','customer') e = Record('t1','catalog','7','product') f = Record('t1','orders','94','customer') r = Resolver({a:'A',b:'B',c:'C',d:'D',e:'E',f:'F'},[(a,c)]) assert r.resolve(a,0) == 'A' assert r.resolve(e,0) == 'E' assert not r.publish(0,{b:'A'},False) assert r.publish(0,{b:'A'},True) assert r.resolve(b,1) == 'A' assert r.resolve(b,0) == 'B' assert not r.publish(0,{f:'A'},True) assert not r.publish(1,{c:'A'},True) assert not r.publish(1,{d:'A'},True) assert not r.publish(1,{e:'A'},True) assert len(r.history) == 2 assert not r.publish(1,{f:'B'},True) assert r.publish(1,{b:'G'},True) assert r.resolve(b,2) == 'G' assert r.resolve(b,1) == 'A' assert r.resolve(a,2) == 'A' assert not r.publish(2,{b:'G'},True) assert not r.publish(2,{Record('t1','crm','missing','customer'):'G'},True) assert not r.publish(2,{a:'G',b:'A'},True) assert r.publish(2,{f:'G'},True) assert r.resolve(f,3) == 'G' assert r.resolve(f,2) == 'F' assert r.resolve(c,3) == 'C' assert r.resolve(d,3) == 'D' assert len(r.history) == 4 print('25 checks passed')

Actual local execution on Python 3.13.5:

25 checks passed

The 25 assertions cover scoped initial mapping, approval requirement, successful merge, original mapping preservation, stale epoch refusal, cannot-link violation, cross-tenant and cross-type rejection, no partial publication after rejection, refusal to reuse a retired ID, split to a fresh ID, retained history, no-op rejection, unknown source record, prohibition of complete reassignment of an existing ID to unrelated members, later independent merge and unaffected records. The exact executed code was 2,653 bytes excluding terminal newline, MD5 2c9d157f87493507ba2fdeb2426f0b7e.

The fixture assumes trusted initial mappings and constraints, approved normalized source identities, unique canonical IDs across its synthetic registry, an authorized caller and complete current input. It does not validate the initial mapping, authenticate reviewers, enforce actual purpose access, accept new source records, model effective-time ranges or source incarnation, persist to durable storage, compute pair scores, or implement transactional concurrency. The approved Boolean is not a real review receipt. The check requiring at least one previous member for a surviving entity is a conservative fixture rule, not a proof of identity; a real system needs exact merge/split lineage and explicit authority. The resolve method assumes a valid nonnegative epoch; Python negative indexing is not a valid public API contract. Production must validate scope and requested epoch and enforce access independently. All historical snapshots are stored in memory; no deletion or retention policy is implemented. The pure publish function is sequential, not a database compare-and-swap. It verifies selected cluster constraints only, not the truth of every accepted link. No actual CRM, catalog, feature store, learned matcher, distributed graph job or security audit was run.

For N records, K clusters and C cannot-link constraints, the simple implementation builds groups in O(N) then scans all records and constraints for each cluster, yielding roughly O(K(N+C)) operations plus set comparisons; it also retains a full mapping per epoch, O(N×epochs) space. This is intentionally unsuitable for large deployments. In production maintain indexed member and constraint sets, scoped transactional changes, incremental mapping history and periodic immutable snapshot manifests. Store the complete event lineage necessary to reconstruct and verify a version without requiring a full duplicate table on every merge.

13. Capacity, streaming updates and failure handling#

Run initial linkage in bounded partitioned batches over pinned source snapshots, then process source changes incrementally. A record update invalidates affected candidate evidence, blocking index entries and cluster membership assumptions. Re-score neighboring candidates under a versioned snapshot and reevaluate affected constraints. Do not assume historical links remain valid forever. Corrections, contact reassignment, product variant changes and source-ID reuse can invalidate previously high-confidence links.

For an invented production workload of 1 million changed records/day and 30 candidate comparisons per record, offered work is at most about 30 million pair comparisons/day before deduplication and clustering. The average is about 347 comparisons/s; a burst of 10,000 changes/s would offer up to 300,000/s before deduplication. Size for burst, hot-key skew and expensive matcher fraction. If 5% of pairs require a transformer scorer, the average high-cost workload is about 17.4 pairs/s but bursts can reach 15,000/s. Benchmark actual model batches, token lengths, queue delays and accelerator capacity.

For a fictional review stream of 2,000 cases/day at 90 seconds each, required productive reviewer time is 50 hours/day. At five productive hours per person, this is ten reviewer equivalents before peak, training, absence and specialist needs. A queue SLA cannot be guaranteed from the average alone. Prioritize high-impact conflicts and representative audits, and explicitly hold unresolved high-risk assignments.

Partition by tenant/type and suitable blocking keys, but ensure multiple blocking passes can reconcile overlapping candidates within the authorized scope. Handle giant blocks by meaningful subdivisions and reviewed overflow policy. Use durable source and mapping checkpoints. A worker crash after committing a mapping but before acknowledgment should retrieve the existing receipt rather than apply the change again. A stale worker cannot publish a proposal based on a superseded component. Reconcile registry and downstream generations after failure; do not declare recovery solely because the candidate queue drains.

14. Quality evaluation: pair, cluster and downstream levels#

Measure blocking recall with independent known-match or representative adjudicated samples, including true pairs not generated by the candidate system. Measure pair precision and recall on the applicable candidate and target population, with correct sampling assumptions. Evaluate clusters using pairwise cluster precision/recall, B-cubed precision/recall or other suitable cluster metrics. Pair classifier accuracy alone can hide a single catastrophic bridge merge.

Illustrative evaluation: suppose an audited closed set has 1,000 true matched pairs, and the resolver outputs 950 links, 900 of which are correct. Pair precision is 900/950≈94.74%, recall is 900/1,000=90%, and F1 is 2×900/(950+1,000)≈92.31%. These numbers are not operational evidence. If the 950 are merely reviewed pairs rather than the full evaluated link set, naive precision and recall may be biased. A cluster of 100 entities erroneously combined from two groups of 50 introduces 2,500 false cross-group pairs, even if only one incorrect bridge edge caused the merge.

For an individual record i, B-cubed precision is the fraction of its predicted cluster that also belongs to its reference cluster, and B-cubed recall is the fraction of its reference cluster recovered in its predicted cluster; average over the declared population. Cluster metrics complement, not replace, critical false-merge audits. Evaluate by source, language, entity type, cluster size, common-name frequency, missing attributes and relevant authorized slices. Investigate score calibration and threshold drift after source/schema/model changes.

Monitor downstream effects: feature contamination, duplicate or missing attribution, split leakage, search/graph relevance, recommendation outcomes and latency of corrective rebuild. Use controlled evaluations and shadow mappings on approved data. Do not interpret a higher match rate as success if false merges rise. Track unresolved coverage, time-to-adjudication and impact of corrections.

15. Privacy and security#

Entity resolution is especially sensitive because combining records can reveal information that was not visible in any one source. Establish explicit permitted linking purposes and approved source combinations. Scope all candidate retrieval, normalization, reviewer access, storage, model training and mapping lookup by trusted tenant and purpose. Cross-tenant matching is denied by default. A legitimate cross-organization linkage requires a distinct authorized design and governance, not removal of a filter.

Minimize sensitive attribute retention. Encrypt local stores and protect key material; use restricted comparisons or approved privacy-preserving linkage mechanisms where necessary. Plain hashes of emails or phone numbers are vulnerable to enumeration and are not anonymity. Keyed tokens can help controlled exact matching but require careful key scope, rotation, access and threat analysis. Approximate matching over sensitive attributes requires independent security and privacy review; do not assume embeddings or Bloom filters are safe to disclose. Geographic residency and consent restrictions apply to derivative identities and comparison evidence as well as raw rows.

Human reviewers see only necessary evidence and cannot access another tenant's records through a suspected match. Limit exports and preserve protected audit trails. Adversarial source records may include crafted names, manipulated identifiers or injected text; normalize and parse safely and never let data modify authorization or matching rules. A learned score is not a substitute for verified account ownership.

Deletion and revocation propagate through mapping references, comparison artifacts, derived profiles, caches, feature generations, datasets and retained audit obligations. Recompute or withdraw affected clusters if evidence is no longer usable. Prevent historical replay from restoring prohibited mappings or data. Keep only permitted minimal lineage and document where historical reconstruction is no longer possible.

16. Operational monitoring and incident response#

SignalWhy it matters
Candidate count, blocking overflow and audited blocking recallDetect missed or exploding candidate sets
Pair score calibration, accepted/rejected audit precisionDetect matcher drift
Cluster size, weak bridges, cannot-link violationsDetect transitive contamination
Unresolved/review backlog, reviewer disagreementDetect insufficient evidence or capacity
Merge/split rates and reasonsDetect source changes and faulty automation
Mapping revision conflicts and event lagDetect coordination faults
Consumer mapping/feature version mismatchPrevent inconsistent input
Correction-to-rebuild latency and affected artifactsMeasure recovery exposure
Cross-scope denial and unauthorized join attemptsProtect trust boundaries

An incident might begin when a new normalization rule strips apartment numbers, causing unrelated residents to be joined. Freeze affected automated merges, identify exact rule, source revisions and mapping epochs, contain unauthorized current joins, and assess affected clusters and consumers. Preserve evidence and issue corrected mappings through authorized split proposals. Rebuild aggregates and evaluation groups, invalidate stale caches and reconcile past actions separately. Audit false merges and missed links after remediation and deploy a new versioned rule only after validation. Do not erase the original mapping history or claim all downstream effects disappeared.

Production tests should exercise actual source key reuse, tenant/type isolation, Unicode and variant normalization, missing identifiers, contradictory evidence, candidate recall and giant blocks, transitive constraints, simultaneous merge/split operations, stale reviews, transactional outbox failures, temporal mapping boundaries, consumer lag and partial reconstruction, deletion and backup restore, unauthorized reads and adversarial inputs. Validate calibrated matching quality on independently labeled representative data, including false merges among auto-accepted cases. Test actual feature and model effects at realistic scale. The executed fixture verifies a narrow commit model, not these end-to-end properties.

17. Interview-ready answer#

I would define the identity unit and source namespaces first, preserving native IDs, versions, types and original records. I would normalize attributes under explicit contracts and generate candidates through complementary scoped blocking passes, using verified identifiers for deterministic links and calibrated probabilistic or learned matching for uncertain cases. I would measure blocking recall, pair quality and cluster-level errors and enforce hard tenant/type and authoritative cannot-link constraints. I would never blindly take connected components of uncertain high-score edges.

I would publish only approved, versioned mapping proposals with expected predecessor checks, accountable human adjudication where required, stable canonical identities and explicit merge/split lineage. I would support effective-time and knowledge-time lookup, independently authorize every downstream join, and preserve source evidence. Mapping changes would trigger dependency-aware reconstruction of affected features, indexes and dataset split groups using immutable compatible generations. I would monitor quality, review capacity, stale mappings, correction impact and privacy boundaries, with controlled rollout and recovery. The architecture succeeds when it keeps identity decisions explainable and correctable while protecting downstream data and decisions from silent contamination.

References and research transparency#

Authorized offline research exception applied. References identify established record-linkage research, matching tools, provenance and security guidance. Current URL availability, contents and Supabase changelog were not live-verified. Four standard triple-backtick Mermaid diagrams were structurally reviewed; parser execution and frontend rendering were not tested. Python 3.13.5 local execution passed 25 assertions. No actual source-system integration, trained matching model, calibration study, distributed clustering, concurrent commit, production security or load testing was performed. All examples, probabilities, cost and throughput estimates are hypothetical.

Related questions

Explore other topics:Forward Deployed EngineeringMachine LearningMLOpsPython