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:
- Current model: 0.714
- Original E5 model: 0.565
- Text-matching baseline (TF-IDF): 0.604
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
- A shared secondary effect can outweigh a card's main effect.
- Filters use 200 saved matches per card. They do not search all cards again.
- Long card text can be cut short. Some cards with only keywords are hidden from the map and results.
The full write-up has the test details, further limits and examples of poor matches.