ML System Design · Module 37 of 47 · 12 concepts · about 14 min

Design: Event Recommendations

A complete design for recommending local events (concerts, workshops, meet-ups, sports) to people in a ticketing and events app: every item is new and expires, location and time dominate, friends matter, labels are registrations and attendance, and recommendations arrive by feed, search and notifications.

At work: Asked as 'design event recommendations' or as a variant for any short-lived items: job postings, flash sales, live streams, rental listings with dates. It tests cold start more directly than any other recommendation problem.

Requirements

What it is

Outing, a made-up events app, lists local events and sells tickets. Clarify:

  • scale: a few million monthly users; about 40,000 upcoming events in a large city at any time; thousands added daily;
  • surfaces: a 'for you' feed, 'near you this weekend', and a weekly email or push notification;
  • goal: more people register for and attend events they enjoy; organisers sell tickets;
  • latency: the feed within about 200 ms; emails computed in batch;
  • constraints: events are tied to a place and a time; many are free; some are age-restricted; sold-out events must not be shown.

Why it matters

Events differ from products and videos in three ways that drive the design.

  • Every item is new: an event exists for a few weeks, so there is little or no interaction history for most of its life.
  • Location and time dominate: a perfect event 80 km away, or yesterday, is worthless.
  • Social influence is strong: people go where their friends go.

In the real world: Research on event-based social networks (such as studies of Meetup data) highlights the same three properties: new items, location, and group or social influence.

Copying a video recommender. Item ID embeddings learned from history barely exist for events that were created last week.

Framing

What it is

Rank events for a user as a pointwise prediction (module 14):

  • target: probability the user registers (or buys a ticket) for the event after seeing it, within the time before it starts;
  • second target: probability they actually attend (check-in), arriving after the event;
  • offline metrics: AUC and NDCG at 10, split by event date (train on past events, test on later ones);
  • online metrics: registrations per user per week, attendance rate, email click-through, unsubscribes as a guardrail;
  • baseline: popular events nearby this weekend.

Why it matters

Registration is the frequent signal; attendance is the truer one.

  • Free events attract many registrations and many no-shows, so attendance, where known, is weighted more.
  • A time split by event date is essential: random splits leak who registered for future events.

In the real world: Ticketing platforms commonly track 'registration to attendance' rates by event type, because free events have much higher no-show rates.

Optimising registrations for free events alone. Organisers judge the platform by turnout; a feed of free events people register for and skip harms them.

Candidate generation by place and time

What it is

Candidates come mostly from filters, not embeddings:

  • a geospatial index of events (by latitude and longitude, or grid cells such as geohashes);
  • a time window (this weekend, next 30 days);
  • hard rules: not sold out, registration open, allowed for the user's age;
  • then, if many remain, a light ranker or embedding similarity to pick a few hundred for the main ranker.

Why it matters

Place and time remove most of the catalogue cheaply and with certainty.

  • Whatever remains is small enough to rank fully.
  • Distance and time-until-start then become the most important ranking features too.

In the real world: Event and local-services apps typically use geohash or similar grid indexes so 'events within 15 km' is a fast lookup.

Visual example

Computed

From 40,000 upcoming events to a few thousand candidates with three filters.

Illustrative share kept at each filter
filterevents left
Upcoming events in the city40,000
Within 15 km of the user14,000
In the next 30 days8,400
Not sold out, not past cut-off, allowed for the user7,140

A light ranker then picks the top few hundred for the main model.

Filtering only by city. A large city spans an hour or more of travel; distance from the user's usual locations matters far more than the city name.

Practise it: Design a Recommendation System, Design a Personalized News Feed

Features

What it is

Grouped:

  • user-event: distance from the user's home and work (or current location); time until the event; overlap with the user's usual free times (weekends, evenings); price relative to what they usually pay; category affinity (past registrations by category);
  • social: number of friends or followed people registered; the user's history with this organiser;
  • event: category, price, capacity, organiser's past attendance rates and ratings, description and image embeddings, registrations so far relative to capacity and time remaining;
  • context: day of week, weather forecast for outdoor events, surface (feed versus email).

Why it matters

The strongest features describe the relationship between user and event (distance, time fit, friends going), not the event alone.

  • Organiser features carry history to new events: a new event from an organiser whose past events were well attended inherits that signal.
  • Content embeddings let a new event match users who liked similar events.

In the real world: Friends attending is consistently one of the most predictive signals for social events, which is why event apps ask to connect contacts or social accounts.

Leaking final registration counts. 'Total registrations' for a past event includes registrations after the moment of the training example; use registrations so far at that moment (point-in-time, module 11).

Practise it: Design a Demand Forecasting Platform, Design a Predictive Maintenance System, Design a Real-Time Fraud Detection System, Design an ML Feature Store

