Home / Insights / AI and Machine Learning
AI and Machine Learning
Recommendation Engines: Choosing Algorithms, Data and Metrics That Work
Recommendations drive engagement in e-commerce, media and SaaS. This guide explains the main algorithm families, what data each needs, how to handle cold start, how to measure recommendations offline and online, and a practical path from simple rules to machine learning.
TopicsAI and Machine LearningWeb and SaaS DevelopmentMobile App Development
Key takeaways
- Start simple: popularity and rules often provide a strong baseline and are needed anyway for cold start.
- Content-based filtering uses item attributes; collaborative filtering uses patterns of user behaviour; hybrids combine both.
- Modern systems usually work in stages: candidate generation, ranking and re-ranking for business rules and diversity.
- Evaluate offline with ranking metrics, then online with controlled experiments on engagement, conversion and retention.
- Data quality — clean events, consistent item IDs and rich metadata — matters more than algorithm choice.
On this page
Recommendations appear everywhere: “customers also bought”, “because you watched”, “suggested for you”. Done well, they help users find relevant items and increase engagement and revenue. Done badly, they repeat the obvious, promote what is already popular or feel intrusive.
This guide explains the main approaches and how to choose and measure them. For streaming-specific architecture, see our guide to AI for streaming platforms.
Algorithm families
| Approach | How it works | Strengths | Weaknesses |
|---|---|---|---|
| — | — | — | — |
| Popularity and rules | Bestsellers, trending, editorial picks, business rules | Simple, explainable, works for new users | Not personal; reinforces popular items |
| Content-based filtering | Recommends items similar to those a user liked, using attributes or text | Handles new items; explainable | Limited novelty; needs good metadata |
| Collaborative filtering (user- or item-based) | Users who behaved similarly liked these items | Discovers non-obvious relations | Cold start; sparsity |
| Matrix factorisation | Learns latent factors for users and items from interactions | Scales well; strong baseline | Cold start; less explainable |
| Learning to rank | Model scores candidates using many features | Combines signals; optimises business goals | Needs feature engineering and training data |
| Deep learning and embeddings | Neural models learn representations of users, items and sequences | Captures complex patterns, sequences and content | More data, compute and expertise |
| Association rules | Items frequently bought together | Good for basket and bundle suggestions | Not personalised |
| LLM-assisted | Language models interpret queries, generate explanations or enrich metadata | Natural-language discovery; better metadata | Cost, latency; needs grounding in the catalogue |
Production systems typically combine several approaches.
Staged architecture
- Candidate generation: several fast methods — similar items, collaborative filtering, trending, recently viewed — each propose candidates.
- Ranking: a model scores candidates using user, item and context features.
- Re-ranking: business rules apply — stock availability, margins, diversity, freshness, compliance and exclusions.
- Presentation: placement, explanations (“because you viewed…”) and logging for learning.
Data you need
- Interaction events: views, clicks, add-to-cart, purchases, ratings, watch time, returns — with timestamps and context.
- Item metadata: categories, attributes, descriptions, price, availability.
- User context: device, location (coarse), session behaviour; profile data only with appropriate consent.
- Negative signals: skips, returns, hidden items, quick abandonment.
Consistent item and user identifiers across channels are essential. Many recommendation projects stall on data quality rather than modelling.
Cold start
- New users: popular and trending items, onboarding preferences, contextual signals and quick learning from first sessions.
- New items: content-based similarity from metadata and text embeddings; controlled exposure to gather feedback.
Measuring recommendations
| Stage | Metrics |
|---|---|
| — | — |
| Offline evaluation | Precision and recall at K, NDCG, mean average precision, coverage, diversity, novelty |
| Online experiments | Click-through, conversion, revenue per session, engagement time, retention |
| Guardrails | Returns, complaints, unsubscribe rates, concentration on few items |
Offline metrics guide development; only online experiments show business impact.
Offline results often fail to predict online performance, so run A/B tests with control groups before scaling. Watch for feedback loops where recommendations only reinforce what was already shown.
Worked example: an online bookstore
A hypothetical bookstore with 200,000 titles and moderate traffic starts with “bestsellers in this category” and “customers also bought” based on order history. It then adds content-based recommendations using genre, author and description embeddings, which help new titles appear. Once it has a year of interaction data, it trains a ranking model that combines purchase likelihood, margin and stock, with re-ranking rules to avoid showing the same author five times and to exclude titles the customer already owns.
Each step is tested against a control group. The ranking model lifts conversion from recommendation widgets, but the team also tracks returns and the share of sales coming from outside the top 1,000 titles, to make sure recommendations broaden discovery rather than narrowing it.
Common mistakes
- Recommending what was just bought: exclude purchased items unless they are consumables.
- Ignoring stock: recommending unavailable products frustrates users.
- Over-optimising clicks: clickbait recommendations raise engagement but not satisfaction or revenue.
- No exploration: systems that only exploit known preferences stop learning.
- Leaking test data: evaluating offline on data that overlaps with training produces misleadingly good scores.
Responsible recommendations
- Transparency: explain why items are recommended where possible.
- Control: let users remove items from history and adjust preferences.
- Diversity: avoid narrowing choices excessively.
- Sensitive inferences: avoid recommendations that reveal health, financial or other sensitive information.
- Regulation: data-protection and platform rules may require consent, transparency or non-personalised options in some markets.
A staged roadmap
- Baseline: popularity, recently viewed and simple item similarity; instrument events.
- Collaborative filtering or matrix factorisation once enough interaction data exists.
- Learning to rank combining signals and business objectives.
- Deep learning and embeddings for sequences, content understanding and scale.
- Continuous experimentation with a holdout group to measure long-term impact.
Frequently asked questions
How much data do we need?
Content-based and popularity approaches work from day one. Collaborative filtering becomes useful once many users have interacted with many items; the exact threshold depends on catalogue size and behaviour.
Should we buy a recommendation service?
Managed services are a good start for many teams. Build custom when you need special business rules, unusual data or tight control.
Can LLMs replace recommendation algorithms?
Not for large-scale ranking. They are useful for understanding queries, enriching metadata and explaining recommendations, alongside traditional models.
How often should models be retrained?
It depends on how fast behaviour and catalogue change — daily for fast-moving retail, less often for stable catalogues — with monitoring to detect drift.
Sources and methodology
Facts in this article were checked against the sources below on 6 November 2026. Directory data (ratings, review counts, rate bands and team sizes) changes over time and is shown as published on the date accessed. Illustrative examples are labelled as such and are not quotes.
Related reading
Continue your research
Want better recommendations in your product?
Share your catalogue, users and data. We will help you choose an approach, build a baseline quickly and measure real impact.
