Stanford CME295 Transformers & LLMs | Autumn 2025 | Lecture 7 - Agentic LLMs

Stanford CME295 Transformers & LLMs | Autumn 2025 | Lecture 7 - Agentic LLMs

🎙 Afshine Amidi, Shervine Amidi 👥 1.2M 📅 November 18, 2025 ⏱ 109 min 👁 111K 📄 lecture 🧭 2026-08-06
Available in: English (current) Français

Keywords

retrieval-augmented generationembeddingsfunction callingReActModel Context Protocol

Summary

This lecture from Stanford’s CME295 course focuses on techniques to connect large language models (LLMs) to external systems and knowledge. It begins by recapping previous lectures on reasoning models and GRPO, then introduces retrieval-augmented generation (RAG) as a solution to the knowledge cutoff problem. The instructors explain the three steps of RAG: retrieve, augment, and generate, emphasizing the importance of the retrieval step. They discuss methods for building a knowledge base, including chunking and embeddings, and cover advanced retrieval techniques such as SBERT bi-encoders, BM25, HyDE, contextual retrieval, prompt caching, and re-ranking with cross-encoders. The lecture also covers evaluation metrics for retrieval systems, including NDCG and MRR. The second half focuses on tool calling and agents, explaining how LLMs can invoke external functions and use the ReAct framework for reasoning and acting. The Model Context Protocol (MCP) is introduced as a standard for tool integration. The lecture concludes with safety considerations and closing thoughts.

154 words

Critical Evaluation

This lecture provides a comprehensive and well-structured overview of techniques for making LLMs more useful in real-world applications. The instructors, Afshine and Shervine Amidi, are adjunct lecturers at Stanford, and their academic background lends credibility to the content. The lecture is part of a formal course, which ensures a logical progression and depth of coverage.

The content on RAG is particularly strong. The instructors clearly explain the motivation behind RAG, addressing the limitations of static knowledge cutoffs and the impracticality of continuous fine-tuning. They present a balanced view of the challenges, such as context length limits, performance degradation with irrelevant information (needle-in-a-haystack), and cost considerations. The discussion of retrieval techniques is thorough, covering both embedding-based methods (SBERT, bi-encoders) and heuristic methods (BM25), as well as advanced techniques like HyDE and contextual retrieval. The inclusion of evaluation metrics (NDCG, MRR) is valuable for practitioners.

The section on tool calling and agents is equally informative. The instructors explain how LLMs can be extended to interact with external tools, and they introduce the ReAct framework, which combines reasoning and acting. The mention of the Model Context Protocol (MCP) is timely, as it is an emerging standard for tool integration. The safety considerations at the end are important and show a responsible approach.

The lecture is well-paced and includes helpful examples and analogies. The instructors also address student questions, which enhances understanding. The use of slides and diagrams aids comprehension.

One minor weakness is that the lecture does not delve deeply into the mathematical underpinnings of some techniques, but this is appropriate for a course that appears to target a broad audience. The focus is on practical application rather than theoretical derivation.

Overall, this is an excellent lecture that provides a solid foundation for anyone looking to implement RAG and agentic workflows with LLMs. The information is accurate, up-to-date, and presented in an engaging manner. The sources cited are credible, and the instructors are knowledgeable. The lecture earns a high rating for its quality and educational value.

333 words

Title / Content Match

The title accurately reflects the content, focusing on agentic LLMs and covering RAG, tool calling, and agents as promised.

Quality & Reliability

9/10

Lecture from Stanford University by experienced instructors, covering established techniques (RAG, tool calling, ReAct) with references to recent research and practical considerations. High credibility due to academic affiliation and structured presentation.

Chapters

Cited Sources

Concurring Sources

Contribution & Novelties

This lecture provides a comprehensive and practical overview of techniques for building agentic LLMs, covering RAG, tool calling, and the ReAct framework. It stands out for its clear explanations of advanced retrieval methods (HyDE, contextual retrieval, re-ranking) and its introduction of the Model Context Protocol (MCP) as a standard for tool integration. The lecture also emphasizes evaluation metrics (NDCG, MRR) and safety considerations, which are often overlooked.

Pour aller plus loin :

138 words

Radar Profile

The radar profile shows high scores across all dimensions, with particularly strong performance in information quantity and quality. The lecture is technically rich but accessible, making it a valuable resource for both beginners and practitioners.

Reliability 9/10