Retrieval-Augmented Generation (RAG) Questions

Grounding language-model outputs in external knowledge at inference time. Covers document ingestion, chunking and embedding, sparse, dense and hybrid retrieval (BM25, score fusion, contrastive training of retrievers), vector search and approximate-nearest-neighbour index engineering (HNSW, IVF, product quantization, filtering, updates, sharding), re-ranking with cross-encoders, and context assembly with prompt templates and citations. Also covers reducing hallucination through verification and abstention, evaluating retrieval-augmented systems, and production concerns such as freshness, access control, prompt injection through retrieved documents, deletion and privacy, caching, cost, and weighing retrieval against fine-tuning. Generic LLM evaluation and release gates, the craft of prompts beyond retrieved-context templates, attention internals, parameter-efficient fine-tuning, model serving and distributed inference engineering, database indexes, and whole-product ML system design are covered elsewhere.

HardSystem Design
24 practiced

Design a RAG system served across multiple regions. How do you store and partition the vector indices, guarantee freshness of new documents, replicate, and keep tail latency low for users far from the primary?

MediumSystem Design
20 practiced

Design access control for a RAG system over sensitive documents so users only retrieve what they are cleared to see. How do authentication, authorization and audit logging fit into the pipeline without hurting latency?

MediumTechnical
18 practiced

You need to run a four-week proof of concept to persuade stakeholders to adopt RAG for a search assistant. Outline the plan: data and privacy requirements, minimal model choices, evaluation criteria, and what result would make you stop.

HardSystem Design
24 practiced

Propose a cost-optimized deployment plan for a RAG service that balances CPU-based ANN vs GPU-based re-ranking and generation for mixed query loads (80% short FAQ queries, 20% long-complex research queries). Include autoscaling and prewarming considerations.

HardSystem Design
22 practiced

Design a sharded, replicated vector search service for over a billion vectors with a strict tail-latency target. How do you partition the data, budget memory, reduce fan-out, handle hot spots, and survive node failures?

Unlock Full Question Bank

Get access to all 11 Retrieval-Augmented Generation (RAG) interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.