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.

MediumSystem Design
22 practiced

Design a RAG microservice architecture that separates concerns between retrieval, re-ranking, and generation. Include API boundaries, expected inputs/outputs, batching strategies, and where to put caching and authorization checks.

HardSystem Design
31 practiced

Design an end-to-end RAG pipeline that supports streaming token generation to the client while simultaneously retrieving and re-ranking documents as more context arrives. Address consistency between retrieved evidence and the generated stream, latency constraints, partial answer updates, caching, and how to handle updates to the underlying knowledge corpus in-flight.

MediumTechnical
20 practiced

Compare different indexing strategies for vector data at scale: flat indexes, IVF (inverted file), HNSW, and hybrid IVF+PQ. For each, outline memory usage, query latency, recall trade-offs, and when you'd use them in production.

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?

EasyTechnical
16 practiced

What is retrieval-augmented generation? Explain the core components and how grounding answers in retrieved documents reduces hallucination compared with a standalone LLM.

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.