As asked
Design a production RAG system for a 10-million-document internal knowledge base. The system must support sub-2-second p95 end-to-end latency, access control at the document level, and real-time index updates as documents change.
Sample answer outline
A strong design includes an ingestion pipeline (document parser, chunker, embedder, metadata extractor), a vector store (Qdrant or Weaviate with payload-indexed access control fields), a BM25 index alongside for hybrid search, a query pipeline (query rewriting, parallel dense + sparse retrieval, reranking, prompt assembly, LLM call), and a streaming API with prompt caching. The candidate addresses ACL by embedding user permissions as filter metadata at query time, and real-time updates via a change-data-capture pipeline that re-chunks and re-embeds only modified sections.
Expect these follow-ups
- How do you handle a document update that changes 10% of its content?
- Walk me through what happens when a user's access rights change and they had cached results.