RAG & groundedness
P11.ir-rag.04 · Audience: Guest, IT/ML learner, Language professional · Prerequisites: Information retrieval & hybrid search, Re-ranking & IR metrics
Where next?
This module unlocks
P11.ir-rag.04 · Audience: Guest, IT/ML learner, Language professional · Prerequisites: Information retrieval & hybrid search, Re-ranking & IR metrics
This module unlocks
A plain LLM answers from frozen, unattributable parametric memory — and is
confidently wrong when the answer isn't in it. Retrieval-augmented generation
grounds the answer in retrieved passages: fresh, cited, and able to abstain.
Most RAG failures are retrieval failures — which is why P11.ir-rag.01/.02 carry
the load. (Cross-link: P10.llm-essentials.03 — reliability & grounding.)
RAG fixes three failures of a plain LLM at once:
question ─▶ retrieve (IR1) ─▶ re-rank (IR2) ─▶ [context] + prompt ─▶ LLM ─▶ grounded answer + citations └▶ abstain if context is weak
🎯 RAG = grounding an LLM in retrieved content. The generator is the easy part; the retriever, the grounding rule, and the abstention rule make the answer trustworthy.
Ask a question about this content. The mentor explains and grounds its answer in what you are studying; asking is recorded as a learning signal, not a grade.
Off by default. The mentor always gets your file; this only decides whether your own copy stays here. Copies live in this browser only - they do not follow you to another device, and clearing site data removes them.
Now build the RAG pieces yourself. Each rung is a three-panel workspace: instructions on the left, a code editor in the middle, output + test results on the right. Run checks the visible tests; Submit grades against hidden edge cases — overlap ≥ chunk size must raise, the out-of-scope query abstains, a threshold sweep flips answer↔abstain, and faithfulness averages only the answered cases. The senior rung rebuilds the whole groundedness evaluator.
Loading exercise…
Loading exercise…
Loading exercise…
A scratch console for this page's ideas — ungraded, nothing you run here is recorded.
Scratch console
A scratch console with the scientific stack (pandas, numpy, scikit-learn). Runs on the server — no network, resource-limited and measured.
Output appears here.
Loading your notes...