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-08-24Advanced

A Provenance Gate That Never Asks Gemini to Name the Country

How I rebuilt the pre-publish provenance check for a ukiyo-e wallpaper app, moving from asking the model to name a country to asking it only to list the marks physically present on the paper. Includes the working code, the decision table that lives on my side, and why an abstain path had to come before accuracy.

gemini108vision5structured-output27classification2workflow10

Premium Article

I was holding two prints side by side: a Japanese ukiyo-e woodblock depicting a Chinese court beauty, and an actual Chinese New Year print. To my eye, both were simply "Chinese-looking pictures." These were source images for a ukiyo-e wallpaper app I run as an indie developer, so shipping a Chinese print by mistake was not an option. I stopped sorting and sat there for a few minutes.

When I put the same question to Gemini, an answer came back immediately for both images. And the answer leaned in the direction I had implied. Ask "is this a Japanese ukiyo-e print?" and you will usually get a yes.

What that exchange showed me was not an accuracy problem. It was a problem with the shape of the question. Since then, provenance is not something the model decides. The model reports what is physically visible on the paper, and nothing else.

A note before going further: the images here are public-domain historical woodblock prints, not generated artwork. AI is used only in the inspection stage before distribution. The same assets ship on both the App Store and Google Play, so pulling something back means doing it twice. If it is going to be stopped, it has to be stopped before release.

The subject matter is the loudest signal and the most misleading one

Japanese artists were fond of Chinese subjects. Court beauties, Chinese children at play, figures from classical anecdotes. Judge by the motif occupying the center of the frame, and the picture reads as Chinese. The reverse also happens, with Chinese prints whose composition and palette closely resemble Japanese woodblocks.

So the information covering the most pixels and the information that determines provenance do not coincide. Where the eye lands first is not where the answer lives.

Hand the whole image to a model and ask "is this Japanese?" and that loudest signal pulls the judgment along. Worse, the moment the word "Japanese" appears in the question, the answer tilts toward yes. Saying no requires finding grounds to reject the premise. If none are found, yes is simply the easier response.

I was making two mistakes at once: promoting an unsuitable signal to the lead role, and asking a question that carried its own answer.

Only marks pressed into the paper are usable

After working through several dozen source images, the list of signals that actually carry weight turned out to be short.

MarkWhat it indicatesCaveat when reading
Kana script, including variant kanaEffectively confirms a Japanese workAppears in the title slip or inscription. Confirming presence matters more than transcribing the cursive
Publisher and censor sealsConfirms a Japanese print that went through Edo-era publishingSits small in the margin and is the first thing lost to cropping
Artist signature and sealPoints toward identifying the artistIn one of the four corners. Often absent from partial enlargements
Long colophon in Chinese characters onlyRaises suspicion of a Chinese workNot decisive alone. Japanese prints carry Chinese-language encomia too
Multiple large red sealsRaises suspicion of a Chinese workOverlapping collector seals. An order of magnitude larger than Japanese print seals
Fine botanical study with Latin namesWestern botanical artGenuinely does turn up mixed into ukiyo-e source sets

As the right-hand column shows, no single mark settles the question. The one exception is the Japanese side: a single readable Japanese mark is decisive. The Chinese-side features stop at "suspect" and never reach confirmation.

The relationship is asymmetric. That asymmetry carries straight into the decision table below.

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
You will be able to decide when to replace an attribute classifier with an observer that only lists the evidence it can actually see
You will be able to separate out the inputs a model gets confidently wrong before they ship, avoiding the rework of pulling assets back after release
You will learn how to draw the abstain line without confidence scores, which removes threshold tuning from your workload entirely
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-06-14
Trusting Gemini Structured Output in Production — Schema Design, Double Validation, and Bounded Retries
Gemini's structured output guarantees parseable JSON, not correct values. Notes on schema design with @google/genai, why propertyOrdering matters, a Zod double-validation layer, handling MAX_TOKENS truncation, and a bounded-retry extraction pipeline.
Advanced2026-07-12
Spend Deep Reasoning Only Where It's Needed: Per-Request thinking_level Routing in Gemini
Running every request at high thinking_level bloats latency and cost; forcing low drops accuracy on hard questions. This walks through a router that picks Gemini 3.x thinking_level per request from an inexpensive difficulty estimate, keeping p95 latency inside a mobile budget while reserving deep reasoning for the questions that need it — with measured numbers and working code.
Advanced2026-07-11
A Risk-Tiered Approval Gate for Gemini Function Calling
Handing full autonomy to an agent is unnerving. This walks through a Gemini function-calling loop that routes tool calls into auto-run and hold-for-approval by risk tier, then feeds the result back to the model after a human signs off.
📚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 →