Written by
Halkwinds Editorial Team
Halkwinds Research & Editorial

Recommendation Systems: Building Engines That Actually Convert
How to design, train, and evaluate recommendation algorithms for e-commerce and content platforms — collaborative filtering, content-based, and hybrid.
Recommendation engines are one of the highest-leverage machine learning investments an engineering team can make, and also one of the easiest to get wrong. The gap between a demo that returns plausible-looking suggestions and a production system that measurably lifts conversion is enormous. In that gap live cold-start problems, feedback loops, stale features, latency budgets, and evaluation metrics that lie to you. This article walks through how to design, train, and operate a recommendation engine that actually moves revenue metrics — not just offline AUC scores. It's written for engineering managers who need to scope the work, staff it, and defend the roadmap to a product or finance stakeholder who cares about dollars, not embeddings.
- Background / Why This Matters
- Core Concepts and Architecture
- Implementation Strategy
- Scaling and Operational Considerations
- Common Mistakes / What to Avoid
- Frequently Asked Questions
- Conclusion
Background / Why This Matters
Recommendations sit on the critical path of nearly every modern consumer product. On e-commerce platforms they drive product discovery on the home page, "customers also bought" modules, and cart upsells. On content platforms they decide what appears in the feed, the "next up" queue, and the push notifications that bring users back. Estimates vary by source, but a meaningful share of engagement and revenue on large platforms is attributed to algorithmic recommendation surfaces rather than direct search.
For an engineering manager, the reason this matters is economic. A recommendation engine is a rare piece of infrastructure that can be tied directly to a top-line metric. If you can attribute a 2–4% conversion lift to a new ranking model — and prove it with a controlled experiment — you have a defensible case for continued investment. That directness cuts both ways: a badly instrumented system will also produce numbers, and those numbers will be wrong in ways that are expensive to discover later.
The other reason this matters now is that the tooling has matured. Five years ago, building a personalization stack meant assembling everything from scratch. Today, feature stores like Feast, deep learning frameworks like TensorFlow and PyTorch, and managed vector databases have removed a lot of undifferentiated heavy lifting. The bottleneck has moved from "can we build it" to "can we build the right thing and measure it honestly."
Actionable takeaway: Before writing any model code, agree with your product stakeholders on a single north-star business metric (conversion rate, watch time, revenue per session) and the experiment design you'll use to measure it. If you can't measure lift, you can't justify the system.
Core Concepts and Architecture
Recommendation approaches fall into three families. Understanding their trade-offs is the foundation for every downstream decision.
Collaborative Filtering
Collaborative filtering learns from interaction patterns: "users who behaved like you also engaged with X." It requires no knowledge of what items actually are — only who interacted with what. Classic implementations use matrix factorization (learning latent user and item vectors), while modern versions use neural collaborative filtering or two-tower architectures. The strength is that it captures subtle, non-obvious affinities. The weakness is the cold-start problem: it has nothing useful to say about a brand-new user or a freshly added item.
Content-Based Filtering
Content-based methods recommend items similar to what a user has already engaged with, using item features — text embeddings, categories, price, brand, image features. Because it relies on item attributes rather than interaction history, it handles new items gracefully. Its limitation is a tendency toward a "filter bubble": it keeps recommending more of the same and struggles to introduce serendipity.
Hybrid Systems
Nearly every production-grade recommendation engine is a hybrid. The most common and effective pattern in industry is candidate generation followed by ranking:
- Candidate generation (retrieval): Cheaply narrow millions of items down to a few hundred candidates. A two-tower model — one tower encoding the user, one encoding the item — produces embeddings you can search with approximate nearest neighbor (ANN). Collaborative signals often dominate here.
- Ranking: A heavier model scores the few hundred candidates precisely, using rich features: user context, item metadata, time of day, recent session behavior. Gradient-boosted trees or deep ranking networks are common.
- Re-ranking / business logic: Apply diversity constraints, inventory rules, promotional boosts, and freshness. This is where product requirements that have nothing to do with ML get enforced.
| Approach | Cold-start handling | Serendipity | Data needed | Best for |
|---|---|---|---|---|
| Collaborative filtering | Poor | High | Interaction logs | Established catalogs with dense engagement |
| Content-based | Good | Low | Item metadata | New items, sparse interaction data |
| Hybrid (retrieval + ranking) | Good | Medium-High | Both + features | Most production systems at scale |
Actionable takeaway: Don't start with the fanciest architecture. Start with a strong content-based baseline plus a simple collaborative model, then evolve toward a retrieval-and-ranking hybrid once you have interaction volume and a working evaluation harness.
Implementation Strategy
The order in which you build components matters more than the sophistication of any single one. Here is a sequence that consistently reduces risk.
1. Instrument before you model
You cannot train a recommender without clean interaction data, and you cannot evaluate one without reliable event logging. Establish an event schema — impressions, clicks, add-to-carts, purchases, watch duration — with consistent user and item identifiers and server-side timestamps. Log impressions, not just positive actions. Without impression data you can't distinguish "the user didn't want it" from "the user never saw it," which quietly corrupts every offline metric.
2. Ship a heuristic baseline
Before any ML, deploy a non-personalized baseline: most-popular-this-week, category best-sellers, or recently-viewed. This does two things. It gives you a live A/B control to beat, and it forces the serving infrastructure into existence early. Many teams discover that a well-tuned popularity baseline is embarrassingly hard to beat — which is a cheap lesson to learn before you've spent three months on a transformer.
3. Build the feature layer
Feature consistency between training and serving is where recommendation projects go to die. A model trained on features computed one way and served features computed another way will silently degrade. A feature store such as Feast solves this by defining features once and materializing them to both an offline store (for training) and an online store (for low-latency serving). This training-serving skew problem is real and worth designing against from day one.
4. Model with the right framework for the job
For candidate generation and deep ranking, TensorFlow (with TensorFlow Recommenders) and PyTorch (often with TorchRec for large embedding tables) are the two mainstream choices. TensorFlow Recommenders offers a well-trodden path for two-tower retrieval and integrates cleanly with TensorFlow Serving. PyTorch tends to be preferred by teams that value flexibility and are comfortable owning more of the serving stack. For the ranking layer specifically, don't overlook gradient-boosted trees (XGBoost, LightGBM) — they frequently match or beat deep models on tabular features with far less operational overhead.
5. Evaluate offline, but distrust it
Offline metrics — recall@k, NDCG, precision@k — are necessary for iteration speed but notoriously optimistic. They reward a model for reproducing historical behavior, which was itself generated by your old recommender, creating a self-reinforcing loop. Use offline metrics to filter out bad candidates, but treat online A/B testing as the only source of truth for business impact.
This staged build is exactly the kind of engagement Halkwinds structures for clients: our AI & ML team typically delivers a working baseline and evaluation harness in the first phase, then layers in personalization once the measurement foundation is proven, rather than shipping a black box you can't reason about.
Actionable takeaway: Sequence the work as instrumentation → baseline → feature store → model → online test. Skipping any early step to reach modeling faster almost always costs more time later.
Scaling and Operational Considerations
A recommender that works at 10,000 users and one that works at 10 million are different systems. Plan for the operational realities early.
Latency budgets
Recommendation surfaces are usually on the critical rendering path, so you're working within a tight budget — often tens of milliseconds. This is why the retrieval-and-ranking split exists: you run expensive scoring only on a small candidate set. Use approximate nearest neighbor search (FAISS, ScaNN, or a managed vector database) for retrieval, and cache aggressively for users whose context hasn't changed within a session.
Freshness and retraining
Decide how fresh recommendations need to be. A fashion retailer during a flash sale needs near-real-time signals; a long-form video platform can tolerate hourly or daily model updates. Real-time features (last five items viewed this session) usually deliver more lift per unit of engineering effort than more frequent full retraining. Separate your feature freshness strategy from your model retraining cadence — they have different costs and different payoffs.
Feedback loops and bias
Every recommender trains on data it helped generate. Items you show get clicked; items you never surface get no signal and slowly disappear. Left unchecked, this collapses catalog diversity and entrenches whatever bias existed at launch. Mitigate with exploration — deliberately serving some randomized or under-exposed items — and by logging propensity scores so you can correct for exposure bias during training.
Monitoring
Monitor the model like production infrastructure, not a science project. Track prediction latency, candidate coverage, catalog diversity, and — critically — the online business metric segmented by user cohort. A model can improve aggregate conversion while quietly wrecking the experience for new users. Alert on distribution drift in input features; a broken upstream pipeline is a far more common failure mode than the model itself "getting worse."
Actionable takeaway: Budget engineering time for exploration and monitoring from the start. They feel optional until the day your catalog diversity collapses in production and you have no data to diagnose why.
Common Mistakes / What to Avoid
- Optimizing the wrong metric. Maximizing click-through rate can train your system to serve clickbait that hurts long-term retention. Tie training objectives to durable outc
Explore Further