Design Permission-Aware Retrieval for Box AI Document Q&A
Last updated: November 29, 2026
Quick Overview
Design the retrieval and generation pipeline that answers natural language questions over an enterprise's Box content, guaranteeing that answers only use documents the asking user is allowed to see right now.
Box
November 29, 20260
0
0 solved
Design the retrieval and generation pipeline that answers natural language questions over an enterprise's Box content, guaranteeing that answers only use documents the asking user is allowed to see right now.
Box AI and Box AI Studio agents answer questions over content that carries fine-grained, frequently changing permissions, and an answer that leaks one restricted paragraph is a security incident. Interviewers look for how you combine vector search with access control, keep the index fresh, and evaluate answer quality without exposing customer data.
What the Interviewer Expects
- Treats permission enforcement as a hard requirement at retrieval time, not a post-filter on the answer
- Explains index design: chunking, embeddings, metadata including ACL principals
- Handles permission and content changes with an event-driven update path
- Re-checks access against the live permission service before passing chunks to the model
- Proposes offline and online evaluation of retrieval and answer faithfulness
- Addresses tenant isolation, data residency, and the LLM gateway
Key Topics to Cover
How to Approach This
- Start by mapping the business objective to a concrete ML objective and metric.
- Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
- Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
- Address the serving latency budget and whether batch or real-time inference is needed.
- Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
- Permissions change on a folder with 2 million files. How fast does retrieval reflect it, and how?
- Why is filtering after top-k retrieval dangerous for recall?
- How do you evaluate quality when you cannot read customer documents?
- How would agents that take actions, not just answer, change the design?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice ML System Design ProblemsSample Answer
Requirements
Questions over one file, a folder, a hub, or an enterprise. Answers must cite sources and use only content the user can access at query time. Latency of a few seconds. Index freshness for edits within...
High-Level Design
Ingestion: file events (upload, new version, delete) flow through a queue to workers that extract text (with OCR for scans), chunk by structure, embed, and write to a vector index partitioned by enter...