Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Medium Engineering 8 min read Case study mediumAdept

Engineering stories behind the Medium Daily Digest Algorithm: Part 4

Medium fixed repetitive Daily Digest recommendations for power users by tracking which digest emails had at least one clicked story ("definitely opened", since Apple Mail Privacy Protection makes open tracking unreliable) and filtering out posts already sent in such digests. Offline simulation of thresholds showed a threshold of 1 removed about 4.6 of 15 stories for complaining users but under 0.2 for free users and about 1.4 for members. An A/B test showed a statistically significant increase in reading time, larger for members. Possible next steps are converting the hard filter to a soft filter and accounting for story position in the email.

Assumes: recommendation pipelines (source, filter, rank)A/B testing

Related posts

  • Engineering stories behind the Medium Daily Digest Algorithm: Part 2

    Medium Engineering mediumAdept

    Medium replaced the Bloom filters behind its recommendation filters (muted writers, already-read, presented 3+ times) with per-user DynamoDB queries against the source-of-truth tables, cutting filtering cost roughly 10x and simplifying maintenance. The Bloom filters had grown huge because entries can't be deleted, so unmutes couldn't be reflected, contents couldn't be inspected for debugging, and derived data drifted from the database. Fetching all muted writers per user is cheap because most users mute no one. For the presentation counter, which had been hacked together from three layered Bloom filters, a best-effort query of the most recent 5k presentations (~100ms) is acceptable because the 3-presentation limit is a soft rule.

  • A New Ranking Framework for Better Notification Quality on Instagram

    Meta Engineering mediumAdept

    Instagram adds a diversity layer on top of its engagement-optimized notification ranking models to stop over-sending notifications about the same author or product surface such as Stories. Each candidate's base relevance score is multiplied by a demotion factor D(c) = ∏(1 − w_i·p_i(c)). Here p_i is an MMR-style maximum similarity to recently sent notifications along dimensions like author, content, notification type and product surface, binarized by a threshold, and each w_i is a tunable per-dimension weight. The framework reduced daily notification volume while improving click-through rate. Planned next steps are adaptive penalties that scale with notification volume and timing, and possibly using LLMs to judge semantic similarity.

  • Improving Instagram notification management with machine learning and causal inference

    Meta Engineering mediumAdept

    Instagram replaced click-through-rate filtering for daily digest story notifications with a neural uplift model that estimates the incremental effect of sending versus not sending on user activity. The model was trained on data from a randomized experiment that dropped eligible notifications with 50% probability, and sending was framed as a budget allocation problem that favours high-uplift notifications. Because uplift scores drift online, raw estimates pass through an online quantile service that maps them to a uniform distribution while preserving order, so comparing against a fixed rate r keeps sending volume stable. The result was substantially fewer notifications than CTR-based filtering with no drop in engagement.

  • Building Smarter Search Products: 3 Steps for Evaluating Search Algorithms

    Shopify Engineering mediumAdept

    Shopify's Help Center search team evaluates new ranking algorithms in three steps: collect ground truth from Kafka interaction events and expert-annotated relevance ratings, score variants offline with MAP and NDCG over thousands of historical queries, then run online A/B tests on metrics like click-through rate, average clicked rank, abandonment and support deflection. Applied to a new Query-specific Pagerank, which boosts results frequently clicked for similar past queries, the framework showed slightly better offline scores. In the A/B test, users clicked more, picked higher-ranked results and ran fewer follow-up searches, so it replaced the view-count-based Vanilla Pagerank. Annotated datasets should be refreshed regularly because document sets go stale.

  • Measuring the back/forward cache with Application Metrics

    Sentry mediumAdept

    Sentry's new opt-in bfcacheMetricsIntegration (JavaScript SDK v11) turns the browser's back/forward cache decisions into application metrics, closing a blind spot where cache hits leave no page-load telemetry. Built on the pageshow event and the notRestoredReasons API, it emits three metrics: a hit/miss counter per back/forward navigation, a Chromium-only counter of not-restored reasons with the frame that caused them (e.g. unload listeners, websockets, Cache-Control: no-store), and a distribution of fallback reload duration that measures what each miss cost the user. Because eligibility can regress without code changes, the recommendation is to track hit rate continuously and break misses down by route, release and browser.

The quest for software engineering knowledge.

Look:
Layout: