Recall Sloth 用 Gemma 4 E2B 在瀏覽器比對 3,411 項美國消費品召回通知
Recall Sloth: nobody reads recall notices, so Gemma 4 reads 3,411 of them in your browser
Mike Kim 推出 Recall Sloth,讓 Gemma 4 E2B 在瀏覽器內比對用戶輸入的商品與自 2016 年起的 3,411 項美國消費品召回通知。
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady
What I Built
Every week the U.S. Consumer Product Safety Commission recalls something somebody owns: power banks that catch fire, dressers that tip over, sleepers that should never have been sold. The notices are public. Nobody reads them. I certainly don't.
Amazon doesn't help either. I went through my own order emails: 56 since 2014. 20 of them only name a category ("Ordered 1 item: Electronics"), and Amazon cut 23 of the 24 product names it did give ("Zinus Memory Foam 10 Inch...").
Recall Sloth is the lazy way to check. Paste what you own: a list, your Amazon "Your Orders" page, order emails, as they are. Gemma 4 E2B, running in your browser tab, checks every item against every U.S. consumer product recall since 2016 (3,411 notices) and sorts it into four piles:
- Recalled: the notice's own model number is in what you pasted.
- Check the label: same brand, same kind of thing, nothing rules it out. You get the notice's own sentence on where to look ("The model number A1263 is printed on the bottom") and what to do.
- Not this one: same brand, but the notice is about a different model, or a different kind of product, with the reason.
- No recall on file.
You do it once, it takes about ten seconds, and you can go back to not reading recall notices.
Demo
Live: recall-sloth.mikey9220.workers.dev. Press Try an Example List. The first run downloads Gemma 4 E2B once (about 3 GB; it then lives in your browser's cache). On my Mac, after that, ten items take about 8 seconds on the GPU. Without WebGPU, or if you'd rather not download anything, pick rules only under Model.
Code
mikey92
/
recall-sloth
Paste what you've bought; Gemma in your browser checks it against every U.S. consumer product recall since 2016. Nothing you paste leaves the page.
🦥 Recall Sloth
Nobody reads recall notices. Paste what you've bought; Gemma, running in your browser, checks it against every U.S. consumer product recall since 2016.
Live: https://recall-sloth.mikey9220.workers.dev · Evaluation: eval/EVAL.md
Paste a list, your Amazon "Your Orders" page, or order emails as they are. Every item comes back in one of four piles:
| Pile | When |
|---|---|
| Recalled | the notice's own model number is in what you pasted |
| Check the label | same brand, same kind of product, and nothing rules it out; you get the notice's own sentence on where to look ("The model number A1263 is printed on the bottom") and what to do |
| Not this one | same brand, but the notice is about a different model ("PowerCore 10000 (A1263); yours says 737") or a different kind of product |
| No recall on file | no recall shares its brand and its kind of product |
What you paste never leaves the page…
How I Built It
your text → item names (plain rules: lines, or the quoted titles in order emails)
→ candidates: recalls whose brand is among the item's first three words
AND that share what kind of thing it is
→ the notice's model number is in your item? → Recalled
→ both name a model, and the names don't meet? → Not this one
→ the name was cut short ("…Memory Foam 10 Inch...")? → Check the label
→ Gemma 4 E2B: is it even the same kind of product?
DIFFERENT, quoting only words from the notice → Not this one
anything else → Check the label
Most of the work is plain rules on purpose. A recall is only a candidate when it shares a brand with your item (in the brand position: "Zinus … Memory Foam" is a Zinus, not a recall by the company Quality Foam) and the kind of product. Model numbers decide everything they can: "Anker 737 Power Bank (PowerCore 24K)" is cleared from the Anker PowerCore 10000 recall because the notice covers model A1263 only, and no model is asked.
Gemma gets one narrow question, only where the rules can't decide: is this the same kind of product as the recalled one? Its "different" counts only when every word it quotes is in the notice, and never for a name that was cut short, because a cut name doesn't say what it is. When in doubt it's always "check the label", the safe direction.
The page is static files on Cloudflare's free tier. Gemma 4 E2B runs in a Web Worker through Transformers.js and ONNX Runtime Web on WebGPU. The recall list ships with the page, and the page also asks CPSC's public API directly for anything published since, so it stays current without a server or a cron job.
Measuring it: 353 real product names
I built the evaluation set from CPSC's own data, nothing invented:
- 258 positives: 150 products that were sold on Amazon and recalled, named the way their maker names them, plus 108 of those names cut short at about 28 characters, the way Amazon's emails cut them.
- 95 same-brand traps: another recalled product of the same brand but a different kind, checked against the recall (STIHL hedge trimmers vs. the STIHL chain saw recall). Different brands never get past the first step, so same-brand is where it gets hard.
Two errors, not equally bad. Wrongly dismissed (a recalled product called "not this one") is the dangerous one. False alarm (a fine product told to check its label) costs you a look.
| Close calls decided by | Recalled caught | Wrongly dismissed | False alarms |
|---|---|---|---|
| Rules only | 246/258 (95%) | 0 | 16/95 (17%) |
| Gemma 3 1B (Transformers.js) | 246/258 (95%) | 0 | 16/95 (17%) |
| Gemma 4 E2B (Transformers.js, what the page runs) | 246/258 (95%) | 0 | 5/95 (5%) |
| Gemma 4 E2B (Ollama) | 246/258 (95%) | 0 | 7/95 (7%) |
| Gemma 4 E4B (Ollama) | 246/258 (95%) | 0 | 8/95 (8%) |
Gemma 3 1B answered "same" to almost everything, so it changed nothing. Gemma 4 E2B took false alarms from 16 to 5 without dismissing a single recalled product, and the bigger E4B was no better. That's why the page ships E2B, even at 3 GB.
I read all 13 dismissals next to their notices. All 13 are right ("STIHL battery-powered hedge trimmers" → "The notice is about gas-powered chain saws"). The 5 false alarms left are mostly a different model of the same thing with no model number to compare (two Britax stroller recalls), where "check the label" is the honest answer. The 12 recalled products never caught are retrieval misses: names cut before the brand ("DeWALT, Stanley and..."), or notices whose title names no brand.
What it took to get there
- My first version wrongly dismissed 60 recalled products. Shown "Zinus Memory Foam 10 Inch..." next to a recall, Gemma 4 often said "different": the cut name doesn't say what the thing is. Now a cut name never reaches the model. Dismissals: 60 → 0.
- "6-drawer" is not a model number. My identifier filter marked every IKEA dresser "recalled" by model number because of "6-drawer" and "3-drawer". Number-word pairs are now excluded.
- A bad label in my own test set. Two Samsung Galaxy Note7 recalls landed in the set as a "different product" pair. They're the same phone; pairs that share a model designator are now excluded.
Full report: eval/EVAL.md. Everything reruns with node eval/run.ts.
Why Does Open Innovation Matter?
What you own stays yours. A purchase history is a map of your home, your health and your kids. With open weights the model comes to the data: what you paste never leaves the tab, and there's no server to leak it.
It can stay free. Checking a long order history is hundreds of model calls. On a hosted API that's a bill per visitor and a key to hide; here it's static files and your GPU, and the recall data is public domain.
I could measure what you get. The eval runs the same Gemma 4 E2B ONNX export through the same Transformers.js in Node (4-bit on the CPU; the page uses the 4-bit/fp16 build on WebGPU), with the same prompts and greedy decoding. Open weights also let me compare five setups on one Mac in an afternoon.
Where a closed model would be better: reading a long notice and explaining which units are affected in plain words. A frontier model would do that better. It would still need the same rules around it, and it would put a server and a bill between you and a ten-second check.
The Lazy Payoff
I ran it on my own order emails (read in my Gmail, kept on my machine). Of 24 named items, 22 have no recall sharing their brand and kind. One comforter was cleared against a robe recall. One "check the label": "HotHands Body & Hand Super..." against Kobayashi's recall of rechargeable HotHands warmers, model H163650. Mine were the disposable kind; the notice's own "how to tell" sentence settled it in five seconds. The tool couldn't, because Amazon cut the name right before the word that matters.
Nothing I own is recalled. Finding that out by hand means a search on cpsc.gov for every brand I've bought from in ten years. Finding out with Recall Sloth took one paste and about ten seconds.
Prize Categories
Best Use of Gemma: Gemma 4 E2B in the browser decides the close calls, measured against Gemma 3 1B and Gemma 4 E4B on the same 353 cases.
來源:DEV Community · dev.to