Searching Yu-Gi-Oh! cards by what they do

The eval data

The files are in the GitHub repository.

What the write-up’s numbers were computed from. A card is its id (the passcode printed on the card); there is no card text. Card names appear as values (in a filter’s names field, a label such as a card named X, and in the value vocabulary of the rules) and in two notes: the tranche rules name Exosister Irene, and one query’s unmapped note names Banisher of the Light. Pins: card scripts commit 2a569dcd, card database of 2026-08-03. Each file repeats them. The gaps and the gate come from frames compiled by this project’s compiler at commit 37bf094 (2026-11-19; not published). Tuned Gemma and Gemini 3.8 Flash ran on 2026-11-18, on the frames before it; Hydrogen and the untuned Gemma ran after it.

retrieval/

file what it holds
queries.json The 20 queries: the English (asked_as), the seed card’s id, the printed filter every ranker ran after, the writer’s conditions, scope, counting rules and expected size. translation is the query in the filter’s language, as a Claude session wrote it; unmapped lists the parts it could not express. fully_mapped is true when nothing was dropped.
verdicts.json Per query, card id → yes, no or unsure: the final verdict after both judges and a Claude session’s rulings. Every F1 is against the yes cards.
rankings_top100.json BM25’s, ColBERT’s and the reranker’s top 100 per query, best first.
rankings_full.json BM25’s and ColBERT’s full ranking per query: every card that passed the printed filter, best first. Needed for BM25’s best cut-off (S05’s is past rank 100) and the source card’s ranks.
filter_answers.json The filter’s answer per query on compiled frames alone, by tier: matched (the answer) and reached and undetermined (the can’t tell tiers, disjoint from matched). The filter’s figures count matched: precision over the judged cards in it, F1 as below.
llm_judge_answers.json Per query, card id → true/false: the local LLM judge’s answer on each card of BM25’s top 100.
reranker_scores.json The reranker’s score for each card of BM25’s top 100, for the threshold baseline.
timings.txt The filter’s and the LLM judge’s run times, as the scripts printed them, with the setup.

gapfill/

file what it holds
gold.json The 439 held-out gaps. unit is card id:effect index:field. label is the gold value, or not_stated when the printed card does not state it. decided_by says how the label was reached (see below); decided_by_v2, where present, replaces it. clear marks 243 gaps. reader_changed, on the 182 labels the Opus reader decided, says whether it changed the label (true on 19; see below).
predictions/*.json Each run’s answer per unit: kind is fill (a value), silent (no answer) or deny (an empty answer: the card does not state it, the gold’s not_stated), with value. Five seeds of the fine-tuned and of the untuned Gemma 4 E2B, two runs each of Gemini 3.8 Flash and Gemini 4 Hydrogen.
rules/ The labelling rules, the value vocabulary and the system prompt (see below). The eight worked examples are not included because they quote card text.

The rules and the prompts. rules/ holds the labelling rules the labels were written under. The 439’s first passes read an earlier version of declined-train-INSTRUCTIONS.md, without the rules added after adjudication, and with an action slot pooled over all the effect’s actions (5 of the 439 are action slots on effects the compiler reads with several actions). Gemini 3.8 Flash, Gemini 4 Hydrogen and the untuned Gemma received system_prompt.txt with every rules file appended (all but relabel-CONVENTION-20261127.md, which came after every run) and 8 worked examples. The fine-tuned Gemma received only its part before “The answers you are compared with”, and was trained on labels written under those rules instead.

A gap names an effect by its index in the compiled frames, which are not published here (they derive from the AGPL-licensed scripts). The gold and the answers can be compared with each other without them.

How a label was reached (decided_by, and decided_by_v2 where present). Every reader below is a Claude model. I chose the labelling conventions and which of the reviews’ findings to fix, hand-checked 180 gaps (in six seeded draws of 30, 11 of them among the 439) and set one field of the 2026-11-27 relabel (below).

clear marks the 243 gaps whose final label came from two blind passes that agreed, with no third pass and no adjudication: the text after the last colon of decided_by_v2 (or, without it, of decided_by) is agreement or agreement+spot (one gap, whose agreed label my spot-check convention then changed); agreement+controller is not, since one field came from the old label, which the Opus reader had kept. 53 of them are relabels (step7, inplace, relabel). Since adjudication was triggered by an earlier model’s disagreement, clear leaves out the gaps an earlier model disputed, except 27 whose disputed label a relabel later replaced. So scores on clear against the rest measure that selection as well as difficulty.

Fixes (2026-11-26 and 2026-11-27). A list in one field means “or”, so a card kind beside one of its own subtypes reads as the whole kind. The card-type rule drops the kind there: TYPE_MONSTER beside a monster subtype and, since 2026-11-26, TYPE_SPELL beside TYPE_FIELD or TYPE_QUICKPLAY and TYPE_TRAP beside TYPE_COUNTER, the Spell and Trap subtypes the rules give to one kind only, which the compiler writes alone. The monster half is wider: it drops TYPE_MONSTER beside subtypes another kind can carry (Ritual, Pendulum, Token, Union and three others), since the compiler writes those alone too, so “a Ritual Monster” becomes TYPE_RITUAL alone, any Ritual card. In the 439 that touches two labels, 44221928:0:action.target_filter and 69811710:2:action.target_filter, and on both cards the narrowed type is exact: each also states an Attribute, which no Spell has. The rule had skipped labels stored as alternatives. Fixed, it changed 60394026:0:action.target_filter: “a Ryzeal or an Xyz monster” had read as a Ryzeal or any monster. 64187086:0:action.target_filter was relabelled (relabel:agreement above), and the extended rule then wrote its Field Spell alone. 9553721:3:action.target_filter, “a Spirit monster or a Ritual Spell”, had read as any Spirit monster, any Spell or any Ritual card. It was relabelled (relabel:agreement+controller above), the Ritual Spell written as TYPE_RITUAL excluding TYPE_MONSTER. No answer matched the old label and none writes an exclusion, so no fill moved. The added convention was applied to this relabel only; the card-type rule’s labels keep their form, which on the two cards named above (44221928, 69811710) already names the cards an exclusion would.

How the numbers are computed

Gap filling. Pool every run of a model (five seeds, or two runs) and compare each answer with its unit’s gold label:

Retrieval. For each query, the right cards are the yes verdicts.

Not reproducible from these files