← All drills

Teach a Language Model What Sells Together

What you'll be able to do

Build Phase 1 of an LLM-backed recommender in miniature: adapt an open model to your own transaction records, then test what it learned against an exact answer, not an impression. You also learn the habit most teams skip, which is to build the simple baseline first and see what beating it costs.

⌁ Netflix's GenRec adapts an open language model to its own data before ranking. Amazon built its recommendations on item-to-item co-purchase counting. The exact miner and the counting baseline you build here are the standards any model has to beat.
Start this internship
Create an account to unlock the 12 sections, the workbench, and askThili.
Begin

Sections

1. Teach a Language Model What Sells Together
🔒 locked
2. A Shop's Catalogue
🔒 locked
3. How Much Each Item Sells
🔒 locked
4. Background Baskets
🔒 locked
5. Plant One Itemset
🔒 locked
6. Plant Many
🔒 locked
7. The Exact Answer
🔒 locked
8. Verbalize a Basket
🔒 locked
9. The Off-the-Shelf Baseline
🔒 locked
10. Continued Pretraining
🔒 locked
11. Probe the Model
🔒 locked
12. From Itemsets to Cross-sell and Upsell
🔒 locked

Dig deeper

📄GenRec: An LLM-Backed Recommendation Ranker at Netflix (Li, Sehgal, Rao, Houthooft, Zhu & Rastogi, arXiv:2608.10257)
paper
📄Fast Algorithms for Mining Association Rules (Agrawal & Srikant, 1994, VLDB)
paper
📄SmolLM2: When Smol Goes Big, Data-Centric Training of a Small Language Model (Allal et al., arXiv:2502.02737)
paper
📄Amazon.com Recommendations: Item-to-Item Collaborative Filtering (Linden, Smith & York, 2003, IEEE Internet Computing)
paper
🔗thili-ai/thilimarketbasket, the reference implementation you build in this course
code