Skip to content

Learning path · Production RAG · 50

Retrieval-Augmented Generation

Retrieve relevant external documents at query time, inject them into the prompt, then generate an answer grounded in that evidence.

Why it matters

  • Primary pattern for organizational knowledge without retraining.
  • Separates reasoning (LLM) from facts (retrieval index).
  • Requires eval on faithfulness, not fluency alone.

Key ideas

  • Retrieve then generate
  • Grounding
  • Citations

Video

RAG fetches documents at question time, puts them in the prompt, then generates. Naive RAG stops at embed-and-stuff. Production RAG adds hybrid search, reranking, citations, and a way to refuse when retrieval is weak. Score faithful answers against the retrieved passages. Users prefer "I don't have that" to a fluent answer citing the wrong page.

Updated 2026-08-09 · Full learning path