Design a ChatGPT-Like Conversational Assistant End to End
Company: Apple
Role: Machine Learning Engineer
Category: ML System Design
Difficulty: hard
Interview Round: Onsite
Design a ChatGPT-like conversational assistant: users hold multi-turn conversations with a large language model through web and mobile apps. The report states only "design ChatGPT", so the scope is open. Agree with the interviewer which layers to cover, from the product backend to model serving, and whether training is in scope.
```hint Where the cost is
Think about what dominates the cost and latency of one reply, and which serving techniques let one accelerator work on many conversations at once.
```
```hint A conversation grows
Ask what the model must see on each turn as a conversation gets longer, and where the history it draws on is kept.
```
### Clarifying Questions
- How many daily users and peak concurrent conversations, and what latency targets: time to the first token, and tokens per second after that?
- Is a trained model given, or should the design cover training and fine-tuning?
- Which features are in scope: saved history, file uploads, web search or other tools, several model tiers?
- Are there free and paid tiers with different limits?
- What safety requirements apply to inputs and outputs?
### What a Strong Answer Covers
- Scope, scale and latency targets agreed first, with training explicitly in or out of scope
- The request path: gateway, conversation service, context assembly, safety checks, inference, and streaming back to the client
- Model serving: the GPU fleet, batching, memory for attention state, routing between model sizes, and capacity planning for peak
- Conversation storage and context management as conversations outgrow the context window
- Safety, abuse prevention, rate limits and quotas
- Evaluation and monitoring: offline evaluation, user feedback, A/B tests of model versions, latency and cost metrics
### Follow-up Questions
- Demand doubles at peak, but GPUs cannot be added quickly. What do you degrade, and in what order?
- How would you roll out a new model version safely?
- How would you use thumbs-up and thumbs-down feedback to improve the model?
- A conversation grows beyond the context window. What does the model see on the next turn?
Overview: Design a ChatGPT-like conversational assistant end to end, from the request path and conversation storage to GPU model serving, context management and safety. It tests capacity planning for LLM inference, latency and cost trade-offs, and how a model change is evaluated and monitored in production.
Read the full Apple Machine Learning Engineer interview experience this question came from