PracHub
QuestionsLearningGuidesInterview Prep
|Home/System Design/OpenAI

Design a Highly Available Conversational AI Service

Last updated: Jul 22, 2026

Quick Overview

Start with a minimal stateless conversational AI endpoint that streams responses, then evolve it for scale and resilience. Cover safety and authorization, cancellation, admission control, backpressure, dependency failures, regional isolation, durable history, and metrics that separate serving issues from model issues.

  • medium
  • OpenAI
  • System Design
  • Software Engineer

Design a Highly Available Conversational AI Service

Company: OpenAI

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Onsite

# Design a Highly Available Conversational AI Service Design a conversational AI service that accepts a user message and streams a generated response. Begin with a deliberately minimal version that does not persist conversation history. Then evolve the design to support higher scale, stronger availability, fault tolerance, and useful operational metrics. State which later features require persistence rather than assuming them from the start. ### Constraints & Assumptions - Model inference is a separate dependency with variable latency and possible overload or failure. - Responses are streamed and clients may disconnect or retry. - The first version may treat each request independently. - Safety and authorization checks remain required even in the minimal version. - Capacity is finite; the system needs explicit overload behavior. ### Clarifying Questions to Ask - Is the first release text-only, and what request/response size limits apply? - What latency, availability, and geographic requirements matter? - Which safety, tenant isolation, and data-retention policies apply? - When conversation history is later added, is cross-device continuity required? ### Part 1: Minimal Stateless Path Describe the request flow, streaming protocol, validation, safety checks, inference call, cancellation, and error behavior without storing conversation history. #### What This Part Should Cover - Authentication, quotas, input limits, request IDs, and policy enforcement. - A gateway/orchestrator that invokes inference and relays bounded streaming output. - Cancellation propagation and clear treatment of retries after partial streams. ### Part 2: Scale, Availability, and Fault Tolerance Explain admission control, load balancing, dependency failure handling, regional design, and what changes when persistent conversations are introduced. #### What This Part Should Cover - Capacity-aware routing, queues with bounds, backpressure, and load shedding. - Timeouts, circuit breaking, retry limits, and no unsafe retry after unknown partial work. - Durable message ordering and idempotency only when history becomes a requirement. - Failure-domain isolation and graceful degradation. ### Part 3: Metrics and Verification Define service-level signals and tests that distinguish frontend streaming, orchestration, and model-provider problems. #### What This Part Should Cover - Time to first token, time to last token, generation rate, errors, cancellations, and queue delay. - Capacity, saturation, safety outcomes, dependency health, and cost indicators. - Load, fault-injection, disconnect, retry, and regional-failure tests. ### What a Strong Answer Covers - A genuinely simple first design that still has security, limits, and cancellation. - Explicit evolution from stateless requests to durable ordered conversations. - Backpressure and overload decisions rather than assuming infinite inference capacity. - Metrics tied to user experience and each internal failure boundary. ### Follow-up Questions - How would you resume a stream after a mobile connection drops? - Which data would you avoid persisting even after conversation history is added? - How would you separate model-quality regressions from serving-system regressions?

Quick Answer: Start with a minimal stateless conversational AI endpoint that streams responses, then evolve it for scale and resilience. Cover safety and authorization, cancellation, admission control, backpressure, dependency failures, regional isolation, durable history, and metrics that separate serving issues from model issues.

Related Interview Questions

  • Design an Online Chess Service from Launch to Scale - OpenAI (medium)
  • Design a Fault-Tolerant Video Generation Platform - OpenAI (hard)
  • Design A ChatGPT-Style Assistant Product - OpenAI (medium)
  • Design a Tier-Aware AI Video Generation Service - OpenAI (medium)
|Home/System Design/OpenAI

Design a Highly Available Conversational AI Service

OpenAI logo
OpenAI
Jul 17, 2026, 12:00 AM
mediumSoftware EngineerOnsiteSystem Design
0
0

Design a Highly Available Conversational AI Service

Design a conversational AI service that accepts a user message and streams a generated response. Begin with a deliberately minimal version that does not persist conversation history. Then evolve the design to support higher scale, stronger availability, fault tolerance, and useful operational metrics. State which later features require persistence rather than assuming them from the start.

Constraints & Assumptions

  • Model inference is a separate dependency with variable latency and possible overload or failure.
  • Responses are streamed and clients may disconnect or retry.
  • The first version may treat each request independently.
  • Safety and authorization checks remain required even in the minimal version.
  • Capacity is finite; the system needs explicit overload behavior.

Clarifying Questions to Ask Guidance

  • Is the first release text-only, and what request/response size limits apply?
  • What latency, availability, and geographic requirements matter?
  • Which safety, tenant isolation, and data-retention policies apply?
  • When conversation history is later added, is cross-device continuity required?

Part 1: Minimal Stateless Path

Describe the request flow, streaming protocol, validation, safety checks, inference call, cancellation, and error behavior without storing conversation history.

What This Part Should Cover Guidance

  • Authentication, quotas, input limits, request IDs, and policy enforcement.
  • A gateway/orchestrator that invokes inference and relays bounded streaming output.
  • Cancellation propagation and clear treatment of retries after partial streams.

Part 2: Scale, Availability, and Fault Tolerance

Explain admission control, load balancing, dependency failure handling, regional design, and what changes when persistent conversations are introduced.

What This Part Should Cover Guidance

  • Capacity-aware routing, queues with bounds, backpressure, and load shedding.
  • Timeouts, circuit breaking, retry limits, and no unsafe retry after unknown partial work.
  • Durable message ordering and idempotency only when history becomes a requirement.
  • Failure-domain isolation and graceful degradation.

Part 3: Metrics and Verification

Define service-level signals and tests that distinguish frontend streaming, orchestration, and model-provider problems.

What This Part Should Cover Guidance

  • Time to first token, time to last token, generation rate, errors, cancellations, and queue delay.
  • Capacity, saturation, safety outcomes, dependency health, and cost indicators.
  • Load, fault-injection, disconnect, retry, and regional-failure tests.

What a Strong Answer Covers Guidance

  • A genuinely simple first design that still has security, limits, and cancellation.
  • Explicit evolution from stateless requests to durable ordered conversations.
  • Backpressure and overload decisions rather than assuming infinite inference capacity.
  • Metrics tied to user experience and each internal failure boundary.

Follow-up Questions Guidance

  • How would you resume a stream after a mobile connection drops?
  • Which data would you avoid persisting even after conversation history is added?
  • How would you separate model-quality regressions from serving-system regressions?

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More OpenAI•More Software Engineer•OpenAI Software Engineer•OpenAI System Design•Software Engineer System Design

Your design canvas — auto-saved

PracHub

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

Product

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

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding 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.