GEMINI LABJP
CHAT — From August 26, Google Chat becomes the Ask Gemini hub for searching, drafting, catching up on threads, and managing tasks and events with Workspace context intact. Two days outANDROID — Gemini replaces Google Assistant on Android from September 4, eleven days from now. Now is the time to check any voice shortcuts you built on AssistantROBOTICS — gemini-robotics-er-1.6-preview shuts down on August 31, seven days out. The ER 2 line succeeds it with spatial reasoning, multi-step tool orchestration, and multi-robot coordinationPRICE — Gemini 3.7 Flash introductory pricing is $0.75 input and $3.75 output per million tokens through December 31. From January 1, 2027 it doubles to $1.50 and $7.50FREE — Google AI Studio still offers a free API tier with daily request limits and no credit card. If you only want to see how 3.7 Flash behaves, that is enough to startSCALE — The Gemini app crossed one billion monthly users on August 11. The split is settling in: 3.1 Pro for deep reasoning, the Flash line for production work where speed and unit cost decideCHAT — From August 26, Google Chat becomes the Ask Gemini hub for searching, drafting, catching up on threads, and managing tasks and events with Workspace context intact. Two days outANDROID — Gemini replaces Google Assistant on Android from September 4, eleven days from now. Now is the time to check any voice shortcuts you built on AssistantROBOTICS — gemini-robotics-er-1.6-preview shuts down on August 31, seven days out. The ER 2 line succeeds it with spatial reasoning, multi-step tool orchestration, and multi-robot coordinationPRICE — Gemini 3.7 Flash introductory pricing is $0.75 input and $3.75 output per million tokens through December 31. From January 1, 2027 it doubles to $1.50 and $7.50FREE — Google AI Studio still offers a free API tier with daily request limits and no credit card. If you only want to see how 3.7 Flash behaves, that is enough to startSCALE — The Gemini app crossed one billion monthly users on August 11. The split is settling in: 3.1 Pro for deep reasoning, the Flash line for production work where speed and unit cost decide
Articles/Advanced
Advanced/2026-07-10Advanced

The Day We Went From 30 Categories to 34 — Reclassifying 1,180 Assets Instead of 8,142

Adding categories to a taxonomy does not require reclassifying everything. Here is how embeddings and confidence margins narrowed a backfill from 8,142 assets to 1,180, with the numbers.

Gemini API219Image Classification3gemini-embedding-27TaxonomyCost Optimization13Indie Development14

Premium Article

When I expanded my wallpaper app's taxonomy from 30 categories to 34, the first thought was not about naming or UI. It was: what happens to the 8,142 images that are already classified?

A new category always steals from existing ones. Add "Night Cityscape" and some images currently filed under "Landscape" or "Urban" genuinely belong somewhere else now. But sending all 8,142 images back through Gemini felt wasteful in both money and wall-clock time.

Every time I face this trade-off as an indie developer, I am reminded that the design work is deciding where correctness and cost meet. Here is where I drew that line, using two signals: embeddings and confidence margins.

First, Put a Number on the Full Rerun

Before deciding anything, I priced out the naive approach. Each image goes to a Flash-tier model at roughly 768px along with the label definitions, and the model returns its top two labels as structured output.

MetricFull reclassification
Assets8,142
Input tokens per image (image + prompt)~1,120
Output tokens per image~45
Estimated cost~¥3,900
Wall-clock time (concurrency 8)4h 12m
Assets whose label actually changed1,046 (12.8%)

That last row is the whole story. We sent 8,142 images and 1,046 of them changed. Which means 87% of the calls confirmed an answer we already had. Skip those 87% and the cost and the waiting shrink with them.

To be clear about provenance: I did run the full pass once, purely to have ground truth for evaluating the selective method. In day-to-day operation, that full pass is exactly what we are trying to avoid.

Only Two Kinds of Assets Need a Second Look

A new "Night Cityscape" category can only steal from labels that are semantically adjacent to it. Images filed under "Cats" or "Geometric" are not going to migrate there.

So I defined the reclassification set as the union of two groups:

  1. Impacted-label assets — those carrying an existing label that sits close to a new category in embedding space.
  2. Boundary assets — those whose original classification had a small confidence margin, meaning the model was already torn.

The first group covers "the answer may change because of the new category." The second covers "the answer was shaky regardless." Without the second group, an ambiguous frame that could read as either landscape or night cityscape slips through the impacted-label net entirely.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
The selection rule that shrank a full backfill (8,142 assets, ~¥3,900, 4h12m) to 1,180 assets (~¥570, 38m), with measured results
Using gemini-embedding-2 to find which existing labels a new category will steal from, before sending a single image
A classification ledger with taxonomy_version and confidence margin — plus an analysis of the one boundary asset the method missed
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Gemini Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $15 for lifetime access
View Membership →

Related Articles

Advanced2026-07-15
A near-miss label won't fix itself on retry — a normalization layer for closed-vocabulary classification
When responseSchema enum returns an out-of-set label, retrying tends to return the same near-miss. From a wallpaper app's 30-category batch, here is the distribution of how labels miss, plus a normalization layer built on an alias table and gemini-embedding-2 nearest-neighbor, with measured results.
Advanced2026-07-17
A Japanese query won't surface its English twin — when embeddings notice language before meaning
Embed a translation pair with gemini-embedding-2 and the two halves won't be nearest neighbours, because language itself inflates similarity. Here is how I measured cross-lingual recall using translation pairs as ground truth, and what happened when I subtracted the language centroid.
Advanced2026-07-10
Images Made With a Retiring Model Can Never Be Made Again — Tracking Regenerability in a Ledger
When Gemini's image generation models shut down on August 17, the assets you made with them can no longer be reproduced the same way. Here is the ledger design and code I use to decide, before the deadline, which assets are regenerable and which must be frozen.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →