Skip to content

Method

Six steps, each with a guardrail. The live service uses Gemini without fine-tuning. Each answer retrieves only CBP rulings dated before the case.

Gemini on Vertex AI, no fine-tuningCitations must come from the rulings it read

What this does not show

Gemini’s pretraining exposure is unknown: we can’t tell which rulings it saw in training. The ruling search (BM25) weighs words by counts taken from every ruling, later ones included. Earlier test rulings can serve as precedents for later ones.

The process

each names its model

Pick the country's rulings

Gemini 3.8 Flash

Guardrail

The market is picked first. U.S. checks get the U.S. rules.

Recorded run: Kobalt heat gun

Vertex production snapshot
Route
Assembly
Origin rules
Where it became a new product

Methods we tried and dropped

Dropped

Fine-tuning Gemini

A tuned Gemini 3.5 Flash scored 87.9% against 91.1% for untuned Argon (development set): fixed 15, broke 30.

Dropped

A stricter rules prompt

90.9% to 91.1% on the development set: 10 fixed, 9 broken, no real gain, so the simpler prompt stayed.

Kept

The 0.92 bar for moves

On 18 later changes and controls, every move shown at the bar was right: 9 of 9. This bar is for moves; origin answers use calibrated 0.90.

Safeguards

Only earlier rulings

Illustrated 2022 cutoff
Earlier
Eligible
15 Nov 2022
Cutoff
Later
Blocked

Same-day rulings are blocked. N345938 and N357771 are later. The saved demo uses 14 Jan 2026.

The Jan–Sep 2026 test set of 377 CBP rulings was frozen before scoring.

Blind holdout protocol

Rulings for and against

Against
0 found
0.96Shown · bar 0.92

Later replay using the 6 Mar 2025 ruling. No qualifying counter-ruling recorded.

Recorded plan

Fixed rule check

19 CFR 102.20

Checks whether tariff codes change as the rule requires. Missing inputs leave it undetermined.

Recorded rule check

A move needs eligible support to clear the gate. Only CBP’s ruling binds.

Inputs and outputs of each stepTechnical· the exact fields

01 Pick the country's rulings · Gemini 3.8 Flash

Input

Product factsAPI field: facts: string
text

Output

Origin rulesAPI field: regime: string
rule set
Product typeAPI field: subfamily: string
type

02 Compare with past decisions · Gemini 4 Argon + ruling search

Input

Check dateAPI field: date: ISO date
date
Product factsAPI field: facts: string
text
Rulings to leave outAPI field: exclude_rulings?: ID[]
optional list

Output

Likely originAPI field: origin_country: string
country
Rulings citedAPI field: cited_rulings: ID[]
list

03 Confidence gate · 0.92 bar in the saved run

Input

Model’s own confidenceAPI field: confidence: 0–1
0–1
Calibrated confidenceAPI field: calibrated_confidence?: 0–1
0–1, if any

Output

Next stepAPI field: route: auto | needs_review | needs_info
accept, review or ask

04 Find parts to move · Rule-based search

Input

ProductAPI field: product: Product
parts and plants
Target countryAPI field: target: country
country

Output

Moves shownAPI field: plans: Plan[]
list
Moves set asideAPI field: rejected: Plan[]
list
Search countsAPI field: stats: Stats
numbers

05 For and against check · Gemini 4 Argon

Input

Facts before and afterAPI field: FactsA / FactsB
text
Target countryAPI field: Target
country
Cutoff dateAPI field: Before
date

Output

Ruling forAPI field: supporting_ruling?: ID
optional ruling
Ruling againstAPI field: counter_ruling?: ID
optional ruling
ScoreAPI field: confidence: 0–1
0–1

06 Answer what-if questions · What-if questions

Input

QuestionAPI field: question: string
text
Saved checkAPI field: case: saved check
case

Output

What-ifsAPI field: what_ifs: WhatIf[]
list
StepsAPI field: steps: Step[]
list
Rulings citedAPI field: cited_rulings: ID[]
list
Every experimentTechnical· what failed and how it was fixed

What failed and how we fixed it

Tariff shifts from model memory

The Part 102 model invented a compressor exception. Quoting the rule text still failed the adoption check.

Decision

One-sided precedent search

The early verifier could support a move without a targeted search for counterexamples.

Decision

Moves limited to two groups

The early planner never tried the three-group Kobalt move.

Decision
SourcesTechnical· evaluations, records and figures

Check the evidence

Where the time and cost figures come from

21 days: the team’s count of 247 Asian-origin CBP rulings, median to a binding CBP ruling.

20 hours: CBP’s estimate across all ruling subjects, not only origin.

About $3,600: median of 23 subsidized Korean exporter purchases (KOTRA export-voucher records).

These are not like-for-like populations and not a universal broker fee. UndeLabs figures are likely answers, not binding. Only CBP’s ruling binds. The savings story is illustrative.

The Kobalt backtest helped shape the search. It was not a blind test.