# Design a RAG system: system design interview question

> Answers from changing documents: exact source citations, current access checks, and useful search under restricted permissions.

Source: https://sysround.com/questions/design-rag-system
Updated: 2026-11-05


Difficulty: hard. Levels: Senior, Staff+.

## How the interviewer opens it

"Design a system that answers questions from an organization's documents as content and permissions change. Each answer must cite sources accessible at the final permission check before delivery. A later revocation may still permit that response."

## What to clarify first

- Corpus size
- Traffic and request mix
- Identity and source identifiers
- Permission checks
- Freshness and deletion
- Latency
- Evidence and citations
- Availability and durability
- External services and scope
- Model workload

## Scope of a strong answer

Core requirements:

- Import documents, edits, deletions, and permission changes from source systems
- Answer questions from documents that the user can access at the required permission checks
- Cite the exact document revisions and passages that support each answer
- Enforce current permissions across model input, answer delivery, and source links

Usually out of scope:

- Model training
- External web search
- Actions that modify source systems
- Optical character recognition

## What interviewers probe

### Who can see an answer

Permissions can change while the model works. An answer can expose a document even when its citations omit that document.

### Document changes

Workers can complete revisions out of order. Citations must still identify exact text across sources that can reuse document IDs.

### Evidence for an answer

A relevant passage does not always support a claim. Documents can contain conflicting facts or hostile instructions.

### Search under restricted access

Restricted access can remove most useful results. Stale access filters can also hide new grants that authoritative checks would permit.

## Common mistakes

- The design trusts the model to enforce document permissions.
- The design checks access only for cited documents, not every document supplied to the model.
- The design updates access filters only after content edits and misses permission-only grants.
- The design omits the source from document, revision, passage, or citation identity.
- The design treats a high similarity score as proof that a passage supports the answer.
- The design estimates vector storage but ignores model token demand and update deadlines.

## The bar by level

- **Senior:** Defines revision publication, deletion rules, and safe retries. Refreshes indexed access fields for permission-only grants within five minutes. Handles sparse permissions, conflicting evidence, and provider failures. Defines measurable quality tests.
- **Staff+:** Defines the exact revocation boundary across source systems, model submission, and response delivery. Resolves races between permission updates and revision publication. Quantifies model capacity and tenant isolation. Defines overload and recovery policies without weaker access guarantees.

Practice this question with an AI interviewer: https://sysround.com/practice/new?problem=retrieval-augmented-generation


---
SysRound (https://sysround.com) is an AI practice tool for system design interviews. It has a voice or typed AI interviewer and a shared whiteboard. At the end, you get feedback on each skill and a model answer. The AI feedback can be wrong.
