Case study · Data pipeline

Grocery Product-Matching Pipeline

Two large product catalogs describing the same groceries in incompatible ways. A five-stage entity-matching pipeline reconciled them into 12,721 verified matches for about 41 cents of compute.

  • Personal project
  • Python · FAISS · TF-IDF
  • 12,721 matches · ~$0.41

The problem

The same box of cereal appears in one dataset as "Cheerios Honey Nut 15.4oz" and in another as "General Mills Honey Nut Cheerios Cereal, 15.4 ounce box." Neither string matching nor embedding similarity is sufficient on its own: exact matching misses obvious pairs, and semantic similarity happily matches products that differ only in the size or flavor that actually distinguishes them. Comparing every product against every other product is also quadratic, which doesn't survive contact with a real catalog.

The approach

The pipeline runs in five stages, each one narrowing the problem so the expensive step at the end sees as few pairs as possible.

Why it's built this way

The design principle is to spend compute in proportion to difficulty. Cheap deterministic stages handle the easy majority of pairs, and the expensive, non-deterministic stage handles only what the cheap stages can't resolve. That ordering is what makes the pipeline both accurate and nearly free to run — and it keeps the vast majority of decisions reproducible and auditable rather than hidden inside a model.

Highlights

Stack

← Back to all projects