DEV Community

Peter Tomko
Peter Tomko

Posted on

A real duplicate-detection finding from a crowdsourced grocery database

A real duplicate-detection finding from a crowdsourced grocery database

Continuing the Open Food Facts batch (see the
previous post for the dataset). This one's about
duplicate_detection — and it surfaced something the original Flipkart run didn't: duplicates
clustered in groups of three, not just pairs.

The finding

findings = CHECKS["duplicate_detection"](products, required_attributes=["brand", "category"])
Enter fullscreen mode Exit fullscreen mode

69 real findings, grouped by shared GTIN or matching normalized title+brand. Here's a
three-way group:

{
  "type": "duplicate_product",
  "severity": "medium",
  "sku": "6111035000058",
  "entity": "Eau minérale naturelle",
  "evidence": "Near-duplicate: normalized title+brand 'eau min rale naturelle' / 'sidi ali' shared across 3 SKUs. Other SKUs in this group: 6111035000058, 6111035002175, 6111035000027.",
  "explanation": "Multiple feed entries appear to describe the same physical product.",
  "recommendation": "Confirm whether these are true duplicates (merge/remove) or distinct variants that need a shared item_group_id instead.",
  "confidence": "medium"
}
Enter fullscreen mode Exit fullscreen mode

(Every member of that group of three gets its own finding, same as the two-SKU pairs in the
original series — the check doesn't just flag one side of a duplicate and call it done.)

Three separate barcode entries for what's almost certainly the same bottled water, likely
different bottle sizes or regional listings entered as if they were unrelated products — a
real, plausible catalog-hygiene gap in a crowdsourced database with no single owner curating
entries, which is exactly the kind of drift duplicate_detection's near-duplicate pass (matching
normalized title + brand, not requiring an exact GTIN match) is built to catch.

What this check didn't need to run on: variant_consistency

The companion check from part 4 — variant_consistency, which checks products sharing an
item_group_id for identical variant attributes — produced zero findings here, and it's worth
being precise about why: Open Food Facts' schema has no equivalent of a variant-group field.
There was nothing for the check to compare, not a clean bill of health. A real 0 from a missing
precondition and a real 0 from genuinely nothing wrong look identical in the output — the
difference only shows up in the feed's actual field shape, which is exactly why this series keeps
stating the reason behind every zero, not just the number.


Next: a genuinely surprising one — real malformed barcodes, found in a database that's
supposed to be barcode-first.

Apify Store ·
interactive demo

Top comments (0)