OpenAI·Frontend Engineer·Onsite - System Design / Architecture
Jun 2026
System design round for a frontend-leaning role at OpenAI, centered entirely on building an AI prompt playground with streaming, presets, and failure handling end to end. The scope was bigger than I expected and the interviewer wanted me to drive, not just answer.
- Design a web-based AI prompt playground (similar to the ChatGPT Playground) where users can type a prompt, configure model parameters, run it, and watch the response stream back token by token.
- Walk through the full client-to-provider data flow for a single run, including how streaming tokens get from the model provider back to the browser.
- How would you design the model gateway to abstract away provider-specific details like API keys, parameter ranges, and streaming wire formats?
- What failure modes do you need to handle across the run lifecycle, covering both your own server and the model provider, and what should the client do in each case?
- Is it always safe to retry a failed run? What changes if the first token has already been streamed to the user before the failure?
- A user reloads the page mid-generation. How do you let them reconnect to an in-flight run instead of losing it?
- You're adding a second model provider with a different streaming format and parameter limits. What changes in your architecture and what stays the same?
- How do you enforce per-user and per-org cost and rate limits without adding latency to time-to-first-token on the hot path?
- The model output is rendered as markdown or HTML in the browser. How do you defend against prompt-injected content causing XSS, especially while streaming partial markup?
“This was the core question and it ate the whole session.” The rest of the author's notes on Frontend Engineer interview at OpenAI, Onsite - System Design / Architecture round, covers how they worked through the question, what the panel pushed back on, and what they would do differently.
View Post