What real-time personalization is

Most recommender systems run in batch mode: an ML model builds a user profile from accumulated
history and recomputes recommendations periodically. That works for repeat customers with a rich
history behind them.

Real-time personalization solves a different problem — adapting to the shopper’s intent right now,
inside the current session, before the next batch recompute.

User → viewed 3 products in Running Shoes
→ the event reaches the engine (< 10 ms)
→ the next recommendation widget shows running socks,
  GPS watches and running shorts — not a cold bestseller list

Why it matters in e-commerce

For new users — there is no history for a batch model to use. Real time makes it possible to
start personalizing from the first click. Three to five actions in a session give enough signal for
a contextual selection.

For occasion-driven behaviour — someone who normally buys electronics has come in to find a
Mother’s Day gift. The batch profile will keep showing gadgets. Real time picks up the gift context
from session clicks within a few pages.

For high intent — an add to cart, a search for a specific SKU, the “in stock” filter are strong
intent signals that have to be acted on immediately.

Technical architecture

Component Function Latency requirement
Event API Receiving events from the client Async, does not block the UI
Session store (Redis) Holding the current session context < 5 ms read/write
Recommendation engine Serving a request with session context applied < 50–100 ms
CDN / edge cache Caching responses for popular contexts < 10 ms

Important: real-time personalization does not mean recomputing a heavy ML model on every
click. It means reading the current session context quickly and applying lightweight ranking rules
on top of candidates that are already prepared.

Combining it with the long-term profile

The best result comes from the combination: a long-term preference profile (purchase history,
category affinity) plus session context (what the shopper is doing now). When the two contradict each
other, the session signal wins — explicit intent outranks a historical norm.

Common implementation mistakes

  • Adapting too aggressively — if the recommendations change completely after every click, the
    user loses their bearings. The balance: take context into account, but keep some anchor positions
    in place.
  • Personalization with no fallback — if the real-time engine fails, the widget should show
    popular products, not an empty space.
  • Not measuring session lift — an A/B test of real time against batch has to be set up as a
    comparison of two strategies, with attribution scoped to the session.