Hunch

Categorize products in Google Sheets

Updated · Edoardo Panichi, maker of Hunch

=HUNCHPICK(text, options, question, as) reads a product title and returns the category it fits, chosen from a taxonomy you describe. Add "confidence" as the fourth argument and the same pair of formulas also returns how sure the model is, so the uncertain rows sort to the top for a person to check.

A catalog feed rarely has a category field worth trusting

Products arrive from several vendors, each with its own naming habit and its own idea of what counts as a category, or with no category field at all, only a title. Mapping every title to one taxonomy by hand works for a hundred products and stops being realistic well before ten thousand.

The taxonomy

=HUNCHPICK(A2:A1000, "home and kitchen: cookware, small appliances, kitchen tools and gadgets|furniture: chairs, tables, storage, shelving|bedding and bath: sheets, towels, bath accessories|outdoor and garden: patio furniture, planters, garden tools|electronics and accessories: cables, chargers, small gadgets|clothing and accessories|other")

In Excel: =HUNCH.PICK(A2:A1000, "home and kitchen: cookware, small appliances, kitchen tools and gadgets|furniture: chairs, tables, storage, shelving|bedding and bath: sheets, towels, bath accessories|outdoor and garden: patio furniture, planters, garden tools|electronics and accessories: cables, chargers, small gadgets|clothing and accessories|other")

Six categories, each described by what it holds, and other for the titles that do not belong to any of them. A general home goods catalog is shown here; a narrower store needs a narrower list, ten specific categories read better than six broad ones that argue with each other. Full syntax is on the HUNCHPICK reference.

Real outputs

Nine product titles copied straight from a catalog feed, capitalization and all.

RowAB
1Product titleCategory
2Ninja Foodi 8-qt 9-in-1 Pressure Cooker and Air Fryer, Stainless Steelhome and kitchen
3Set of 4 Rattan Outdoor Dining Chairs with Cushions, Weather Resistantoutdoor and garden
4300 Thread Count Egyptian Cotton Sheet Set, Queen, Whitebedding and bath
5USB-C to Lightning Cable 6ft Braided, Fast Chargingelectronics and accessories
6Women's High-Waisted Yoga Leggings with Pockets, Black, Mclothing and accessories
7Solar Powered LED Pathway Lights, 8-Pack, Warm Whiteoutdoor and garden
8Bamboo Bathroom Storage Cabinet with 2 Doorsfurniture
9Men's Merino Wool Crew Socks, 3-Packclothing and accessories
10Replacement Filter for XYZ-3000 Water Pitcher, 2-Packhome and kitchen

None of the nine titles land in other, including the replacement water-pitcher filter, which reads as home and kitchen despite being a spare part rather than the appliance itself. The bathroom storage cabinet is the one worth a second look: it lands on furniture, not bedding and bath, because the option list defines furniture by object type, chairs, tables, storage, shelving, rather than by which room the object sits in. That is the option list working as written, though it is worth rereading if your team expects anything with bathroom in the title to land in the bath category instead.

Confidence for review

=HUNCHPICK(A2:A1000, "home and kitchen: cookware, small appliances, kitchen tools and gadgets|furniture: chairs, tables, storage, shelving|bedding and bath: sheets, towels, bath accessories|outdoor and garden: patio furniture, planters, garden tools|electronics and accessories: cables, chargers, small gadgets|clothing and accessories|other", "", "confidence")

In Excel: =HUNCH.PICK(A2:A1000, "home and kitchen: cookware, small appliances, kitchen tools and gadgets|furniture: chairs, tables, storage, shelving|bedding and bath: sheets, towels, bath accessories|outdoor and garden: patio furniture, planters, garden tools|electronics and accessories: cables, chargers, small gadgets|clothing and accessories|other", "", "confidence")

Same title, same options, the fourth argument changed from nothing to "confidence". It returns a probability for the option that got picked, not the option itself, run it as a second column next to the category so you keep both.

RowABC
1Product titleCategoryConfidence
2Multi-Tool Camping Gadget with LED Light and Bottle Openeroutdoor and garden0.84
3Kids' Table and Chair Set with Storagefurniture1.00
4Cotton Throw Blanket, Grey, 50x60 inbedding and bath0.99
5Smart Plug Compatible with Alexa, 4-Packelectronics and accessories0.99
6Ceramic Plant Pot with Drainage Hole, 6 inchoutdoor and garden1.00
7Stainless Steel Water Bottle, 32oz, Insulatedhome and kitchen0.90

Every row in this set scores 0.84 or higher, which is not what a hand-picked set of cross-category items was expected to produce. The camping multi-tool, which could plausibly be read as outdoor gear or an electronic gadget, is the least confident of the six at 0.84, and even the kids' table and chair set comes back at a full 1.00 despite the taxonomy having no separate bucket for children's furniture. The lesson is not that these titles were easy to guess. A 0.6 cutoff, picked before looking at real data, would have returned nothing to review from this batch. Sort your own column by confidence first and read where the scores start dropping before you pick a number.

What to do with a low-confidence row

=SORT(FILTER(A2:C1000, C2:C1000<0.6), 3, TRUE)

Lowest confidence first. A single low score is worth a glance; several low scores clustered around the same kind of product usually mean the taxonomy needs one more bucket, not that the model guessed badly.

=COUNTIFS(B2:B1000, "outdoor and garden")

Once the category column is settled, a plain count per category is the merchandising number, how many SKUs sit in each part of the catalog, without opening a single product page.

Freeze the category column to values once the catalog is stable (Extensions › Hunch › Freeze selection to values), then rerun the formula only on new products added after that.

Limits

Copy the template to try this on your own catalog. The expense categorization guide covers the same HUNCHPICK pattern on transaction descriptions instead of product titles, and the general classification guide covers the pattern on any list.

Questions

How big can the option list get?
Up to 255 options. For a catalog with many subcategories, run the top-level pick first, then a second HUNCHPICK scoped to the rows in each top-level result for the subcategory.
Can it return my internal category ID instead of a label?
Not directly. The cell returns the option text exactly as written before the colon. Keep labels as the options, then VLOOKUP the returned label against your own ID table.
What does a low confidence score mean?
Either the title does not give a clear signal for any one option, or the taxonomy is missing a bucket that fits better. Read a sample of the low scores before assuming the rest of the column is fine.
Does it work on a title that is only a SKU code?
No, it needs words to judge. A bare code returns a low-confidence guess or lands in other. Add the product title or description column if that is all a feed gives you today.
What happens if two vendors describe the same kind of product differently?
Both titles are read on their own merits, so as long as each one contains real descriptive words, they can land on the same category even with no overlap in wording between them.

Run it on your own column

Copy the template (or use the Excel add-in), paste your key, point the formula at your data. Every formula here has its Excel spelling underneath. 100 rows free to start, then $29 for 5,000 rows. Credits never expire and there is no subscription.

Reference: HUNCHPICK

More guides