Week 8 · Phase 2 Engineering & Tools
The RAG Pipeline Explorer
LLMs know the internet, not your documents. Retrieval-Augmented Generation fixes that: fetch the right passages at question time, and let the model answer from them — with citations.
Chunk → Embed → Retrieve → GenerateChunking strategiesSource citations
W8 · 1
Run the pipeline
Four HR-policy snippets are our corpus. Pick a question and step through exactly what your Week 8 sandbox build will do.
✂️1 · Chunksplit documents
🔢2 · Embedtext → vectors
🔍3 · Retrievetop-k by similarity
💬4 · Generateanswer + cite
W8 · 2
The chunking playground
Chunk size is the most underrated dial in RAG. Too small → fragments with no context. Too big → retrieval gets fuzzy and tokens get wasted. Drag and see.
W8 · 3
Why RAG beats “just ask the model”
Without RAG
Q: How many WFH days do we get?
A: "Most companies offer 2–3 remote days…"
Generic. Possibly wrong. Uncited. This is where hallucinated policy comes from.
With RAG
Q: How many WFH days do we get?
A: "3 days per week, with manager approval [remote-work-policy §2]."
Grounded in your document, current, and auditable via the citation.
Acceptance criteria for your sandbox build: documented chunking strategy · retrieval precision ≥ 0.7 · answers include source citations. Precision is Week 10's subject.