Week 4: RAG, Context, and Agentic Systems
RAG, retrieval quality, orchestration, and attack-aware agent design.
What the machine expects from you.
This lesson explains why retrieval-augmented generation exists and, more importantly, when it is the wrong answer.
RAG adds operational complexity. If you do not need external knowledge grounding, retrieval may just add latency, cost, and new failure modes.
Use RAG when the model needs fresh or proprietary context at inference time and the answer quality depends on retrieving the right evidence first.
This lesson focuses on the pre-generation layer of RAG: how documents are split, embedded, retrieved, and used to support grounded answers.
Three dense lessons, one enforced deliverable.
Why RAG Exists and When to Use It
RAG is a product design choice, not a mandatory AI ingredient.
LessonVector Search, Chunking, and Grounded Answers
Retrieval quality is determined long before the generation step.
LessonAgentic Flows, RBAC, and Poisoning Risks
Agent systems inherit every application security problem plus new orchestration ones.
What survives the week.
Retrieval Architecture Brief
A design memo covering chunking, indexing, retrieval quality, and answer grounding.
A retrieval architecture brief and an agent threat model.
Each week leaves behind portfolio evidence that compounds into the final SaaS and its operating narrative.