Preparing your design workspace

Loading the problem and your latest saved attempt…

Design a Spreadsheet Next-Command Recommender

Predict useful next spreadsheet commands from an ordered session history without leaking future actions or exposing private workbook content.

Problem statement

For this exercise, assume a spreadsheet application suggests up to five commands a user is likely to need next. Available events include event time, a pseudonymous user ID, session ID, command ID, and bounded workbook context such as the active object type and whether a selection exists.

Design the event pipeline, training data, model evaluation, online feature state, and low-latency serving path. Suggestions should adapt during a session, work for new users and sessions, and never execute automatically. Training examples must preserve event order and avoid future-data leakage.

Raw cell values, formulas, workbook text, and cross-user collaboration content are outside scope; use only approved bounded metadata.

What to build

  1. Capture permitted spreadsheet command events in session order and build event-time training examples without using future actions.
  2. Return up to five eligible next-command suggestions using current session context, with a useful popularity-based fallback for cold starts or model failure.
  3. Evaluate sequential recommendations offline and online, activate compatible model and feature versions safely, and monitor drift and product guardrails.

At scale

  • For this exercise, assume 5 million daily users and 100 million command events per day, with 20,000 recommendation requests per second at peak.
  • For this exercise, return five suggestions within 100 milliseconds at p95 and use a context-eligible popularity fallback when online features or inference are unavailable.
  • For this exercise, update session features within five seconds and consider one daily model release.