M9-031M9: Senior ML & AI System DesignRisk, Pricing & Large-Scale RetrievalHard
⚡Flashcard Drill➔Mastery:

Design a Glean-Style ACL-Aware Enterprise Permissioned Search Architecture

🎯 Active Recall Self-Check (Draft First, Verify After)
Login-free practice tracker: recall core answer, audit pitfalls, and log review status.
Step 1 · Draft your concise answer & assumptions
Step 2 · Check Pitfalls & Follow-up Inquiries
Next: M9-032 →
📐 Mathematical Definition
Auth(u,d)=I[(Principals(u)∩ACLallow(d)≠∅)∧(Principals(u)∩ACLdeny(d)=∅)]\text{Auth}(u, d) = \mathbb{I}\left[\big(\text{Principals}(u) \cap \text{ACL}_{\text{allow}}(d) \neq \emptyset\big) \land \big(\text{Principals}(u) \cap \text{ACL}_{\text{deny}}(d) = \emptyset\big)\right]
⚡ One-Sentence Core Answer
Flatten transitive identity groups across SaaS apps, sync permission deltas via sub-second webhooks, and push RBAC bitmaps into hybrid pre-filtering to guarantee zero cross-ACL leakage.

📌 Key Takeaways

  • •
    L1 Zero-Leak Invariant: retrieved chunks, snippets, and LLM citations must never surface unauthorized documents even briefly
  • •
    L2 Decoupled ACL Index: separate heavy document embeddings from lightweight flattened Principal_ID ACL tables so group edits don't re-embed documents
  • •
    L2 Pre-Filtered Hybrid Search: intersect Roaring Bitmap user principals inside HNSW traversal rather than post-filtering Top-K
  • •
    L3 Indirection & Double-Check: use group-indirection tokens for million-doc folder flips and verify strict source ACLs on final Top-10 candidates

📐 Mathematical Derivations

With transitive principal set P(u)P(u), inline bitmap pre-filtering visits only nodes where Bu[d]=1B_u[d]=1; when selectivity <1%<1\%, fall back to inverted-index-first exact scan.

🏭 Production Trade-offs

1) Combining fast local bitmap pre-filtering with live source-API verification on Top-10 candidates balances speed and revocation freshness; 2) Isolate strictly private silos (Mail/DM) in user-keyed shards.
⚠️ Common Interview Pitfalls
  • ✕
    Applying post-filtering after Top-K ANN retrieval, returning zero results when top hits belong to restricted exec folders
  • ✕
    Sharing a global semantic cache across users without keying cache entries on exact ACL principal hashes
🎯 Interviewer Follow-up Inquiries
  • ?
    How do you revoke access to a 500K-doc shared drive within 1 second without re-indexing 500K vector rows?
  • ?
    How do you maintain high-precision identity resolution across heterogeneous SaaS accounts (Okta, Slack, Jira)?
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.
🎯 Drill This Card Now➔
📚

Associated Knowledge Base Guides & Mindmaps

← PreviousM9-030: Design a Real-Time Flink + Redis Feature Store with Zero Training-Serving Skew📋 Back to BankNext →M9-032: Design a Multi-Tenant Distributed LoRA Adapter Hot-Swapping Serving Engine