OpenAI Software Engineer Interview Questions
Master your tech interview with our curated database of real questions from top companies.
Implement in-memory DB querying
Question Implement an in-memory database that supports: 1. Querying the whole table and returning only selected columns (projection). 2. Adding WHERE ...
Design GPU credit allocator
System Design: GPU Credits Allocation and Fair Usage Context You are designing a multi-tenant platform that provides access to GPU compute across many...
Design in-memory database API
In-Memory Database: Insert, Query, and Indexing Context You are to design a minimal, single-process, in-memory database to be embedded in a service. T...
Design a Retrieval-Augmented Generation (RAG) system
Prompt Design a Retrieval-Augmented Generation (RAG) system that answers user questions using an organization’s internal documents (PDFs, wiki pages, ...
Implement credit ledger with out-of-order timestamps
Problem You are implementing a GPU credit ledger that supports adding credits, charging credits, and querying balances. Requests can arrive in any tim...
Design a payment processing system
Scenario Design a backend payment system for an online product that supports: - One-time charges and refunds. - Idempotent payment APIs (clients may r...
Implement an in-memory SQL-like table
Problem Implement a simple in-memory database for one table. All values are strings. Each row is identified by a rowKey (string). Each row contains co...
Design a CI/CD system with stuck-job handling
Scenario Design a CI/CD platform similar to GitHub Actions/Jenkins that: - Triggers pipelines on events (e.g., push/PR/merge). - Runs pipelines as a D...
Design a CI/CD system with live log streaming
System Design Prompt: CI/CD Platform (shell-script jobs) Design a CI/CD system that can: 1. Allow users to define pipelines consisting of multiple job...
Explain your perspective on AI safety
You are working in a company that builds and deploys advanced AI systems (e.g., large language models, recommendation systems, vision models) that are...
Design a URL shortening service
Design a scalable backend service for shortening URLs (similar to popular URL shortener products). Describe a system that supports at least the follow...
Design an enterprise RAG assistant for internal docs
Scenario Design an enterprise GPT-style assistant that allows employees to ask questions about internal company documents (policies, wikis, specs, tic...
Explain JS threading and useState vs useRef
Answer the following conceptual questions about JavaScript and React: 1. JavaScript and multithreading - How does JavaScript's execution model wo...
Design reliable high-volume chatbot system
You are designing the backend for a chatbot / AI assistant service (similar to a support bot or meeting assistant). Many users may send messages at th...
Design Slack-like multi-tenant global messaging system
Design a team messaging platform similar to Slack that supports multiple organizations (multi-tenancy) and is deployed globally. Functional requiremen...
Implement map serialization and deserialization
You are given an in-memory map (dictionary) from strings to strings. Implement two functions: - string serialize(map<string, string> m) - map<string, ...
Discuss views on AI safety and its impacts
You are interviewing for an AI-focused company. The interviewer spends most of the behavioral interview asking about your views on AI safety and its b...
Implement a persistent sharded key-value store
Problem Implement a simple key–value store that persists data on disk. You must store the data in fixed-size shards, where each shard is saved in one ...
Implement IPv4 iterators and CIDR expansion
Problem: IPv4 Iterators and CIDR Expansion You are implementing utilities to iterate over IPv4 addresses. An IPv4 address is in dotted-decimal form: A...
Simulate turn-based monster team battle
Design an object-oriented model and implement the core battle logic for a turn-based fight between two teams of monsters. The system should simulate t...