Design Upload and Parsing of User Files Attached to ChatGPT Messages
Last updated: November 29, 2026
Quick Overview
Design the pipeline that accepts files users attach in ChatGPT (PDFs, spreadsheets, images, slides), scans them, extracts text and structure, and makes them usable by the model within seconds.
OpenAI
November 29, 20260
0
0 solved
Design the pipeline that accepts files users attach in ChatGPT (PDFs, spreadsheets, images, slides), scans them, extracts text and structure, and makes them usable by the model within seconds.
File uploads are one of the most used ChatGPT features and cover wildly varied formats and sizes. Interviewers check resumable direct-to-storage uploads, an async processing DAG with per-format workers, and safety for untrusted content.
What the Interviewer Expects
- Use presigned direct uploads, with chunked resumable upload for large files
- Run an async processing pipeline: validate, malware scan, extract, chunk, optionally embed
- Choose per-format extractors and OCR for scans and images
- Decide what goes into the prompt directly versus retrieval for large files
- Report processing status to the client and handle failures gracefully
- Sandbox parsers for untrusted input
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- What do you do with a 300-page PDF when the context window cannot fit it?
- How would you keep spreadsheet structure so the model can compute over it?
- How do you prevent a crafted file from exploiting a parser?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
- Max file size around 512 MB; many files per conversation.
- Formats: PDF, docx, pptx, xlsx and csv, images, plain text and code.
- Ready for use within a few seconds for typical documents; status vi...
High-Level Design
- Client asks the files API for an upload session; gets presigned multipart URLs.
- Client uploads directly to object storage; on completion the API records `file(id, owner, size, mime, stat...