Mid-level interview questionAsked at Microsoft · interview write-up
Design the retrieval and ranking pipeline behind a RAG assistant, including indexing, access control and the metrics you'd evaluate it with.
Model answer
Index chunks with metadata and their source's access-control list, kept in sync. At query time, rewrite the query, run BM25 and dense retrieval with the permission filter inside both, fuse with reciprocal rank fusion, then a cross-encoder reranks the top few dozen. Measure each stage on labelled queries: recall at k for candidates, NDCG and MRR for the final order, then answer faithfulness and permission-leak tests.
Practise the rest
22 RAG questions, 492 in all, each with a model answer. Free.
More from Microsoft interview questions.
More RAG interview questions
- What is retrieval-augmented generation, and how does it reduce hallucination?
- How do you choose a chunking strategy for RAG?
- Why combine keyword and embedding search, and where does a reranker fit?
- How do you evaluate a RAG pipeline?
- Your RAG chatbot keeps giving wrong answers. How do you find out why, and fix it?
- Design a RAG system that has to meet strict latency and cost targets while serving many tenants.