LLMs for Agent Builders: Context Engineering | Stanford CS329Z Lecture 2 with Michael Ryan

LLMs for Agent Builders: Context Engineering | Stanford CS329Z Lecture 2 with Michael Ryan

Title history
  • LLMs for Agent Builders: Context Engineering | Stanford CS329Z Lecture 2 with Michael Ryan — observed on 20261110-2153 UTC (YouTube)
🎙 Michael Ryan 👥 1.3M 📅 November 10, 2026 ⏱ 77 min 👁 291 📄 tutorial 🧭 2026-11-10
Available in: English (current) Français

Keywords

LLMcontext engineeringtransformeragentdecoding

Summary

This Stanford CS329Z lecture, delivered by Michael Ryan, provides a comprehensive overview of how large language models work from an agent-builder’s perspective. It begins by defining language models as probabilistic sequence predictors, then explains decoding strategies such as greedy, top-p, top-k, temperature scaling, and beam search. The core of the talk is a deep dive into transformer architecture, focusing on self-attention, causal masking, and positional embeddings, followed by a discussion of linear and hybrid attention variants. Ryan then explains the pre-training and post-training pipeline (SFT, RLHF, RLVR), including how models are adapted for coding agents. Inference mechanics are covered, including prefill vs. decode phases and the role of the KV cache, plus test-time scaling and reasoning models. The lecture emphasizes structured outputs and constrained decoding for reliable agent behavior, and concludes with context engineering principles, warning against over-stuffing the context window due to context rot. Throughout, the speaker connects technical details to practical implications for building AI agents.

158 words

Critical Evaluation

Value of the Information & Strength of the Argument

The lecture provides substantial technical value by linking each concept to actionable insights for AI agent development. The argumentation is coherent and well-structured, building from basic probability to advanced design trade-offs. Ryan effectively contrasts different approaches (e.g., attention variants, sampling strategies) and explains their impact on agent performance, budgets, and reliability. The talk includes audience questions that clarify edge cases, enhancing the argumentation’s nuance.

Scientific Rigor, Source Quality, Title Accuracy

Scientific rigor is high: the speaker is a Stanford PhD researcher and DSPy contributor, and the content aligns with established literature. The description links to the official CS329Z course site and a course playlist, providing credible references. The title is perfectly matched to the content, which focuses on context engineering while covering necessary LLM foundations. The lecturer does not claim personal research as established fact, and the explanations are consistent with current AI knowledge.

153 words

Title / Content Match

The title accurately reflects the content: a focused lecture on context engineering for LLM-based agents, while also covering foundational LLM mechanics.

Quality & Reliability

9/10

Lecture by a Stanford PhD student and DSPy contributor, covering well-established concepts with clear explanations, scholarly depth, and no obvious inaccuracies. Sources are academic (Stanford course) and the talk aligns with the AI research literature.

Chapters

Cited Sources

Concurring Sources

Contribution & Novelties

This lecture offers a cohesive framework relating LLM internals to agent-building decisions, particularly around context engineering and model selection. The presenter’s involvement with DSPy brings practical insight into optimization. The novelty lies in the integration of topics—decoding, attention, inference, and context engineering—rarely covered together for an agent-focused audience.

Pour aller plus loin :

127 words

Radar Profile

The radar profile shows very high scores across all dimensions, indicating a technically dense, reliable, and comprehensive lecture. With high quantity and quality of information, plus strong technical level and reliability, this is an excellent resource for learners and practitioners.

Reliability 9/10