Design a minimal ChatGPT with presets

Quick Overview

This question evaluates a candidate's competency in designing multi-tenant conversational AI services with reusable, versioned presets, covering API design, data modeling, session state and context-window management, scalability, multi-tenant isolation, privacy, and observability.

Design a minimal ChatGPT with presets

Company: OpenAI

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Technical Screen

Design a minimal ChatGPT-like conversational service that supports saving and applying reusable presets (system prompts) per user/team. Specify: core components and their responsibilities; data model for presets (fields, ownership/scope, versioning, soft delete), and how presets are referenced in a chat session; public APIs (CRUD for presets, list/search, apply-to-session, clone/share), including request/response examples and auth/RBAC; session state handling and context-window management (how messages and presets combine, truncation strategy); storage choices for messages and presets, indexing, and caching; scalability plan (stateless workers, queueing/backpressure, autoscaling), latency/SLO targets, and cost controls; multi-tenant isolation, rate limiting, and quota; safety/privacy controls (PII redaction, preset approval flow), audit logging, and observability; failure modes and fallbacks (preset missing, model timeout, partial outage); extensibility (A/B testing different presets, preset libraries, shareable links). Provide capacity estimates for 100k DAU and a sequence of calls for (a) create preset and (b) send message using a preset.

Quick Answer: This question evaluates a candidate's competency in designing multi-tenant conversational AI services with reusable, versioned presets, covering API design, data modeling, session state and context-window management, scalability, multi-tenant isolation, privacy, and observability.

|Home/System Design/OpenAI
OpenAI logo
OpenAI
Sep 6, 2025, 12:00 AM
hardSoftware EngineerTechnical ScreenSystem Design
19
0

System Design: Minimal ChatGPT-like Service With Reusable Presets

Context

Design a multi-tenant conversational AI service that supports reusable presets (system prompts) at user and team scope. A preset can be versioned, shared, approved, applied to a chat session, and soft-deleted. The service should expose public APIs, manage session state within context windows, and operate reliably and cost-effectively at scale.

Requirements

Specify the following:

  1. Core components and their responsibilities.
  2. Data model for presets:
    • Fields and metadata.
    • Ownership and scope (user, team, org, public).
    • Versioning and soft delete.
    • How presets are referenced in a chat session.
  3. Public APIs:
    • CRUD for presets, list and search, apply-to-session, clone and share.
    • Request and response examples.
    • Auth and RBAC considerations.
  4. Session state handling and context-window management:
    • How messages and presets combine into prompts.
    • Truncation and summarization strategy.
  5. Storage choices for messages and presets, indexing, and caching.
  6. Scalability plan:
    • Stateless workers, queueing and backpressure, autoscaling.
    • Latency and SLO targets.
    • Cost controls.
  7. Multi-tenant isolation, rate limiting, and quota.
  8. Safety and privacy controls:
    • PII redaction, preset approval flow.
    • Audit logging and observability.
  9. Failure modes and fallbacks:
    • Missing preset, model timeout, partial outage.
  10. Extensibility:
    • A B testing different presets, preset libraries, shareable links.
  11. Capacity estimates for 100k DAU.
  12. Sequence of calls for:
    • (a) Create a preset.
    • (b) Send a message using a preset.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...