Recommendation Systems

Real-Time Personalisation Engine

A hybrid recommender serving next-best-content decisions within a live session.

Retrieve + rank

Stages

Session-level

Context

Sub-page-render

Serving

Architecture

Hover or tap any stage to see its role in the pipeline.

Data flow

Session events stream in, features are updated in the online store, candidate items are retrieved by embedding similarity, the ranking model scores them with session context, business rules filter and pin, and the API returns an ordered list.

Problem statement

Content and offers were delivered from static segments that ignored what the customer was doing in the current session.

Business objective

Serve relevant, ranked recommendations in-session with a latency budget compatible with page render.

Solution overview

A hybrid retrieval-and-ranking recommender: candidate generation from collaborative and content signals, ranked by a learned model with session context and business rules applied last.

AI / ML approach

Two-stage recommendation with embedding-based candidate retrieval, a ranking model over session and profile features, and a deterministic business-rule layer.

Model / LLM used

Embedding retrieval + gradient-boosted ranker

Technology stack

PythonKafkaRedisSparkFastAPIAWS

Key capabilities

  • In-session context awareness
  • Cold-start handling via content signals
  • Business rule overlays
  • Low-latency serving

Evaluation approach

  • Offline ranking metrics (NDCG, recall at k)
  • Counterfactual replay on logged sessions
  • Online A/B testing framework

Challenges

  • Cold-start users
  • Feedback loops reinforcing popular items
  • Strict latency budget

Solution decisions

  • Content-based fallback for unseen users
  • Exploration slots reserved in the final ranking
  • Precomputed candidates cached per segment

Business impact

Replaced static segmentation with live, explainable ranking decisions that respond to what the customer is doing right now.