Design Permission-Aware Retrieval Over a Client's Internal Knowledge Base

Last updated: November 29, 2026

Quick Overview

Design a question-answering assistant for a 5,000-employee company that searches Confluence, SharePoint and Google Drive content, and guarantees that answers only use documents the asking employee is allowed to see.

Ode
ML System Design
Machine Learning Engineer
Ode
November 29, 2026
Machine Learning Engineer
Onsite
ML System Design
Medium

0

0

0 solved


Design a question-answering assistant for a 5,000-employee company that searches Confluence, SharePoint and Google Drive content, and guarantees that answers only use documents the asking employee is allowed to see.

Internal knowledge assistants are a common first deployment for enterprise clients, and the permission model is what security teams ask about first. The interviewer checks where the candidate enforces ACLs, how sync keeps permissions fresh, and how retrieval quality is evaluated.

What the Interviewer Expects
  • Ingest content and ACLs from each source with incremental sync
  • Enforce permissions as a filter at retrieval time, never only in the prompt
  • Combine lexical and vector search and rerank
  • Cite sources and refuse when retrieval is weak
  • Evaluate retrieval recall and answer faithfulness separately
Key Topics to Cover
RAG
access control
hybrid search
incremental sync
evaluation
How to Approach This
  1. Start by mapping the business objective to a concrete ML objective and metric.
  2. Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
  3. Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
  4. Address the serving latency budget and whether batch or real-time inference is needed.
  5. Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
  • A user loses access to a folder. How quickly does the assistant reflect that, and how do you prove it?
  • How would you handle nested groups with thousands of members?
  • How would you evaluate without exposing confidential documents to labelers?
  • When would you choose a connector's native search over your own index?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice ML System Design Problems
Sample Answer
Requirements

About 2M documents across three sources, roughly 50k edits a day. Answers in under 5 seconds with citations. Hard requirement: no content from a document the user cannot open in the source system, and...

High-Level Design
  • Connectors per source pull content and ACLs, using change feeds or webhooks plus a periodic full reconcile.
  • Processing: parse, chunk with heading context, embed; store chunks in a search i...

Submit Your Answer
Markdown supported

Related Questions