AI Engineering
/
RAG & Data Pipelines
/

Design multi-tenant RAG with deletion

RAG & Data Pipelines · 3 to 4 hours

Design multi-tenant RAG with deletion

Design a private multi-tenant policy assistant whose answers and citations stay correct through asynchronous updates, retries, permission changes, and deletion.

Hard
System Design

4 h

Premium

Overview

Design a multi-tenant RAG pipeline that remains consistent during updates, retries, permission changes, and deletion. The goal is to defend explicit guarantees for document visibility, source attribution, and recovery, backed by tests and observable state.

Study time: 3 to 4 hours

Interview format: System design

By the end you can

  • Define a consistency contract for visibility, deletion, and in-flight answers
  • Model documents, immutable revisions, and manifests so publication is conditional and complete
  • Stop stale jobs from publishing or resurrecting deleted content with generation checks or fencing
  • Keep caches, conversation history, and citations consistent with permission changes and deletion
  • Evaluate the pipeline by stage and test lifecycle races, not only answer quality

Prerequisites

Helpful background: Familiarity with transactions, asynchronous jobs, and access control helps.

This topic covers ingestion, grounding, citations, and the document lifecycle. Embeddings & Retrieval covers how candidates are found and ranked.

In this guide

  1. Define the consistency contract
  2. Model logical documents and derived revisions
  3. Stage, validate, and publish
  4. Retries and out-of-order jobs
  5. Deletion as a lifecycle operation
  6. Permission changes are also freshness events
  7. Citation integrity and document history
  8. Context and generation policy
  9. Evaluate end to end and by stage
  10. Worked race timeline
  11. Operational targets and trade-offs

Hard questions are part of Premium: the study guide, reference answer, rubric, and exercises unlock with Premium.

Practice the interview question

Answer it in your own words before you look at the reference answer.