|
This repository contains expanded tutorials and Python notebooks to accompany the book Building Recommender Systems Using Large Language Models by Jay. |
Within the chapter folders, you will find eleven expanded tutorials (with Chapter 1, 3, 4, and 7 containing two each), accompanied by Jupyter notebooks that walk through the code and experiments.
| Chapter | Tutorial Title | Description |
|---|---|---|
| 1 | Understanding Tokenization and Transformer Model | Explores how LLM tokenization works and how transformer-based models process input. |
| 1 | Understanding Content Embedding and Retrieval | Demonstrates how to generate embeddings and perform semantic retrieval. |
| 2 | From Traditional to LLM-Based Recommendations (MovieLens) | Transitions from matrix factorization to LLM-augmented recommendation using the MovieLens dataset. |
| 3 | Topic Classification and Item Similarity Labeling Using LLMs | Uses LLMs to generate labels for item classification and similarity, aiding downstream recommendation. |
| 3 | News Recommendation with Embeddings and Learning-to-Rank | Combines embedding extraction with traditional learning-to-rank methods. |
| 4 | Fine-Tuning LLMs for Personalized Movie Recommendations | Fine-tunes LLMs using preference data to deliver personalized movie recommendations. |
| 4 | Knowledge Distillation Using MovieLens Dataset | Distills a larger model into a smaller one using LLM-judged preference labels. |
| 5 | Conversational Recommendation System with RL and LLMs | Builds a dialogue-based recommender using reinforcement learning and LLMs. |
| 6 | Multi-Modal Fashion Recommendation with Pairwise Ranking | Uses CLIP embeddings and LLMs to build a fashion recommender from images and text. |
| 7 | Image-to-Avatar Generation | Transfer real user images into Ghibli and pixar styles and evaluate style transfer quality. |
| 7 | Goal-Driven Planning with LLMs | Demonstrates stepwise recommendation planning using reasoning-capable LLMs. |
Integrating Large Language Models (LLMs) into recommendation systems is transforming personalization, enabling deep context awareness and nuanced user understanding beyond traditional methods. As personalization becomes central to engagement and business growth, mastering LLM-driven approaches is essential.
This book covers:
- Fundamentals of LLMs and classic recommender systems
- Techniques like tokenization, retrieval, fine-tuning, and embedding
- Advanced topics: conversational recommenders, knowledge distillation, and multi-modal systems
- Future trends, ethical challenges, and system-level implications
- Practical, tutorial-driven implementations
Readers will be equipped to design, implement, and evaluate LLM-powered recommendation systems, and adapt the techniques to production use cases.
Jianqiang (Jay) Wang is a seasoned data science professional with a Ph.D. in Statistics and extensive experience across academia and industry. Formerly a Principal Applied Science Manager at Microsoft, Jay has also served as Visiting Professor at Colorado State University, Data Scientist at Twitter, Lead Data Scientist at Snap, and Director of Data Science at Kuaishou. His expertise spans backend algorithms for search advertising, customer growth, inventory optimization, and ML education—particularly in internet platforms and retail innovation.
