mirror of
https://github.com/rommapp/romm.git
synced 2026-11-29 18:11:16 +01:00
Validating the index against a 12.7k-game library surfaced four problems a synthetic fixture could not, because each depends on the shape of real metadata. Stop penalising well-documented games. Vectors were L2-normalised, on the assumption that facet counts behave like document length in text retrieval. They do not: a long document repeating a word is not more relevant, but a game tagged with three genres and two franchises genuinely has more in common than one carrying a single tag. Normalising by a vector's own length made every top match a sparsely-tagged entry -- a Mario compilation matched Golf, F-1 Race and Pinball (6-8 tokens each) while the actual Mario platformers (12-16 tokens) were nowhere in the list. Scaling by the library average instead returns Yoshi's Island, Super Mario 64 and Donkey Kong. Two hypotheses were measured and rejected on the way: franchise coherence via genre entropy (Metroid scored higher than Mario, so no signal) and the franchise/genre weight ratio (five configurations, none of which moved the result). Suppress duplicates against each other, not just against the source. Two discs of one release share an igdb_id and platform, so both took a slot in the same list. The same game ported to another platform gets its own igdb_id, so it needs a title comparison rather than an id one. Diversify across series. Similarity ranking alone made the section a franchise filter -- five Metroid games for Super Metroid. Slots are reserved at build time so the stored graph always carries cross-series options, and the per- series cap is applied when serving so the policy can change without a rebuild. Capped-out entries backfill a short list in score order. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>