KatInterview

Estimating Document Read Time in a Collaborative Writing Tool

System DesignModel answer
HardModel answerSystem Designproduct-designestimationmachine-learning

Last updated

Design a read-time estimation feature for a cloud document editor: model, validation strategy, system architecture, and success metrics.

Document Read-Time Estimation

A cloud-based document editor wants to show readers an upfront estimate of how long a document will take to read — something like "~6 min read" in the document header, in share notifications, and in file browser previews.

Your task is to design this feature end to end.

Answer the following four parts:

1. Scoping and users Who benefits from this estimate and in what situations? What constraints matter most at scale (latency, cost, privacy)?

2. Estimation model How would you compute a baseline estimate? What factors beyond raw word count should influence the result? How would you handle non-Latin scripts, code blocks, images, and tables? Describe how you would improve the model once you have real usage data.

3. Validation with real data How would you define "actual reading time" given that raw session duration is noisy? What signals would you collect, and how would you build ground truth? How would you evaluate the model offline and online? What privacy constraints apply?

4. System and architecture Sketch the client, backend, and data pipeline components. Where is the estimate computed, and why? How does it stay fresh as the document changes?

5. Success metrics What metrics would tell you the feature is working? Include guardrails.

A strong answer is structured, makes trade-offs explicit, gives concrete numbers where useful, and anticipates failure modes.

Hints

Hint 1

Raw session duration (time the doc is open) is a terrible proxy for reading time — think about what signals actually tell you a person is actively reading versus leaving a tab open. Define 'completed read' precisely before you pick a metric.

Hint 2

The estimate needs to appear in places where the document isn't open yet (share emails, file browser). That forces a server-side computation path in addition to any client-side logic — think through how you reconcile the two.

Hint 3

Resist the urge to build a complex ML model first. A well-chosen heuristic shipping on day one gives you a baseline to beat, a production signal to learn from, and a fallback if the learned model regresses. Argue for the simplest thing that is useful, then layer in complexity.