Cold start is the normal case

What it is

Most events have little history for most of their life. Design for it:

  • rely on content (description, category, images) and organiser features rather than event ID embeddings;
  • use registrations so far relative to how far ahead the event is, since early signals are thin;
  • give new events exploration exposure to gather early signals;
  • for new users, ask for interests and location at sign-up; use popular-nearby until signals arrive.

Why it matters

Registrations pile up close to the event date, so for much of an event's life the model sees almost nothing.

  • Features that transfer from similar events and from the organiser fill the gap.

In the real world: Organiser reputation (past turnout and ratings) is the main cold-start signal for new events on ticketing platforms.

Visual example

Computed

Share of an event's eventual registrations made by each point before it starts. A month out, a popular event looks almost empty.

Illustrative registration curve
days before the eventregistrations so farregistrations still to come
3010%90%
1430%70%
750%50%
280%20%
0100%0%

Divide registrations so far by the expected share at that age to compare events fairly.

Comparing raw registration counts between an event next week and one in two months. The later one is not less popular, just earlier in its curve; normalise by expected registrations at that point.

Practise it: Design a Real-Time Anomaly Detection System, Design a Recommendation System, Design a Model Serving Platform

The model

What it is

A gradient-boosted model (module 12) is a strong, practical choice:

  • pointwise, predicting registration, trained on (user, event shown, registered or not) rows;
  • a second head or model for attendance given registration;
  • final score combines them, for example probability of registering × probability of attending;
  • for very large platforms, a neural model with content embeddings and a social graph signal can add more.

Why it matters

The features are tabular and relationship-heavy, where boosted trees shine.

  • Combining registration and attendance keeps the feed honest for organisers.

In the real world: Many ticketing and local-discovery teams use boosted-tree rankers over relationship features, with content embeddings added as features rather than as the whole model.

# One training row per (user, event impression), with features as of the impression time.
row = {
    "distance_km": haversine(user.home, event.venue),
    "hours_until_start": (event.starts_at - shown_at).total_seconds() / 3600,
    "fits_usual_free_time": free_time_overlap(user.activity_hours, event.starts_at),
    "friends_registered_so_far": friends_registered(user, event, as_of=shown_at),
    "organiser_past_attendance_rate": organiser.attendance_rate(as_of=shown_at),
    "category_affinity": user.category_share(event.category, as_of=shown_at),
    "registrations_vs_expected": regs_so_far(event, shown_at) / expected_share(days_out(event, shown_at)),
    "price_vs_usual": event.price / max(user.median_paid, 1),
}

Training only on events that happened long ago. Event types and user tastes shift seasonally (festivals, school holidays); train on recent months with past seasons included.

Notifications and email

What it is

Much event discovery happens outside the app, in a weekly email or a push notification:

  • computed in batch (module 18) for each user before sending;
  • fewer slots (three to six events), so precision at the top matters most;
  • fatigue limits: cap how often a user is contacted; stop or slow sending to people who never engage;
  • unsubscribes and spam reports are guardrail metrics.

Why it matters

A notification costs the user's attention; too many lose the channel permanently through unsubscribing.

  • The send decision itself can be modelled: send only when the best event's score clears a bar.

In the real world: Event apps commonly send weekly digests and real-time pushes only for strong matches, such as a favourite artist announcing a nearby show.

Sending everyone the weekly email regardless of how good this week's matches are. A weak email trains people to ignore the next one.

Serving

What it is

Two paths:

  • online feed: geospatial and time filter → light ranker → boosted model on a few hundred → re-rank (diversity of categories and dates, sold-out removal) → show; well inside 200 ms;
  • batch for emails and pushes: score candidates nightly for each active user;
  • live updates: sold-out status and capacity changes flow through a stream and remove events immediately;
  • fallback: popular-nearby-this-weekend.

Why it matters

Inventory changes by the minute (tickets selling out), so availability must be checked live even when scores are precomputed.

In the real world: Ticketing apps check availability at render time even for precomputed recommendations, because popular events sell out in minutes.

Visual example

Events

Place and time filter first; relationships rank.

One 'for you' request

  1. Place and time filter40,000 → ~7,000Nearby, in date window, available
  2. Light ranker~300Keeps the most promising
  3. Main modelRegister and attend probabilities
  4. Re-rankMix categories and dates; drop sold out
  5. Show and logFeed, email or push

Serving a cached email list at open time without rechecking availability. Recommending a sold-out event is a frustrating dead end.

Practise it: Design Feature Monitoring, Diagnose Training-Serving Skew, Design a Model Serving Platform, Design an ML Feature Store

Evaluation and monitoring

What it is

