AIInterviewTraining logoAIInterview/Training

RAG & Agent System Design

104 questions
0 of 104 done · 10 unlocked for you
DONEUNLOCKEDLOCKED

Retrieval pipelines, chunking, hybrid search, reranking, tool-using agents, guardrails, multi-tenancy and eval harnesses: the modal Applied AI design round at OpenAI, Anthropic, Glean and Sierra.

Grounded in real GenAI, LLM, and AI/ML engineering interview loops and written to a senior-engineer editorial bar.

You have 10 free answers unlocked here.Sign in free for 10 more · 84 are premium.
01–42Foundationsthe vocabulary every loop assumes you already have0/42 done
43–79Core loopsthe questions every loop actually asks0/37 done
80–104Field scenariosthe messy, half-specified problems from real deployments0/25 done

The concepts behind RAG & Agent System Design

The vocabulary and mental models these questions assume, from our curriculum. Start with the foundations free; the deeper, interview-defining ideas are part of premium.

Foundational
The RAG PipelineRetrieval-Augmented Generation anchors an LLM in outside knowledge: when a query arrives you pull the most relevant chunks from a knowledge base into the prompt, letting the model respond from actual sources rather than memory. This is the go-to remedy for hallucination and outdated knowledge, and refreshing it needs no retraining. Its stages are ingest and chunk, embed and index, retrieve (frequently rerank), then generate with citations. AI, ML, and GenAI interviews test it because RAG is the most common production LLM architecture.
Core
Sign in
Vector Search and ANN IndexesVector search locates the embeddings closest to a query vector. Exact nearest-neighbor runs O(n) per query and will not scale, so production relies on Approximate Nearest Neighbor (ANN) indexes (HNSW, IVF, product quantization) that give up a little recall for enormous speedups. In practice the hard parts are the recall-vs-latency-vs-memory trade-off, metadata filtering, and coping with updates. AI, ML, and GenAI interviews test it because it is the engine beneath RAG and semantic search, and how you tune it directly sets retrieval quality and cost.
Core
Sign in
Choosing and Adapting Embedding ModelsChoosing an embedding model is a call about retrieval quality, cost, and operational risk on your own data, not about which model leads a public leaderboard. The hard parts are benchmarking against your own queries, weighing dimensionality against storage and latency, judging whether to fine-tune for your domain, and preparing for the re-embedding migration whenever the model changes. AI, ML, and GenAI interviews test it because candidates reach for the leaderboard winner and overlook the drift and migration costs that bite later.
Core
Sign in
ChunkingChunking divides documents into the passages you embed and retrieve, and it ranks among the highest-leverage knobs in RAG. Make chunks too large and embeddings get diluted so retrieval turns imprecise; make them too small and chunks lose the context needed to answer. Past fixed-size splitting, structure-aware and semantic chunking hold coherent units together, while parent-child (small-to-big) retrieval matches on small chunks yet returns larger context. AI, ML, and GenAI interviews test it because weak chunking quietly caps retrieval quality.
Core
Sign in
RerankingReranking is a two-stage retrieval design: a fast bi-encoder grabs a broad candidate set for recall, then a slower but more accurate cross-encoder rescores each (query, document) pair to reorder them for precision. The cross-encoder wins because it reads query and document jointly instead of as precomputed vectors. Reranking lets you hand the model fewer, better chunks, often the highest-ROI improvement to a RAG system. AI, ML, and GenAI interviews test it because it is the cheapest large win in retrieval quality.
Core
Sign in
Late-Interaction Retrieval (ColBERT)Late-interaction retrieval stores each document as one vector per token instead of a single pooled vector, then scores a query by adding up the best token-to-token matches (MaxSim). It falls between cheap single-vector bi-encoders and expensive cross-encoder rerankers: more precise than a single vector, far cheaper than running a full reranker on every candidate, yet with a heavy storage cost. AI, ML, and GenAI interviews test it because knowing when this middle tier earns its disk footprint shows real retrieval-architecture judgment.
Core
Sign in
Hybrid Search and Reciprocal Rank FusionVector search alone grasps meaning but drops exact terms (codes, names, SKUs); keyword search (BM25) alone locks onto exact terms yet ignores synonyms and intent. Hybrid search runs the two together and fuses their outputs, with Reciprocal Rank Fusion offering an easy way to merge rankings without reconciling incomparable scores. Applied-AI interviews cover it because production retrieval is nearly always hybrid, so understanding why (and how to fuse) shows genuine RAG experience.
Advanced
🔒 Premium
Agent Reliability and Long-Horizon RobustnessAgents over long horizons break down because per-step reliability multiplies: a step that works 95 percent of the time drops to roughly 60 percent across ten steps. The discipline spans consistent completion (not pass@k), recovering from errors, step and token budgets, human-in-the-loop checkpoints, and stopping cascading failure inside multi-agent systems. AI, ML, and GenAI engineer interviews test this to tell apart people who built a demo from people who shipped an agent that survives thousands of runs.
Unlock all 104 answers · ₹2,000 / $25