Design Bulk Document Ingestion for a Legal Workspace
Last updated: November 29, 2026
Quick Overview
Design the pipeline that lets a law firm upload tens of thousands of files (PDFs, scans, Word, email archives) into a secure workspace, then extracts text, chunks, and indexes them so they become searchable and usable by AI workflows.
Harvey
November 29, 20260
0
0 solved
Design the pipeline that lets a law firm upload tens of thousands of files (PDFs, scans, Word, email archives) into a secure workspace, then extracts text, chunks, and indexes them so they become searchable and usable by AI workflows.
Harvey's Vault lets customers drop in large document sets for diligence and review, and ingestion speed and reliability shape the first impression. The interviewer looks for resumable uploads, an asynchronous processing DAG, per-file status, tenant isolation, and sensible handling of bad or huge files.
What the Interviewer Expects
- Separate upload from processing with direct-to-object-storage uploads
- Model processing as a per-file pipeline: detect type, extract or OCR, chunk, embed, index
- Track per-file and per-batch status for a progress UI
- Isolate tenants and encrypt data at rest with customer-scoped keys
- Handle retries, poison files, and backpressure on OCR and embedding
- Estimate throughput and cost
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
- How do you prioritize a partner's 10 file upload behind another team's 80,000 file data room?
- How would you re-index everything when you change the embedding model?
- How do you unpack a ZIP or PST archive safely?
- What do you show the user when 3% of files fail?
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
Functional: upload many files or archives, see progress per file, search and query once processed, delete a workspace and have all derived data removed. Non-functional: 100k files per workspace, files...
High-Level Design
- Upload service issues pre-signed multipart upload URLs scoped to the tenant's bucket prefix; the browser uploads directly, resumable per part.
- On completion, an object event writes a
file...