RAG & Agent System Design
91 questionsDONEUNLOCKEDLOCKED
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 Applied AI Engineer interview loops and written to a senior-engineer editorial bar.
You have 10 free answers unlocked here.Sign in free for 10 more · 71 are premium.
01–37Foundationsthe vocabulary every loop assumes you already have0/37 done
38–69Core loopsthe questions every loop actually asks0/32 done
70–91Field scenariosthe messy, half-specified problems from real deployments0/22 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 grounds an LLM in external knowledge: at query time you retrieve the most relevant chunks from a knowledge base and put them in the prompt, so the model answers from real sources instead of memory. It is the default fix for hallucination and stale knowledge, and it updates without retraining. The pipeline is ingest and chunk, embed and index, retrieve (often rerank), then generate with citations. Applied-AI interviews probe it because RAG is the modal production LLM architecture.Core
Vector Search and ANN IndexesVector search finds the embeddings nearest to a query vector. Exact nearest-neighbor is O(n) per query and does not scale, so production uses Approximate Nearest Neighbor (ANN) indexes (HNSW, IVF, product quantization) that trade a little recall for massive speedups. The real-world challenges are the recall-vs-latency-vs-memory trade-off, metadata filtering, and handling updates. Applied-AI interviews probe it because it is the engine under RAG and semantic search, and its tuning directly sets retrieval quality and cost.Sign in
Core
Choosing and Adapting Embedding ModelsPicking an embedding model is a decision about retrieval quality, cost, and operational risk on your data, not about who tops a public leaderboard. The hard parts are benchmarking on your own queries, trading dimensionality against storage and latency, deciding whether to fine-tune for your domain, and planning for the re-embedding migration when the model changes. Applied AI interviews probe it because candidates default to the leaderboard winner and ignore the drift and migration costs that bite later.Sign in
Core
ChunkingChunking splits documents into the passages you embed and retrieve, and it is one of the highest-leverage knobs in RAG. Too large and embeddings are diluted so retrieval is imprecise; too small and chunks lose the context needed to answer. Beyond fixed-size splitting, structure-aware and semantic chunking keep coherent units intact, and parent-child (small-to-big) retrieval matches on small chunks but returns larger context. Applied-AI interviews probe it because poor chunking silently caps retrieval quality.Sign in
Core
RerankingReranking is a two-stage retrieval design: a fast bi-encoder fetches a broad candidate set for recall, then a slower but more accurate cross-encoder rescoring each (query, document) pair reorders them for precision. The cross-encoder is better because it reads query and document together rather than as precomputed vectors. Reranking lets you feed fewer, better chunks to the model, often the highest-ROI improvement to a RAG system. Applied-AI interviews probe it because it is the cheapest large win in retrieval quality.Sign in
Core
Late-Interaction Retrieval (ColBERT)Late-interaction retrieval represents each document as one vector per token rather than a single pooled vector, then scores a query by summing the best token-to-token matches (MaxSim). It sits 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, but with a large storage cost. Applied AI interviews probe it because knowing when this middle tier is worth its disk footprint shows real retrieval-architecture judgment.Sign in
Core
Hybrid Search and Reciprocal Rank FusionPure vector search captures meaning but misses exact terms (codes, names, SKUs); pure keyword search (BM25) nails exact terms but misses synonyms and intent. Hybrid search runs both and fuses the results, and Reciprocal Rank Fusion is the simple way to merge their rankings without calibrating incomparable scores. Applied-AI interviews probe it because production retrieval is almost always hybrid, and knowing why (and how to fuse) signals real RAG experience.Sign in
Advanced
Agent Reliability and Long-Horizon RobustnessLong-horizon agents fail because per-step success compounds: a 95 percent reliable step is only about 60 percent reliable over ten steps. Reliability engineering covers consistent completion (not just pass@k), error recovery, step and token budgets, human-in-the-loop checkpoints, and containing cascading failure in multi-agent systems. Applied AI interviews probe this to separate people who built a demo from people who shipped an agent that holds up over thousands of runs.🔒 Premium
