RAG lesson 02 · Build the evidence corpus
Versioned evidence corpus · deterministic retrieval fixtures
Lighthouse Policy Evidence Assistant. A fictional support assistant answers questions from a versioned product-policy corpus. It must retrieve current, authorized evidence, cite exact source spans, and abstain when evidence is missing or conflicting.
01 · Smallest useful mechanism
Parsing and chunking decide which facts coexist, which headings survive, and whether a retrieved span can be traced back to an authoritative source. Stable identities and deletion propagation matter as much as token size.
A chunk is a derived evidence unit, not an anonymous bag of tokens.
02 · Experiment
Deterministic retrieval fixture
This workbench uses inspectable ranking and evidence fixtures and injected failures. It does not make live calls or execute external effects.
Retrieval workbench · lighthouse-chunks-v2
Injected failure
The exception begins 12 tokens after a fixed 800-token boundary; the previous version must also be deleted from search.
The trace has not run.
Commit to an implementation, then inject the failure and inspect the actual state transitions.
03 · Implementation brief
Your learning artifact
Stored only in this browser. No account required; course reset does not delete it.
04 · Check your understanding
Primary sources · verified 2026-08-02
Naive fixed windows can separate exceptions from rules, duplicate evidence through overlap, leak headers across tenants, and leave deleted content searchable after the source changed.
Common mistake: There is one universally optimal chunk size. Useful granularity depends on document structure, query type, embedding model, reranker, context budget, and the evidence span required by the product claim.
Transfer exercise: Split one policy by fixed tokens, headings, and parent-child sections; inspect which strategy keeps the exception attached to its rule.
Next: Once the corpus is trustworthy, candidate retrieval must combine lexical precision, semantic recall, filters, and query behavior without confusing scores.