Lab 2 — Local RAG
Lab 2 — Local RAG
Fact-check status
Key jargon
| Term | Plain-language meaning |
|---|---|
| Corpus | The collection of source documents available for retrieval. S1 |
| Index | A data structure that makes candidate retrieval efficient. S1 |
| Retrieval query | The representation of the user's information need sent to search. S1 |
| Ground-truth case | A question paired with known supporting evidence and expected answer properties. S1 |
Key concepts
- Build a small measurable pipeline before adding frameworks or agent loops. S1
- Inspect retrieved chunks for every test case; final-answer quality alone cannot diagnose retrieval failure. S1
Concept map
flowchart LR
A["Prepare provenance-rich corpus"] --> B["Chunk embed and index"]
B --> C["Retrieve and answer"]
C --> D["Measure retrieval and grounding"]Diagram semantics verified against S1 and S2 on 2026-09-02.
Goal
Answer questions from five synthetic Markdown documents using a local embedding index and model, with source IDs and abstention.
Build stages
- Create documents with known facts, dates, conflicts, and access labels.
- Preserve originals and generate a versioned ingestion manifest.
- Compare two chunking strategies.
- Build lexical and vector retrieval baselines.
- Add context construction and generated answer.
- Validate citations against exact source spans.
- Test answerable, unanswerable, conflicting, and unauthorized cases.
Pass criteria
- Required evidence appears in top-k retrieval for the agreed threshold.
- Unauthorized document never reaches context.
- Unsupported questions abstain.
- Every answer identifies source document and span.
Continue
Use the preserved RAG-CAS notes as an implementation comparison, not as the evaluation definition. S1