PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches
|Home/ML System Design/OpenAI

Design AI chat bot system

Last updated: Mar 29, 2026

Quick Overview

This question evaluates understanding of ML system design and front-end–centric architectures, focusing on browser-only state management, streaming LLM responses, SPA lifecycle constraints, stateless relay integration, and credential/security considerations.

  • medium
  • OpenAI
  • ML System Design
  • Software Engineer

Design AI chat bot system

Company: OpenAI

Role: Software Engineer

Category: ML System Design

Difficulty: medium

Interview Round: Technical Screen

##### Question Design an AI chat bot system where: ( 1) user messages and conversation history are stored only in the browser (not in any backend database); ( 2) bot responses are streamed to the user; ( 3) refreshing the page starts a new conversation; and ( 4) handle user credential considerations.

Quick Answer: This question evaluates understanding of ML system design and front-end–centric architectures, focusing on browser-only state management, streaming LLM responses, SPA lifecycle constraints, stateless relay integration, and credential/security considerations.

Related Interview Questions

  • Design a Text-to-Video Generation System - OpenAI (hard)
  • Design a Real-Time Sensor Intelligence System - OpenAI (medium)
  • Mine Novel Images from Unlabeled Data - OpenAI (medium)
  • Design a GPU-Efficient Video Service - OpenAI (medium)
  • How would you build an image classifier with dirty data? - OpenAI (easy)
OpenAI logo
OpenAI
Aug 4, 2025, 10:55 AM
Software Engineer
Technical Screen
ML System Design
8
0

System Design: In-Browser AI Chat With Streaming

Requirements

Design a web-based AI chatbot system that satisfies all of the following:

  1. User messages and full conversation history are stored only in the browser (no backend database or server-side persistence).
  2. Bot responses are streamed to the user token-by-token (or chunk-by-chunk).
  3. Refreshing the page starts a new conversation (no history survives a reload).
  4. Handle user credential and security considerations.

Assume a typical SPA front end and that you may use a stateless backend relay to call an external LLM provider, but you must not persist user messages server-side.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More ML System Design•More OpenAI•More Software Engineer•OpenAI Software Engineer•OpenAI ML System Design•Software Engineer ML System Design
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.