Design Tabular Review for Thousand-Document Data Rooms
Last updated: November 29, 2026
Quick Overview
Design the backend for a tabular review feature where a lawyer selects thousands of documents (rows) and writes natural-language questions (columns), and every cell is filled by an LLM with a cited answer that streams into a shared grid.
Legora
November 29, 20260
0
0 solved
Design the backend for a tabular review feature where a lawyer selects thousands of documents (rows) and writes natural-language questions (columns), and every cell is filled by an LLM with a cited answer that streams into a shared grid.
Tabular Review is one of Legora's core products, used for due diligence over virtual data rooms, so this design question maps directly onto real work. The interviewer wants a fan-out job system that respects LLM rate limits and cost, keeps citations trustworthy, and supports several reviewers editing the same grid.
What the Interviewer Expects
- Estimates scale: rows times columns, tokens per cell, total cost and time
- Separates ingestion (parse, OCR, chunk, embed) from cell computation
- Designs a cell-level job queue with per-tenant fairness and provider rate limiting
- Streams results to clients and persists cell state with citations
- Handles new columns, prompt edits and re-runs without recomputing everything
- Covers collaboration: locks, reviewed flags, audit trail
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
- A customer adds a column to a 5,000 row review; how fast can the first results appear and what does it cost?
- How do you avoid one large firm's review starving every other tenant?
- How would you cache so the same prompt over the same document version is never paid for twice?
- How would you detect and surface cells where the answer is not supported by its citation?
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: import documents from a DMS or VDR, define columns as prompts with an output type (text, date, yes/no, list), fill cells with an answer plus citations, stream progress, re-run a column, lo...
High-Level Design
- Ingestion service: pulls files, converts to text with page and character offsets, OCRs scans, splits into sections, stores chunks and embeddings per document version (content hash). 2. **Review...