<- back

Cognate

I built Cognate to find Magic: The Gathering cards with similar effects, even when the wording differs. Select a card to see the model's closest matches.

Try Cognate / Source / How it works

What I built

I trained an E5 text-embedding model on 108,220 card pairs with Python, PyTorch and Hugging Face. Each pair shares a community tag for an effect, such as "card draw".

I built the explorer with SvelteKit. It has search, a card map and filters. Python calculates the matches in advance, so the site needs no application server.

Results

I measured agreement with community tags using nDCG@10. This score gives more credit to relevant cards near the top of the results.

On 3,016 development cards:

I used these scores to select the model. They are not an independent test or a human relevance study.

An earlier model scored 0.705 on held-out cards, using the same type of tag-based scoring. The current model has no held-out result.

Limitations

The full write-up has the test details, further limits and examples of poor matches.