Design a RAG Assistant Over 50,000 Internal Documents (AI System Design Question)
The interviewer asksDesign an assistant that answers employees' questions from 50,000 internal documents: policies, wikis and project docs.
Forward Deployed EngineerAI Product EngineerAI Platform PM (secondary)CoreSystem design roundRepresentative20–30 min
On this page
The 30-second version
- Requirements: who asks what, permissions per document, how often docs change, latency.
- Ingest: parse, chunk by structure, embed, store with permissions and metadata; update incrementally.
- Query: hybrid search filtered by the user's permissions → rerank → answer from top chunks with citations.
- Say 'I couldn't find this' rather than guess.
- Evals: retrieval (right doc in top k) and answers (grounded, correct), on real employee questions.
What it's really testing
- Gathering requirements before designing
- The full RAG pipeline
- Permissions as a first-class concern
- Evaluating retrieval and answers separately
How to structure your answer
- Requirements: users, questions, permissions, freshness, scale, latency.
- Ingestion pipeline.
- Query pipeline.
- Quality: evals for retrieval and answers.
- Failure, latency and cost.
The interview, played out
- InterviewerDesign an assistant that answers employees' questions from 50,000 internal documents: policies, wikis and project docs.
- CandidateSome questions first. Can every employee see every document, or do permissions vary?
- Revealed when askedPermissions vary. Some project and HR documents are restricted.
- CandidateThen permissions are a first-class requirement: the assistant must never answer from a document the user can't open. How often do documents change, and what kinds of questions do people ask?
- Revealed when askedWikis change daily. Questions are mostly "how do I…" and "what's our policy on…".
- Strong moveTreats permissions and freshness as requirements before drawing anything.
- CandidateIngestion: connectors pull documents, parse them, and split them into chunks along headings and sections. Each chunk is embedded and stored with its source, date and access list. Changed documents are re-processed incrementally, hourly or on change events.
- CandidateQuery: the user's question is embedded; we run hybrid search (semantic plus keyword, because policy names and project codes matter), filtered to chunks the user is allowed to see. A reranker picks the best five or so, and the model answers only from those, citing each one. If nothing relevant is found, it says so and suggests who to ask.
- InterviewerHow do you know it works?
- CandidateTwo evals. Retrieval: for a set of real employee questions, is the right document in the top five? Answers: is every claim grounded in the cited chunk, and is it correct?
- Missed signalDidn't say how the labelled question set gets built; that's often the hardest part.
- InterviewerWhere do the labelled questions come from?
- CandidateFrom the help-desk tickets and the wiki's most-viewed pages: real questions with known answers. Subject-matter owners check a few hundred. Then latency: retrieval and reranking add maybe a second; streaming the answer helps. Cost is mostly the model call, so I'd keep the context to the top chunks rather than whole documents.
The strong answer, distilled
- Requirements: per-document permissions, daily changes, "how do I" and policy questions, interactive latency.
- Ingestion: connectors → parse → structure-aware chunking → embeddings → store with source, date and access list; incremental updates.
- Query: hybrid search filtered by the user's permissions → rerank → grounded answer with citations; an honest "not found" with a pointer to who to ask.
- Evals: retrieval (recall@5) and answers (groundedness, correctness), on a labelled set built from help-desk tickets and checked by document owners.
- Latency and cost: stream answers; limit context to top chunks; monitor slow queries.
This is one strong answer, not the only one.
How it's scored
| Dimension | Weak (2) | Passable (3) | Strong (5) |
|---|---|---|---|
| Requirements | None asked | Scale only | Permissions, freshness, question types, latency |
| Pipeline | "Vector database" | Embed and search | Ingest and query pipelines, hybrid search, reranking, citations |
| Permissions | Ignored | Mentioned | Enforced at retrieval, before the model sees anything |
| Evals | None | One score | Separate retrieval and answer evals with a real labelled set |
Round scorecard: FDE: AI system design round, filled in for the mock candidate
| Dimension | Weak | Passable | Strong | The mock candidate |
|---|---|---|---|---|
| Requirements | Assumes them. | Asks about scale. | Users, data, scale, latency, cost and risk, before drawing anything. | Strong. Asked about permissions, freshness and question types before designing. |
| Architecture | One component. | A reasonable flow. | Full skeleton, then depth on the parts this system depends on. | Strong. Full pipeline with hybrid search, reranking and permission filtering. |
| Quality and evals | None. | Mentions testing. | Evals per component and end to end, and how they're built. | Passable. Separate retrieval and answer evals, but vague on how to build the labelled set. |
| Failure and cost | Ignored. | Mentions one. | Fallbacks, guardrails, latency and cost levers, tied to requirements. | Passable. Covered 'not found' answers; latency and cost only when asked. |
How the answer changes by role
| Role | What to emphasise |
|---|---|
| Forward Deployed EngineerForward Deployed Engineer. An engineer embedded with customers who scopes, builds and ships AI solutions into production. Read the full explanation | Customer constraints: connectors, permissions, data residency |
| AI Product Engineer | Pipeline implementation, evals in the build, and monitoring |
| AI Platform PMProduct Manager. Decides what a product should do, for whom, and why. Read the full explanation | Which parts the platform should provide out of the box |
Common mistakes
- Ignoring document permissions
- Fixed-size chunks that split tables and sections
- Embeddings-only search that misses exact terms
- One end-to-end score with no way to tell where it fails
More follow-ups to practise
- "Two documents contradict each other." Hint: recency, authority metadata, and showing both.
- "Answers need to span several documents." Hint: more chunks, multi-step retrieval, or an agent.
- "Usage grows 10x." Hint: index size, caching and cost per query.
Go deeper
- Module: RAG and retrieval
- Framework: AI System Design Framework
- Framework: Opening Any Interview Answer
- Lesson: How retrieval works
- Lesson: Why RAG exists
- Lesson: Evaluating RAG: retrieval and answer separately
- Also tests: Agent and RAG evals
- Also tests: AI system design
Sources
Representative question: written to match AI system design rounds, not a specific reported interview.