Lab 2 — Local RAG
Lab 2 — Local RAG
Key jargon
| Term | Plain-language meaning |
|---|---|
| Corpus | The collection of source documents available for retrieval. |
| Index | A data structure that makes candidate retrieval efficient. |
| Retrieval query | The representation of the user's information need sent to search. |
| Ground-truth case | A question paired with known supporting evidence and expected answer properties. |
Key concepts
- Build a small measurable pipeline before adding frameworks or agent loops.
- Inspect retrieved chunks for every test case; final-answer quality alone cannot diagnose retrieval failure.
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"]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.