How AI Agents Use Tools: Function Calling & MCP | Stanford CS329Z Lecture 4 with Diyi Yang
From Stanford Online · · 1 hr 19 min

The player loads from YouTube only when you click. It uses YouTube's privacy-enhanced mode.
If the video does not play, the owner may have turned off embedding. Watch it on YouTube instead.
Description
Browse Stanford's online courses in Agentic AI: https://stanford.io/4AIRb2z
Lecture Overview: Why can't LLMs do everything on their own, and how do they learn to use tools? In this Stanford CS329Z: Engineering AI Agents lecture, Stanford professor Diyi Yang covers the “lost in the middle” problem, how LLMs learn to use tools with Toolformer and ToolkenGPT, scaling to thousands of APIs with ToolLLM and Gorilla, the difference between REST APIs, function calling, and the Model Context Protocol (MCP), and how to evaluate tool use with BFCL, ToolBench, and τ-bench, plus common failure modes.
Speaker: Diyi Yang
Diyi Yang is an assistant professor in the Computer Science Department at Stanford University, also affiliated with the Stanford NLP Group, Stanford HCI Group and Stanford Human Centered AI Institute. Her research focuses on human-centered LLMs and human-AI interaction. She is a recipient of IEEE “AI 10 to Watch” (2020), Microsoft Research Faculty Fellowship (2021), NSF CAREER Award (2022), and a Sloan Research Fellowship (2024).
Course website: https://cs329z.stanford.edu/
Watch the full CS329Z playlist: https://youtube.com/playlist?list=PLPRcF5HR02_U&si=3Z4OYphngcmQ0GIy
Recorded 10/5/2026 in CS329Z: Engineering AI Agents, a graduate course at Stanford University taught by Diyi Yang, Michael Ryan, and John Yang.
#AIAgents #AgenticAI #Stanford