Exact vs fuzzy duplicates: how to detect and handle each in a large dataset

Quick Overview

Explain the difference between exact and fuzzy duplicates and how to detect and resolve each in a dataset with millions of rows. Tests data cleaning judgment, string similarity measures, blocking and locality-sensitive hashing for scale, entity clustering and survivorship rules.

Exact vs fuzzy duplicates: how to detect and handle each in a large dataset

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Other

What is the difference between exact duplicates and fuzzy (near) duplicates, and how would you approach detecting and handling each in a large dataset? A typical setting is a customer or product table with tens of millions of rows merged from several sources. ```hint Count the comparisons Work out how many record pairs a naive fuzzy comparison checks at 10 million rows. What cheap step could shrink that number before any similarity is computed? ``` ```hint After the match Pairwise matches are not the end of the job. Think about what happens when A matches B and B matches C, and about which record's values you keep. ``` ### What a Strong Answer Covers - A clear definition of each type, including which fields define identity and what normalization happens before comparing. - Exact-duplicate detection by grouping or hashing at scale, with a deterministic rule for which copy to keep. - Fuzzy detection: normalization, similarity measures suited to each field, and how field scores become a match decision. - Scaling: why comparing all pairs is infeasible, and how blocking or locality-sensitive hashing generates candidate pairs. - Handling: thresholds with human review, grouping matches into entities, survivorship rules, audit logs, and measuring match quality. ### Follow-up Questions - How would you pick the match threshold, and how would you estimate precision and recall without labeling every pair? - Your blocking key is ZIP code. Which true matches do you miss, and how do you recover them? - How would you keep the deduplicated table current as new records arrive every day? - How does MinHash estimate Jaccard similarity, and how do the LSH band and row settings trade precision for recall?

Overview: Explain the difference between exact and fuzzy duplicates and how to detect and resolve each in a dataset with millions of rows. Tests data cleaning judgment, string similarity measures, blocking and locality-sensitive hashing for scale, entity clustering and survivorship rules.

PracHub logo
General
Nov 24, 2026
mediumData ScientistOtherData Manipulation (SQL/Python)
0
0

What is the difference between exact duplicates and fuzzy (near) duplicates, and how would you approach detecting and handling each in a large dataset?

A typical setting is a customer or product table with tens of millions of rows merged from several sources.

What a Strong Answer Covers Guidance

  • A clear definition of each type, including which fields define identity and what normalization happens before comparing.
  • Exact-duplicate detection by grouping or hashing at scale, with a deterministic rule for which copy to keep.
  • Fuzzy detection: normalization, similarity measures suited to each field, and how field scores become a match decision.
  • Scaling: why comparing all pairs is infeasible, and how blocking or locality-sensitive hashing generates candidate pairs.
  • Handling: thresholds with human review, grouping matches into entities, survivorship rules, audit logs, and measuring match quality.

Follow-up Questions Guidance

  • How would you pick the match threshold, and how would you estimate precision and recall without labeling every pair?
  • Your blocking key is ZIP code. Which true matches do you miss, and how do you recover them?
  • How would you keep the deduplicated table current as new records arrive every day?
  • How does MinHash estimate Jaccard similarity, and how do the LSH band and row settings trade precision for recall?