Skip to content

ONE QUESTION. YOUR REASONING.

Design RAG for company documents

Design a question-answering assistant over a company’s documents: it ingests millions of files, answers employee questions with citations, and never shows anything the asker cannot open.

System designAI systemsSenior

YOUR BRIEF

What to work through

Work through rAG for company documents as a spoken system design interview. Start by clarifying the scope, sketch a working design and explain the trade-offs behind your choices.

  • Ingest documents from the company’s tools and keep them current
  • Answer a question in plain language, citing the passages used
  • Use only content the asker is allowed to open
  • Measure answer and retrieval quality over time

BEFORE YOU START

Constraints to discuss

  • Millions of documents in the index
  • Zero answers that cite a document the asker cannot open
  • Chunks of 512 to 1,024 tokens
  • Retrieval quality tracked with recall at K, MRR and NDCG
Need a starting point?

Watch for these common gaps as you prepare:

  • Checking permissions after retrieval, or not at all
  • No plan for updates and deletes, so answers cite old versions
  • No evaluation set, so a change that hurts quality goes unseen
  • Letting the model answer without passages, or without citations
Read: System design questions and who asks them

Why this question is in the collection

These sources connect the problem to company interview reports or preparation guides. They do not guarantee what a company will ask you.

KEEP GOING

Your next question

Storage, files and linksDesign BitlyInfrastructure and platformDesign a rate limiterInfrastructure and platformDesign an A/B testing platformInfrastructure and platformDesign an ad click aggregator
Browse the collection
01

Pick a question

Read the brief and choose what you want to work on.

02

Talk it through

Explain your thinking. Respond to follow-ups. Draw when a design needs it.

03

Find your next improvement

Use the feedback from your interview to decide what to practise next.