Week 2 (Friday): RAG and Embeddings — grounding in your own data

Make your /ask endpoint answer from your documents, not training data. Running example: Northwind Robotics policy corpus throughout.

10 lessons · Back to full syllabus

Week 2 homework

Extend Week 1 /ask with RAG + POST /ingest

Same Render service as Week 1: add a vector store (Pinecone recommended), an ingest endpoint for new documents, and retrieval-augmented generation on /ask. Test retrieval before you wire the LLM.

What you keep

How to make a model answer from your data instead of its training, and why naive RAG fails — plus Claude Code skills, MCP, and eval habits that make the build repeatable.

You ship

Week 1 /ask extended with a vector store, POST /ingest for new docs, RAG query with citations + refusal, and a golden-set eval on your live Render URL.

Recommended reading (async)

RAG foundations — watch & read (async)

Before or after the live Session 2 deck, these videos and articles give you the industry vocabulary for retrieval, chunking, and production RAG — complementary to the Northwind hands-on work in the lessons below.

Videos

What is Retrieval-Augmented Generation (RAG)?

IBM Technology — plain-English overview of why RAG exists and how it fits together.

Retrieval-Augmented Generation (RAG) Patterns and Best Practices

InfoQ — practitioner patterns for designing RAG systems that hold up beyond demos.

Live session resources

Lessons

Live

Embeddings intuition

Similar meanings sit close together in vector space — retrieval quality depends on this mental picture.

Read lesson
Live

Build naive RAG, and watch it fail

Embed, store, retrieve, stuff into prompt — then break it instructively on the Northwind corpus.

Read lesson
Live

Chunking

How you split documents decides what retrieval can find — most bad RAG is bad chunking.

Read lesson
Live

Reranking and hybrid search

Reranking reorders candidates by relevance; hybrid search catches exact terms embeddings miss.

Read lesson
Live

RAG evals

Measure retrieval and generation separately — wrong chunks vs right chunks ignored.

Read lesson
Deep dive

Graph RAG

When knowledge has structure and relationships, plain vector RAG leaves value on the table.

Read lesson
Deep dive

Multimodal RAG

Retrieve over images, tables, and diagrams — not just prose.

Read lesson
Async

Claude Code layers — skills, MCP, subagents, and plugins

One reference for which layer does which job: CLAUDE.md, skills, MCP, subagents, hooks, plugins.

Read lesson
Async

Week 2 assignment support: RAG on your Week 1 endpoint

Copy-paste prompts to add POST /ingest, vector store, retrieval-first testing, and RAG on POST /ask.

Read lesson
Assignment

Week 2 homework: RAG on your Week 1 endpoint

Extend POST /ask with a vector store, POST /ingest for new docs, retrieval-first testing, and a golden-set eval.

Read lesson