Design an OpenAI chatbot in two hours
Company: EliseAI
Role: Software Engineer
Category: ML System Design
Difficulty: medium
Interview Round: Technical Screen
Design and implement a minimal yet functional conversational chatbot using the OpenAI API within a two-hour coding exercise. Specify the architecture (API server, message schema, session state, context window strategy), how you will stream responses, and how you will handle rate limits, retries, and errors. Describe logging/metrics for quick debugging, a lightweight persistence option, and basic safety checks. Outline your project structure, key endpoints, and exact steps to run locally; you may optionally leverage an AI IDE like Cursor—explain how it speeds up delivery.
Quick Answer: This question evaluates a candidate's competency in ML system design and backend engineering for conversational AI, including architecture, session state and context management, streaming responses, resilience (rate limiting and error handling), observability, lightweight persistence, and safety when integrating a large language model API.