RAG backend with access control
Your task
Design a retrieval-augmented generation backend for an enterprise knowledge assistant over a customer's internal docs (10M documents, frequent edits, strict per-document ACLs). Answers must cite sources, must never surface a doc the asking user can't access, and a doc edited 2 minutes ago should be reflected in answers. Throughput is 50 QPS of question traffic. Cover the indexing pipeline, how retrieval respects per-user permissions without rebuilding indexes per user, and how you keep the vector index fresh under constant edits.
It covers
- Retrieval
- Freshness
- Grounding