E6LLM agents & retrieval
8 lessons. Study in order; each one assumes the previous.
LLM agents and retrieval is where a language model stops being a closed box and starts using external knowledge and tools. It solves the model's two biggest limitations, a fixed knowledge cutoff and an inability to act, by grounding generation in retrieved documents and letting the model call functions to do things in the world.
You will build a retrieval-augmented generation pipeline (chunk, embed, index, retrieve, generate), train dense bi-encoders with contrastive loss and search them with FAISS, and add advanced techniques like HyDE, cross-encoder rerankers, and GraphRAG. On the agent side you will implement structured tool calling, few-shot chain-of-thought with self-consistency voting, and the ReAct and Reflexion loops that interleave reasoning with actions. The discipline finishes with test-time compute scaling behind o1 and DeepSeek-R1, and multi-agent orchestration patterns.
This is the conceptual backbone of applied AI engineering: the RAG, tool use, and agent patterns here are exactly what pillar J builds into production systems.
Before you start
- E3 Transformer LMs: decoder-only generation and prompting.
- E1 Information retrieval (TF-IDF, BM25) and C8 approximate nearest neighbor search.
- Comfortable Python and access to an LLM API for the applied agent lessons.