Writing assistant in a notes app
Your task
Design the AI writing assistant inside a notes app with 2 million users and about 300,000 daily active users. A user selects text and picks an action (summarize, rewrite shorter, fix grammar, continue writing); the result streams into the editor, and the user can accept or discard it. Expect about 1.5 million requests a day with a peak near 60 a second, averaging 800 input tokens and 300 output tokens. Free users get 50 requests a month and paid users get 1,000. The app can call hosted models from two providers. Cover the request path and streaming, how quotas are enforced, what happens when a provider is slow or down, and what you log to judge quality without exposing users' notes.
It covers
- Streaming
- Quotas
- Provider failover