← Binderdex dev log

Pick the cards before you render the page

#ai-agents#automation#tcg

A production line with an amber lens placed early, before the page is assembled, and a dashed outline at the end of the line where the lens used to sit

Four cards were still short of their five binder pages, and two of them sat at zero even after a round with the wider card pool allowed in.

Binderdex is my Pokémon card collection and price app. Its binder ideas are a public gallery of AI-generated, themed 3x3 binder pages. Each page is built around one centre card, with eight more cards picked to fit the theme. The goal is five pages for every centre card, which I call the quota. Delta Reign and Pitch Black are two Pokémon card sets I generate pages for.

Everything else about the generator looked healthy: 106 pages published for Delta Reign, 16 of 20 centre cards at quota, and acceptance made honest by the judge-bar work, where I fixed a pass mark that the scoring model could never reach. The obvious move was another retry round. I measured instead, and the measurement settled what to fix.

What the baseline said

Before changing anything, I ran a sample against Pitch Black and kept the receipts. Of 583 generation attempts, 364 failed the judge, the model that scores each rendered page, outright. Of the 122 pages the curator looked at, which is my publish check that runs fixed rules and has a model look at every card, 97 died because the title promised something the cards couldn't deliver. No curated page had fewer than two off cards, meaning cards that don't fit the theme.

That pattern is brutal, and writing isn't the cause. The idea is fine on paper every time. The nine cards seated around it were found by retrieval, which looks up cards near the idea. It doesn't look for cards that show it.

Retrieval finds a card whose embedding is close to the idea's text. Whether a fire-and-lightning artwork reads as a lightning storm across nine seats is a question only vision can answer. The pipeline asked that question last, after rendering, when a repair could swap only one or two cards.

The picker sits before the render

The new --picker flag moves the eyes forward. A vision model gets the centre card's scan plus a numbered contact sheet, a grid of images, of the 40 nearest candidates, and it picks the cards whose art delivers the idea in the palette:

// run-picker: vision chooses the cast before assembly
const sheet = renderPickerSheet(seed.scan, candidates.slice(0, 40));
const picks = await vision.pick(sheet, idea);
if (picks.length < 8) return ideaDone(idea); // too thin to build

// picks are seated first; the title may tighten to what they share
const page = assembleFromCandidates(idea, {
  keepCardIds: picks,
  fillRemaining: candidates.length - picks.length,
});
return curator.check(page); // still the last word

Fewer than eight honest picks ends the idea after one call, which is cheap. With eight or more, those picks are seated first, the picker may tighten the title toward what they share, and the curator still checks the rendered page. The quality gate didn't move. The moment somebody looks did.

WITH --PICKER ON Page idea+ seed scan Numbered sheet,40 candidates Vision picksthe cast Picks seatedfirst 8 or more fewer than 8 picks Idea endsafter one call Curator checksthe rendered page repair: approved cards keep their seats
Vision chooses the cards before assembly. The curator still has the last word on the rendered page.

Repair that keeps the good seats

The other flag, --repair, deals with pages the curator approves of only in part. The old retry rebuilt a killed page from scratch, minus the cards the curator named. An audit showed that description flattered it. The retry did exclude the off cards, but the greedy fill then picked different bad cards once the exclusions changed its choices. The fix is a constraint that lets approved cards hold their seats and only the off ones are replaced. A page that shares too many cards with an already-accepted page of the same seed is rebuilt without the shared cards instead of being dropped.

Two quieter changes rode along. The idea writer's schema now strips unknown keys instead of dying when the model invents an extra field, which killed a whole parallel batch of the run last round. And the writer prompt learned that a title has to name something all nine cards can show, which a narrow scene like a picnic or a tunnel rarely is.

Look before you compose

Both flags are off by default, so nothing publishes differently yet. Sample runs against Pitch Black come next. If the off-card rate moves the way the baseline suggests, the four short Delta Reign centre cards get their round with --picker on.

Every generated-content pipeline has a point where looking at the thing gets cheaper than generating it again. Mine looked after the render and paid full price for a page I already suspected was wrong. The rule I'm keeping: pick the primitives before you compose, so the checker's verdict lands on a page you had a chance to shape.

This is the build log for Binderdex (www.binderdex.com) · All entries · Weekly essays