core practice · implementation task

Build a minimal RAG pipeline

Chunk a small document set, embed and index it, retrieve for a query, pack context, and generate a grounded answer.

The mechanism

RAG = retrieve relevant chunks, pack them into the prompt, then generate. The quality ceiling is set by retrieval — a perfect LLM cannot answer from context it never received. Most 'RAG is bad' problems are retrieval problems.

Study RAG

Expected evidence

Answers grounded in retrieved chunks, with sources.

Try this drill in the practice workspace →

Hints when you need them
  • Retrieval quality is the ceiling — debug retrieval first.
  • Keep the eval set fixed.

Watch for these mistakes

  • Blaming the LLM when retrieval failed
  • No eval set, so retrieval changes are guesswork
  • Stuffing too many chunks and burying the answer
  • Skipping reranking and hybrid retrieval

Check the sources

Browse all practice briefs