Evaluate by event date:

  • offline: train on events before a cut-off, test on events after; AUC and NDCG at 10; slices for events with almost no registrations yet, new users, free versus paid;
  • online: registrations and attendance per user, organiser ticket sales, email engagement and unsubscribes;
  • monitoring: share of recommended events that sold out before the user could act, average distance of recommendations, attendance rate trends, concentration on a few large events.

Why it matters

A model can look good offline by favouring big, already-popular events; slicing by registrations-so-far shows whether it helps smaller events too.

  • Concentration metrics protect smaller organisers, whose success keeps the marketplace healthy.

In the real world: Marketplaces commonly monitor how evenly demand is spread across sellers, because a recommender that only promotes the biggest players drives smaller ones away.

Visual example

Contrast

Each difference changes a design choice.

How events differ from products and videos
propertyproducts and videoseventsdesign consequence
Item lifetimeMonths to yearsDays to weeksContent and organiser features over ID embeddings
LocationUsually irrelevantDecisiveGeospatial filtering; distance features
TimeAny timeOne fixed dateDate window; time-until-start features
SocialModerateStrongFriends-registered features
Supply limitRarelyCapacity; sell-outsLive availability checks

Random splits across users and events. The model sees registrations for test events during training and looks far better than it is.

Practise it: Design a Large-Scale Classification Platform, Design a Predictive Maintenance System, Design a Real-Time Anomaly Detection System, Design a Recommendation System, Design Feature Monitoring, Design Model Monitoring, Diagnose Training-Serving Skew, Improve a Low-Recall Model, Design a Search Ranking System

Sources and further reading

What it is

Public work this design draws on:

  • Liu et al., 'Event-based Social Networks: Linking the Online and Offline Social Worlds', KDD 2012: studies of Meetup-style networks;
  • Macedo et al., 'Context-Aware Event Recommendation in Event-based Social Networks', RecSys 2015: content, social, location and time signals for new events;
  • 'CPMF: A Collective Pairwise Matrix Factorization Model for Upcoming Event Recommendation': learning to rank upcoming events that have no attendance history yet;
  • general learning-to-rank and cold-start material in modules 13 and 14.

Why it matters

Academic work on event networks documents the cold-start, location and social effects clearly, with real data.

In the real world: Citing that every event is a cold-start item, and why, is the insight interviewers look for in this question.

Interview questions: the event recommendation design

What it is

The questions interviewers ask about the event recommendation design, from the first screening call to the senior round. Cover the answer, say yours aloud, then compare.

Why it matters

Reading an idea and explaining it are different skills.

  • Each answer below is the two or three sentences an interviewer is listening for.
  • The reasoning behind each one is in the cards above. If an answer surprises you, go back to that card.

In the real world: Interviewers use this question to see whether a candidate notices that the usual recommendation playbook breaks for short-lived items.

Q: What makes event recommendation different?

Every item is new and expires within weeks, so there is little interaction history; location and time dominate relevance; and social signals such as friends going are unusually strong.

Q: How do you generate candidates?

Mostly with filters: a geospatial index for distance, a date window, and availability and eligibility rules, then a light ranker if many remain.

Q: How do you handle cold start?

Content and organiser features rather than event IDs, registrations so far normalised by how far ahead the event is, exploration for new events, and onboarding questions for new users.

Q: What would you predict?

Probability of registering after seeing the event, and of attending given registration; combine them so the feed favours events people actually go to.

Q: How do you split data for evaluation?

By event date: train on earlier events and test on later ones, so registrations for test events never appear in training.

Q: How do you avoid overwhelming people with notifications?

Send only when the best match clears a bar, cap frequency, and watch unsubscribes and spam reports as guardrails.

Proposing collaborative filtering on event IDs as the main approach.

Exercise: rank short-lived items

What it is

A short build that uses this module's ideas. Write it yourself before looking anything up; the checks at the end tell you whether it works.

Why it matters

An idea you have only read fades in a week.

  • Building it once, even in fifty lines, is what makes it yours.
  • Interviewers can tell the difference between someone who has read about a loop and someone who has debugged one.

In the real world: This exercise demonstrates the cold-start argument with numbers, which is exactly how to win it in a design review.

Your task. Build a ranker for items that expire, and show why content and relationship features beat ID-based methods for them.

Steps

  1. Use a public event or short-lived-item dataset (for example a Meetup RSVP dataset, or job postings with applications).
  2. Split by item date: train on items that ended before a cut-off, test on items after.
  3. Train a matrix-factorisation baseline on item IDs and measure AUC on the test items.
  4. Train a boosted model with distance, time, category affinity, organiser history and 'registrations so far' features computed as of each impression.
  5. Compare both on test items with fewer than five interactions at the time they were shown.

You are done when

  • The feature-based model clearly beats the ID model on new items.
  • Every feature is computed only from information available at impression time.

Stretch. Add a 'friends registered so far' feature from any social edges in the data and measure its contribution.