Multi Resolution Time Windows and Feature Freshness
Why Single Windows Fail
A single time window forces a trade-off. Long windows (30 days) give stable estimates but miss trends: an item going viral today still shows last month's low click rate. Short windows (1 hour) catch trends but are noisy: a single click on 10 impressions gives 10% CTR that means nothing. Production systems compute both and let the model learn the right blend.
Typical Window Pattern
For item CTR, compute 5 windows: 1 hour, 6 hours, 1 day, 7 days, 30 days. Optionally add exponential decay versions with half-lives of 3 hours and 3 days to balance recency with history. At serving time, retrieve all windows together. The ranker learns that 1-hour CTR matters for breaking news; 30-day CTR matters for stable catalog items. This weighting emerges from training data, not manual rules.
Freshness Requirements by Domain
Breaking news search needs query signals within minutes. E-commerce needs inventory availability within 1-5 minutes to avoid promoting out-of-stock items. Video platforms can tolerate 10-30 minute lag because video popularity changes gradually. The right freshness depends on how fast your items change and how much users notice stale rankings.
Infrastructure Trade-offs
Near real-time features require streaming pipelines that maintain rolling aggregates, writing updates to an online feature store at high throughput (100K+ writes/second). Refreshing engagement features every 10 minutes instead of hourly can improve CTR by 2-3% but doubles compute cost. For stable catalogs, daily batch updates may suffice, saving operational complexity. The decision comes down to: how much does freshness improve your specific ranking quality, and is that worth the infrastructure cost?