HLD-231·Search & Indexing
Medium · 1,000 ptsEnterprise RAG Document Chunking & Hybrid Vector Search
Design a Glean / Enterprise AI retrieval backend combining ACL-filtered BM25 keyword search + dense vector embeddings with semantic query caching.
Max p99
≤ 68 ms
Availability
≥ 99.5%
Budget
≤ $5,750
Functional Requirements
- FR-1POST /rag/retrieve — Performs ACL-filtered hybrid lexical + vector retrieval for workspace_id.
- FR-2POST /rag/ingest — Enqueues document chunking and embedding updates from Slack/Drive webhooks.
- FR-3PATCH & DELETE /rag/retrieve/{workspace_id} — Updates, cancels, or deletes workspace_id records and immediately invalidates or updates cached state (read-after-write).
- FR-4Must sustain sub-70ms retrieval p99 when vector index storage experiences 6x latency spikes.
Workload Profile
Workday Copilot Queries25,000 Retrieve RPS / 3,500 Doc Update RPS
All-Hands Search Surge72,000 Retrieve RPS / 9,500 Ingest RPS
Active Working Set30 GB hot workspace HNSW centroids & ACL bitmaps
Traffic DistributionHeavy skew on shared company-wide workspace_id docs
Consistency Model
Read-after-write on document ACL revocations so revoked users immediately lose retrieval visibility.
Solutions Locked
Sign in and either achieve AC or complete 3 official submissions on this question to inspect community diagrams and writeups.
Loading solutions...
Submission History (0)Select to replay
No submissions yet
Click Submit in the top bar to evaluate against all 7 judge cases and save each run here.
Design Write-up
0 boxes · 0 edges
0 words