Let’s talk

Book Recommendation System

  • #E-Commerce

A personalized recommendation engine for a US online bookstore with about 380k titles and 2.1 million readers. It blends collaborative and content-based filtering, learns from every rating and retrains every night.

  • Machine Learning
Reading app home screen with personalized book shelves on a tablet and a phone

Impact

The client runs an online bookstore and reading app with about 2.1 million registered readers and 14 million ratings. Every reader saw the same bestseller shelf, 68% of ratings landed on 3% of the catalog, and the merchandising team built lists by hand.

We built a hybrid recommender with a nightly feedback loop. One FastAPI endpoint serves ranked, explained shelves to the storefront, the iOS and Android apps and the weekly email, running in Docker on the client's existing cloud.

Services we provided

Data Audit and Cleaning

Recommendation Model Development

Offline and A/B Evaluation

Event Pipeline and Serving API

Merchandising Dashboard

QA, Load Testing and Rollout

Tech Stack

Python

Pytorch

FastAPI

PostgreSQL

Docker

Shelf diversity rules screen with a shelf before and after the rules
Recommender results for 30 days: click-through, NDCG@10, orders, retention and catalog coverage

Challenges and Solutions

🧐 Challenges

  • The rating matrix was 99.98% empty, and 41% of readers had rated fewer than five books.
  • About 6% of ratings came from bot-like or bulk-import accounts, and reader tastes shifted every 8 to 10 months.
  • Nobody had defined how a recommender would be judged against catalog depth, engagement and 30-day retention.
  • The storefront, two apps and the weekly email needed recommendations from one source in under 400 ms.

💡 Solutions

  • Data cleaning removed about 850,000 bot-like ratings and merged 23,000 duplicate editions before any model work.
  • A hybrid of matrix factorization, content-based filtering and item-to-item similarity, weighted per reader by how much the system knows about them.
  • Cold-start onboarding: new readers rate five books from a genre-balanced starter set at signup.
  • Every rating, skip and purchase lands on a Kafka topic; models retrain nightly and weekly, and shadow evaluation gates each promotion.
  • One FastAPI endpoint answers in under 120 ms from the Redis cache and under 350 ms at p95 when it re-ranks.
  • Each recommendation carries a reason, and diversity rules stop one series from filling a shelf.

Business value

  • 6.4% click-through on personalized shelves, roughly 3x the old popularity shelf.
  • NDCG@10 of 0.38 on the holdout, up from 0.21.
  • 27% of orders now start from a recommendation, up from about 9%.
  • +18% lift in 30-day reader retention.
  • <350 ms p95 for freshly ranked recommendations.
  • 31% of the catalog shown on a shelf in a given month, up from about 3%.

User flow

1. A reader rates, samples, wishlists or buys a book.
2. The event lands on a Kafka topic within a second and updates the reader's history.
3. Collaborative and content-based filtering each return a candidate list.
4. Candidates merge into one ranked list, weighted per reader, with diversity rules applied.
5. The reader sees the top 20 titles on a shelf, each with a reason attached.
6. Overnight, the models retrain on new interactions, and shadow evaluation gates every update.

This website uses cookies

We use cookies to personalize content and advertising, provide social networking features, and analyze our traffic. We also share information about your use of our website with our social media, advertising and analytics partners, who may combine it with other information you have provided to them or collected from your use of their services. You agree to our cookies if you continue to use our website.

Okay, I understand