◉GEMINI LABJP
●VEO 3.1 — The three veo-3.1 preview models shut down Oct 22, 14 days left. Move to gemini-omni-1.1-flash●OMNI — gemini-omni-flash-preview also shuts down Oct 22, not Sep 30. Check the deprecations table●NANO 2.1 — gemini-nano-banana-2.1 is GA. gemini-3.1-flash-image is deprecated with no shutdown date yet●CLI 0.63 — Gemini CLI stable is v0.63.0, with clearer retry progress on reconnect●TTS/LIVE — 2.5-era audio and TTS previews shut down Nov 17, 40 days left●NEW — Veo 3.1 previews stop Oct 22: take inventory before you swap●VEO 3.1 — The three veo-3.1 preview models shut down Oct 22, 14 days left. Move to gemini-omni-1.1-flash●OMNI — gemini-omni-flash-preview also shuts down Oct 22, not Sep 30. Check the deprecations table●NANO 2.1 — gemini-nano-banana-2.1 is GA. gemini-3.1-flash-image is deprecated with no shutdown date yet●CLI 0.63 — Gemini CLI stable is v0.63.0, with clearer retry progress on reconnect●TTS/LIVE — 2.5-era audio and TTS previews shut down Nov 17, 40 days left●NEW — Veo 3.1 previews stop Oct 22: take inventory before you swap
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.

gemini116vision5structured-output28classificationworkflow11

✦ 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-08-25
Rebuilding the CTR Denominator After AI Search Fans Out Your Queries
My top five queries by impressions all had zero clicks, and four of them were not phrases a person would type. Here is how I rebuilt the denominator and where I let Gemini make the call.
⬡ Advanced2026-04-27
Self-Healing Architecture for Gemini Computer Use — Production Patterns That Keep Browser Automation Alive Beyond Day Three
Gemini Computer Use looks magical in demos but breaks daily in production: vanishing elements, surprise modals, network jitter, off-by-four-pixel clicks. This guide builds a five-layer self-healing architecture in Python that classifies failures and recovers them automatically, with working code you can drop into your agent loop today.
⬡ Advanced2026-04-25
Building Self-Critiquing Agents with Gemini API: A Production-Ready Guide to Reflection and Critic-Refiner Patterns
A production-grade walkthrough of Reflection and Critic-Refiner patterns with Gemini 3 Pro and 3.5 Flash-Lite. Covers implementation, cost guards, over-correction defenses, and monitoring signals from real deployments.
📚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