Skip to main content
AmigoFish

Stanford Online

Stanford OnlineVideo

Format:
YouTube channel
New videos:
Daily
Typical length:
about 1 hour 20 minutes, not counting Shorts
Latest video:
Not rated yet

About this show

You can gain access to a world of education through Stanford Online, the Stanford School of Engineering’s portal for academic and professional education offered by schools and units throughout Stanford University. https://online.stanford.edu/

Our robust catalog of degree programs, credit-bearing education, professional certificate programs, and free and open content is developed by Stanford faculty, enabling you to expand your knowledge, advance your career, and enhance your life.

Stanford Online is operated and managed by the Stanford Engineering Center for Global & Online Education (CGOE). CGOE expands access to Stanford teaching and research, working in collaboration with faculty in the School of Engineering and throughout Stanford University to design and deliver extensive global, online, and enterprise education to a global audience.

Videos come from the channel's public YouTube feed. The artwork is the newest video thumbnail. Last updated . Names, artwork and text belong to their publishers.

Cosmos

Similar by topic and creator

See the full Cosmos

Videos

  • How AI Agents Work: Connectors, MCP & Agent Safety | Stanford CS193T Lecture 5 with Cynthia Bailey

    · 58 min

    Explore AI courses and programs from Stanford Online: https://stanford.io/4BYTekh What happens when AI stops just writing and starts acting on your behalf? In this Stanford CS193T: Thinking with AI lecture recording, Senior Lecturer Cynthia Bailey explains how AI agents work and why prompt injection gets much worse once AI can take actions. She opens with connectors, the links that let AI read your email, calendar, or files and act on your behalf, and shows that nothing new is happening inside the model: it's the same next-token prediction behind every chatbot, occasionally generating specially structured text that triggers actions. From there she builds the vocabulary for autonomous work: the analyze, act, observe loop every agent runs on, the seven-part "anatomy" of a well-specified agent, and professional-grade agentic workflow techniques like "the elephant and the goldfish." The lecture closes by putting on a pessimistic security hat: for any agent you design, what's the worst that could happen, and whose permissions made it possible? Key questions answered in this lecture recording: Q: What is the difference between generative AI and agentic AI? A: Bailey says agentic AI focuses on taking actions rather than only generating content, but it runs on the same next-token prediction: the LLM emits structured JSON text that a connector turns into an action. Q: What is an AI connector? A: Connectors are access permissions that plug your AI tool into apps like Gmail or Outlook so it can pull in data or act on your behalf. Enabling one adds tool instructions to the context window, using the Model Context Protocol (MCP). Q: What should you include when you define an AI agent? A: Bailey treats an agent spec as a detailed scope of work with seven parts: goal, context, tools, permissions, memory, actions, and stopping conditions. Stopping conditions matter because agents keep going until told to stop. Q: What is the elephant and the goldfish method for AI agents? A: The elephant is a long interview-me chat that produces a 4 to 6 page scope of work. A fresh, memoryless goldfish reads only that document and reports whether agents could execute it without clarifying questions; repeat until no goldfish has questions. Q: What does human in the loop mean in AI agents? A: It describes where in the agent loop a human is informed and can approve or block progress. Bailey argues the degree of human in the loop is the main difference between plain chat, connectors, and fully autonomous agents. Q: How do you make AI agents safer? A: Bailey urges a "what's the worst that could happen" mindset and least privilege access: give agents only the permissions the task needs. She also flags prompt injection and adding human approval before irreversible actions like permanent deletes. Chapters: 0:00 Intro: connectors, agents, and agent safety 2:20 What are AI connectors? 3:21 Email example: generative vs agentic AI 7:33 How AI tool calls work: next-token JSON 10:45 Connector instructions in the context window 16:41 Model Context Protocol (MCP) and MCP servers 18:05 Seven-part anatomy of an AI agent 23:34 Analyze, act, observe: the agent loop 27:38 Human in the loop and stopping conditions 29:34 The elephant and the goldfish method 38:22 Running the goldfish test loop 41:53 Agent safety: what's the worst that could happen? 53:14 Least privilege access for AI agents 55:21 Prompt injection via LinkedIn and web search About the speaker: Cynthia Bailey is a Senior Lecturer in the Computer Science Department at Stanford University. In 2023-2024, she served as an AI Policy Fellow in the United States Senate through the American Association for the Advancement of Science (AAAS). Her scholarship focuses on computer science education, AI/machine learning, and the social impacts of technology, including creating courses such as Equity and Governance for Artificial Intelligence and Race and Gender in Silicon Valley. Her teaching and research awards include…

    Not rated yet
  • Multi-Agent Systems: When More Agents Help or Hurt | Stanford CS329Z Lecture 8 with Michael Ryan

    · 1 hr 18 min

    Browse Stanford's online courses in Agentic AI: https://stanford.io/4AIRb2z Lecture Overview: Are multi-agent systems better than a single AI agent? Often not. In this Stanford CS329Z: Engineering AI Agents lecture, Michael Ryan explains when to use one agent vs. many, orchestration patterns (orchestrator-worker, swarm, hybrid), how agents communicate through handoffs, message boards, and Google's Agent2Agent (A2A) protocol, coordination tools like task ledgers, shared memory, and git worktrees, and the research on why multi-agent systems fail. Speaker: Michael Ryan Michael Ryan is a CS PhD student at Stanford University developing human-centered, open-source AI systems that augment human intelligence and reflect the plurality of human values. His contributions to the DSPy open-source project enable developers to optimize multi-stage AI systems, and his algorithms are used for automatic AI prompt optimization at Meta, Google, Dropbox, Amazon, and other organizations. Course website: https://cs329z.stanford.edu/ Watch the full CS329Z playlist: https://youtube.com/playlist?list=PLPRcF5HR02_U&si=3Z4OYphngcmQ0GIy Recorded 10/19/2026 in CS329Z: Engineering AI Agents, a graduate course at Stanford University taught by Diyi Yang, Michael Ryan, and John Yang. #AIAgents #AgenticAI #Stanford

    Not rated yet
  • Dan Boneh: Cryptography Is Everywhere in Everday Life

    · 44 sec

    Dan Boneh, Professor of Computer Science and Electrical Engineering at Stanford University, explains that cryptography is everywhere in everyday life. It keeps your text messages private and secures your online financial activity. It also authenticates and encrypts the information that government agencies and financial institutions send to one another. Boneh says that reach, a field used by everyone, is exactly why he loves it. Winter quarter enrollment is open now for CS255: Introduction to Cryptography, a Stanford Online graduate course. It explains how cryptographic primitives work and how to use them correctly. 🔗 https://stanford.io/cs255-intro-crypto-course Browse all grad courses available this winter quarter: 🔗 https://stanford.io/Winter-2026 #Cryptography #QuantumComputing #Cybersecurity

    Not rated yet
  • How AI Agent Memory Works: MemGPT & Memory Types | Stanford CS329Z Lecture 7 with Michael Ryan

    · 1 hr 18 min

    Browse Stanford's online courses in Agentic AI: https://stanford.io/4AIRb2z Lecture Overview: Why do AI agents forget, and how do you give them memory? In this Stanford CS329Z: Engineering AI Agents lecture, Michael Ryan explains the four types of agent memory (working, episodic, semantic, procedural), how to store memories in files, databases, or knowledge graphs, and the main architecture patterns: skill libraries like Voyager, tiered memory like MemGPT, reflective consolidation, and memory maintenance with A-MEM and Mem0. He closes with memory benchmarks and open problems in forgetting, privacy, and over-personalization. Speaker Michael Ryan Michael Ryan is a CS PhD student at Stanford University developing human-centered, open-source AI systems that augment human intelligence and reflect the plurality of human values. His contributions to the DSPy open-source project enable developers to optimize multi-stage AI systems, and his algorithms are used for automatic AI prompt optimization at Meta, Google, Dropbox, Amazon, and other organizations. Course website: https://cs329z.stanford.edu/ Watch the full CS329Z playlist: https://youtube.com/playlist?list=PLPRcF5HR02_U&si=3Z4OYphngcmQ0GIy Recorded 10/14/2026 in CS329Z: Engineering AI Agents, a graduate course at Stanford University taught by Diyi Yang, Michael Ryan, and John Yang. #AIAgents #AgenticAI #Stanford

    Not rated yet
  • AI Agent Design Patterns: ReAct, CodeAct & More | Stanford CS329Z Lecture 6 with Michael Ryan

    · 1 hr 16 min

    Browse Stanford's online courses in Agentic AI: https://stanford.io/4AIRb2z Self-paced online Agentic AI course: https://online.stanford.edu/programs/agentic-ai?utm_source=youtube&utm_medium=social&utm_content=cs329z-01-what-are-agentic-systems Lecture Overview: When should you build a workflow instead of an agent, and which design patterns work best? In this Stanford CS329Z: Engineering AI Agents lecture, Michael Ryan covers Anthropic's five workflow patterns, reasoning-and-acting patterns (ReAct, Reflexion, CodeAct, ReWOO), and context-management techniques like event logs, compaction, observation masking, subagents, and skills, ending with a case study of the minimal Pi harness. Speaker: Michael Ryan Michael Ryan is a CS PhD student at Stanford University developing human-centered, open-source AI systems that augment human intelligence and reflect the plurality of human values. His contributions to the DSPy open-source project enable developers to optimize multi-stage AI systems, and his algorithms are used for automatic AI prompt optimization at Meta, Google, Dropbox, Amazon, and other organizations. Course website: https://cs329z.stanford.edu/ Watch the full CS329Z playlist: https://youtube.com/playlist?list=PLPRcF5HR02_U&si=3Z4OYphngcmQ0GIy Recorded 10/12/2026 in CS329Z: Engineering AI Agents, a graduate course at Stanford University taught by Diyi Yang, Michael Ryan, and John Yang. #AIAgents #AgenticAI #Stanford

    Not rated yet
  • Stanford CME295 Transformers & LLMs | Autumn 2026 | Lecture 6 - AI Agents

    · 1 hr 40 min

    For more information about Stanford’s graduate programs, visit: https://stanford.io/grad-ed-cme295-A2026 To follow along with the course schedule and syllabus, visit: https://cme295.stanford.edu/syllabus/ Chapters: 00:00:00 Introduction 00:08:53 Retrieval-augmented generation (RAG) 00:17:12 Candidate retrieval (bi-encoder, cross-encoder, BM25) 00:28:36 Re-ranking 00:35:16 Retrieval evaluation (NDCG, MRR, precision, recall) 00:44:31 Tool calling 01:08:18 Tool selection 01:12:42 Model context protocol (MCP) 01:22:53 Harness engineering 01:24:26 Reason + Act (ReAct) 01:29:02 Context compaction 01:31:00 Memory 01:33:37 Coding agents 01:38:53 Discussion Afshine Amidi is an Adjunct Professor at Stanford University. Shervine Amidi is an Adjunct Professor at Stanford University. Follow the playlist: https://youtube.com/playlist?list=PLakGfbKCei80&si=HF2tNywj7nXIQq8X

    Not rated yet
  • DSPy vs. LangGraph: AI Agent Frameworks Explained | Stanford CS329Z Lecture 5 with Michael Ryan

    · 1 hr 17 min

    Browse Stanford's online courses in Agentic AI: https://stanford.io/4AIRb2z Self-paced online Agentic AI course: https://online.stanford.edu/programs/agentic-ai?utm_source=youtube&utm_medium=social&utm_content=cs329z-01-what-are-agentic-systems Lecture Overview: Which framework should you use to build AI agents? In this Stanford CS329Z: Engineering AI Agents lecture, DSPy contributor Michael Ryan live-codes agents in DSPy (signatures, modules, and optimizers) and LangGraph (state, nodes, and edges), then compares open-source agent harnesses like mini-SWE-agent, OpenHands, and Pi, shows durable orchestration with Temporal, and shares best practices for observability and evals. Speaker: Michael Ryan Michael Ryan is a CS PhD student at Stanford University developing human-centered, open-source AI systems that augment human intelligence and reflect the plurality of human values. His contributions to the DSPy open-source project enable developers to optimize multi-stage AI systems, and his algorithms are used for automatic AI prompt optimization at Meta, Google, Dropbox, Amazon, and other organizations. Course website: https://cs329z.stanford.edu/ Watch the full CS329Z playlist: https://youtube.com/playlist?list=PLPRcF5HR02_U&si=3Z4OYphngcmQ0GIy Recorded 10/07/2026 in CS329Z: Engineering AI Agents, a graduate course at Stanford University taught by Diyi Yang, Michael Ryan, and John Yang. #AIAgents #AgenticAI #Stanford

    Not rated yet
  • Why AI Decisions Are Geopolitical Decisions | Francis Fukuyama & Andy Grotto, Stanford

    · 2 min

    Learn more and enroll: https://online.stanford.edu/courses/xfsi210-ai-power-and-new-rules-global-strategy?utm_source=youtube&utm_medium=social&utm_content=FSI-overview In this overview of AI, Power, and the New Rules of Global Strategy, academic co-directors Francis Fukuyama and Andy Grotto of Stanford’s Freeman Spogli Institute for International Studies explain why AI decisions are never only about technology. AI has political, social, and international dimensions that leaders need to understand. Boards and investors are pushing senior executives to figure out their AI strategy, and every choice carries regulatory, reputational, and geopolitical risk. Fukuyama and Grotto built this in-person executive program because nothing else on the market connected geopolitics to the AI decisions organizations actually face. Over three and a half days on the Stanford campus, you’ll learn how to: Spot the geopolitical, regulatory, and economic issues behind your AI decisions Weigh costs, benefits, and second-order effects Do your own research and reach independent, defensible conclusions Sessions cover the digital economy, AI governance and regulation, export controls, semiconductors and energy, U.S.–China competition, and military uses of AI. Speakers include Stanford faculty, Silicon Valley builders, investors, policymakers, and military leaders. The program is for board members, C-suite executives, technology and product leaders, government officials, and leaders of international organizations and NGOs. You don’t need a technical background. A prework course, AI Technical Foundations, gives you the technical grounding before you arrive. March 22–25, 2027 | In person at Stanford University #ArtificialIntelligence #Geopolitics #AIStrategy #ExecutiveEducation #StanfordOnline

    Not rated yet
  • 300+ Million Health Questions a Week: Inside OpenAI's Plan for Healthcare

    · 33 min

    Learn more about Stanford's online Healthcare AI programs: https://stanford.io/3NEt7uE Check out the AI in Healthcare series playlist:https://stanford.io/3NEt7uE Matt Lungren, Stanford University - https://profiles.stanford.edu/matthew-lungren Justin Norden, Stanford University - https://profiles.stanford.edu/justin-norden Guest speaker: Ashley Alexander, VP of Health Products at OpenAI Over 300 million people now ask #ChatGPT health questions every week. In this episode of the Stanford AI in Healthcare Podcast, Ashley Alexander, #OpenAI's head of health products and former Instagram product leader, shares what she's learned in her first year. She covers connecting medical records to ChatGPT, the free ChatGPT for Clinicians, enterprise partnerships with top U.S. health systems, and the proactive AI agents that can prep you for appointments and book your labs. We also dig into why adoption is early outside tech circles, and why the barrier to transforming healthcare is product design and regulation, not model capability.

    Not rated yet
  • How AI Agents Use Tools: Function Calling & MCP | Stanford CS329Z Lecture 4 with Diyi Yang

    · 1 hr 19 min

    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

    Not rated yet
  • Using AI in Research | Stanford CS193T Guest Panel with Mark Algee-Hewitt, Megan Ma & Markus Covert

    · 1 hr 11 min

    Explore AI courses and programs from Stanford Online: https://stanford.io/4BYTekh How do Stanford researchers use AI in their own fields? In this Stanford CS193T: Thinking with AI guest panel recording, hosted by Senior Lecturer Cynthia Bailey, guests from three different corners of campus (English, Law, and Bioengineering) share innovative applications of AI in their respective disciplines, what responsible use of AI means in their academic communities, and how they protect the core of what makes them successful from atrophy. Professor Mark Algee-Hewitt leads Stanford's Digital Humanities program, using computational methods to explore language and meaning-making. Megan Ma is the Executive Director of the Stanford Legal Innovation through Frontier Technology (LIFT) Lab, creating AI tools for the practice of law and studying the future of legal education and training under shifting attorney labor market pressures due to AI. Professor Markus Covert is the Chair of the Department of Bioengineering, and for over two decades has pioneered the development of computational models of complex biological processes. Key questions answered in this lecture recording: Q: Should professors use AI to write recommendation letters? A: Markus Covert has decided not to write letters with AI; he uses it only to hold and recall information about a student, and asks how AI could raise a letter's quality rather than save time. Q: Should universities and journals ban AI? A: Mark Algee-Hewitt argues blanket bans push people to use AI without saying so. Journals in his field instead require disclosure and define acceptable uses, such as coding with Claude Code but not writing the paper. Q: How is AI being used to train lawyers? A: Megan Ma describes LIFT Lab's open-source deposition simulator, which turns a witness statement into an AI witness with adjustable personalities (combative, evasive, forgetful) so junior attorneys can practice. Q: What skills should students not lose to AI? A: Mark Algee-Hewitt names critical thinking, Megan Ma names judgment built from real experience and storytelling, and Markus Covert names scientific taste, intellectual courage, and curiosity. Q: How can I use AI to write without losing my own voice? A: Markus Covert writes each paragraph himself, then asks Claude for missing citations, the strongest counterarguments, and analogies from other fields, checking every paper himself. Q: Are rubrics or preference rankings better for evaluating legal AI? A: In LIFT Lab's JudgmentBench research, Megan Ma reports that preference rankings far outperformed rubrics because they capture lawyer intuition. Chapters: 0:00 Introducing the AI in Research panel 1:00 Mark Algee-Hewitt: digital humanities at scale 5:09 Style in the Age of AI: do disciplines have style? 7:05 LLM style transfer: philosophy written as CS 8:57 Megan Ma: Stanford LIFT Lab and legal AI 10:40 JudgmentBench: preference rankings vs rubrics 13:17 AI deposition simulator for training lawyers 17:55 Markus Covert: whole-cell simulation 22:36 AI tutors, learning, and the MIT report 26:14 Panel: building for future AI capabilities 32:46 Should professors use AI for recommendations? 42:51 AI transparency and disclosure norms 54:22 Q&A: skills students shouldn't lose to AI 1:00:38 Learning with AI vs letting AI do the work About the speakers: Mark Algee-Hewitt leads Stanford's Digital Humanities program. His work combines critical and quantitative approaches to the analysis of literature. As director of the Stanford Literary Lab, he has led projects on the literature of suspense, the history of racialized language in American literature, and an analysis of the reports of the OECD's anti-bribery convention. Megan Ma is the Executive Director of the Stanford Legal Innovation through Frontier Technology (LIFT) Lab. Her research focuses on the use and integration of generative AI in legal practice, considering their implications in contexts of human-machine…

    Not rated yet
  • Example of an AI Agent Memory Failure: Lost Instructions | Stanford CS329Z

    · 1 min

    Stanford's Diyi Yang explains how an OpenClaw agent deleted a user's emails after context compression dropped the instruction 'confirm before you act.' Watch the full Stanford CS329Z lecture recording on our channel. #AIAgents #AgentMemory #AISafety

    Not rated yet
  • RAG Explained: From BM25 to Agentic RAG | Stanford CS329Z Lecture 3 with Diyi Yang

    · 1 hr 16 min

    Browse Stanford's online courses in Agentic AI: https://stanford.io/4AIRb2z Self-paced online Agentic AI course: https://online.stanford.edu/programs/agentic-ai?utm_source=youtube&utm_medium=social&utm_content=cs329z-01-what-are-agentic-systems Lecture Overview: How does retrieval-augmented generation (RAG) work, and do frontier models still need it? In this Stanford CS329Z: Engineering AI Agents lecture, Stanford professor Diyi Yang walks through the full RAG pipeline: chunking and contextual retrieval, RAPTOR and GraphRAG, vector search with HNSW, BM25 vs. dense retrieval (DPR), hybrid search, rerankers and ColBERT, and agentic RAG methods like Self-RAG, CRAG, and Search-R1. 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). Chapters: 0:00 Introduction & course project guidelines 5:53 Why RAG? Grounding answers in evidence 8:55 From retriever-reader QA to RAG 20:22 Q&A: do frontier models still need RAG? 23:28 Indexing: embeddings & chunking strategies 29:25 Contextual retrieval & late chunking 36:27 Hierarchical & graph RAG: RAPTOR, GraphRAG 40:25 Q&A: GraphRAG & compounding errors 45:14 Vector search: ANN & HNSW 48:42 BM25 vs. dense retrieval (DPR) 55:42 Retrieval metrics & hybrid search 1:02:34 Bi-encoders, cross-encoders & ColBERT 1:08:18 Agentic RAG: Self-RAG, CRAG, Search-R1 1:14:29 RAG failure modes Course website: https://cs329z.stanford.edu/ Watch the full CS329Z playlist: https://youtube.com/playlist?list=PLPRcF5HR02_U&si=3Z4OYphngcmQ0GIy Recorded 9/30/2026 in CS329Z: Engineering AI Agents, a graduate course at Stanford University taught by Diyi Yang, Michael Ryan, and John Yang. #RAG #AIAgents #Stanford

    Not rated yet
  • AI Memory, RAG & Prompt Injection Explained | Stanford CS193T Lecture 3 with Cynthia Bailey

    · 1 hr 3 min

    Explore AI courses and programs from Stanford Online: https://stanford.io/4BYTekh What else is sharing your AI's context window besides your prompt? In this Stanford CS193T: Thinking with AI lecture recording, Senior Lecturer Cynthia Bailey focuses on context, information, and prompt instructions that persist beyond a single chat session: settings, remembered facts, uploaded files, and retrieved web pages. Examples include how to use these tools to reduce sycophancy and "AI style," understanding what your chat history is (and isn't) used for, saving your best prompts as reusable Skills or Gems, and strategic withholding, where the smartest prompt leaves something out. She introduces retrieval-augmented generation (RAG) for grounding AI in your own documents when they would overflow the context window, and the documented ways trust in a RAG store can fail. The lecture closes on a cybersecurity note with prompt injection: why an AI can't always tell your instructions apart from malicious text on the internet. Key questions answered in this lecture recording: Q: Does ChatGPT learn from my conversations? A: A released model's weights are frozen, so memories change behavior only through the context window. But a company that sees your chat history could use it to train future models; Stanford's licensed AI tools prohibit that, while personal accounts may not. Q: What is retrieval-augmented generation (RAG)? A: RAG is a user-curated document store, much larger than the context window, that the tool searches to place only relevant documents into the context. Because RAG content gets extra weight, Bailey warns that bad sources can poison results. Q: What is the adaptive chameleon vs stubborn sloth problem in LLMs? A: Citing the paper "Adaptive Chameleon or Stubborn Sloth," Bailey explains that models sometimes accept bad information in your RAG too eagerly and sometimes ignore your sources in favor of training data. Either behavior can help or hurt. Q: How do I get more honest feedback from ChatGPT or Claude? A: Use strategic withholding: ask the AI to evaluate "this essay," not "my essay," or frame your resume as a candidate's, and use a temporary chat so memories don't reveal it's yours. Q: What is prompt injection? A: The system prompt, your prompt, and retrieved web pages are one continuous stream of tokens, so hidden text on a web page can issue instructions the model may obey. The risk grows when AI has connectors to email or files. Q: Do Claude Skills or Gemini Gems fine-tune the model? A: No. Bailey says skills and gems are one more piece of text in the context window, functioning between the system prompt and your prompt, and they do not change the model's weights. Chapters: 0:00 Managing sources and the context window 1:06 Saving preferences in ChatGPT 3:24 Claude's system prompt and custom instructions 6:53 How AI memory works across chats 9:44 Importing ChatGPT memories into Gemini 11:25 Everything that fills the context window 15:47 Chat privacy: do your chats train AI models? 18:41 RAG: retrieval-augmented generation 22:31 Adaptive Chameleon or Stubborn Sloth 28:43 Saving reusable prompts: Claude Skills, Gems 36:19 Strategic withholding for candid AI feedback 44:47 Overriding the system prompt and red teaming 50:01 Prompt injection from web documents 53:57 Q&A: connectors and prompt injection defenses About the speaker: Cynthia Bailey is a Senior Lecturer in the Computer Science Department at Stanford University. In 2023-2024, she served as an AI Policy Fellow in the United States Senate through the American Association for the Advancement of Science (AAAS). Her scholarship focuses on computer science education, AI/machine learning, and the social impacts of technology, including creating courses such as Equity and Governance for Artificial Intelligence and Race and Gender in Silicon Valley. Her teaching and research awards include the Lloyd W. Dinkelspiel Award for exceptional contributions to undergraduate…

    Not rated yet
  • LLMs for Agent Builders: Context Engineering | Stanford CS329Z Lecture 2 with Michael Ryan

    · 1 hr 17 min

    Browse Stanford's online courses in Agentic AI: https://stanford.io/4AIRb2z Lecture Overview: What do you need to know about how LLMs work to build better AI agents? In this Stanford CS329Z: Engineering AI Agents lecture, Stanford PhD student and DSPy contributor Michael Ryan covers decoding strategies (sampling and temperature), transformer attention (including linear and hybrid attention) and context length, the pretraining-to-post-training pipeline (SFT, RLHF, RLVR), inference (prefill vs. decode and the KV cache) and test-time scaling, structured I/O and constrained decoding, and context engineering, including why stuffing everything into the context window backfires. Speaker: Michael Ryan Michael Ryan is a CS PhD student at Stanford University developing human-centered, open-source AI systems that augment human intelligence and reflect the plurality of human values. His contributions to the DSPy open-source project enable developers to optimize multi-stage AI systems, and his algorithms are used for automatic AI prompt optimization at Meta, Google, Dropbox, Amazon, and other organizations. Chapters: 0:00 Introduction: the LLM stack 3:57 What is a language model? 7:46 Sampling: greedy, top-p, top-k & temperature 16:03 Transformer architecture & self-attention 28:27 Attention vs. recurrence & linear attention 36:01 Pretraining & mid-training 44:21 Post-training: SFT, RLHF & RLVR 47:33 Training LLMs for coding agents 49:11 Q&A: long-horizon data 52:30 Inference: prefill, decode & KV cache 59:56 Reasoning models & test-time scaling 1:04:58 Structured outputs & constrained decoding 1:10:12 Context engineering & context rot 1:16:03 Recursive language models Course website: https://cs329z.stanford.edu/ Watch the full CS329Z playlist: https://youtube.com/playlist?list=PLPRcF5HR02_U&si=3Z4OYphngcmQ0GIy Recorded 9/28/2026 in CS329Z: Engineering AI Agents, a graduate course at Stanford University taught by Diyi Yang, Michael Ryan, and John Yang. #AIAgents #LLM #ContextEngineering

    Not rated yet
  • How to Prompt AI Well: Trust, Evidence & Context Rot | Stanford CS193T Lecture 2 with Cynthia Bailey

    · 1 hr 16 min

    Explore AI courses and programs from Stanford Online: https://stanford.io/4BYTekh How do you get reliable, useful results from AI? In this Stanford CS193T: Thinking with AI lecture recording, Senior Lecturer Cynthia Bailey covers how to prompt effectively, treating AI like a capable but new hire and using techniques like detailed scope-of-work prompts, the "interview me" pattern, and prompt postmortems you can reuse. She digs into trust and observability (catching confident mistakes, grounding answers in your own data, knowing when to demand evidence over assertions), the mechanics of managing long conversations (context rot, "lost in the middle," knowing when to start fresh), and resource-mindful habits that are good for your wallet and the planet alike. The lecture closes on a thread that recurs all quarter: how to stay the one steering the AI, rather than letting your own skills and independent judgment quietly atrophy. Key questions answered in this lecture recording: Q: How should I write prompts for ChatGPT or Claude? A: Bailey says there is no special style to adopt; write naturally, but be direct, specific and detailed, covering who, what, when, where, how and why plus what success looks like. Q: What is the interview me prompting technique? A: Give the AI a high-level goal and tell it to interview you before starting work (for example, at least ten questions), so it gathers the requirements you might not think to state. Q: Can I ask an AI chatbot how confident it is in its answer? A: No. Bailey explains the model has no access to its own past internal calculations; asking it to rate its confidence or check for bias just starts a new text generation that sounds like an answer. Q: How do I know if an AI answer is trustworthy? A: Ask for evidence, not assertions: request citations and open every one, and search any quote to confirm it was not subtly altered. Q: Should I start a new chat for every topic? A: Yes for new topics: unrelated history dilutes focus and wastes tokens. For the same topic it depends, since long chats can suffer context rot, odd fixations and lost-in-the-middle effects. Q: How can I avoid losing skills by relying on AI? A: Bailey asks the AI to explain what it did so she can do it herself next time, keeps a document of these mini lessons, and urges students to set up an external early-warning check, since you won't notice skills dulling on your own. Chapters: 0:00 Core prompting skills: lecture overview 5:08 Prompt writing style and system prompts 11:19 Assigning a role to the AI 13:48 Grounding AI with your own examples 16:57 Prompt like a manager: AI as eager intern 22:54 Interview-me and prompt postmortem patterns 27:51 Q&A: does AI use harm the environment? 31:50 Why AI can't rate its own confidence 36:56 Ask for evidence, not assertions 39:56 Observability: making AI work visible 46:32 Reasoning models and chain of thought 53:39 Context management: new topic, new chat 57:17 Context rot, primacy and recency bias 1:05:05 Resource management and independent voice About the speaker: Cynthia Bailey is a Senior Lecturer in the Computer Science Department at Stanford University. In 2023-2024, she served as an AI Policy Fellow in the United States Senate through the American Association for the Advancement of Science (AAAS). Her scholarship focuses on computer science education, AI/machine learning, and the social impacts of technology, including creating courses such as Equity and Governance for Artificial Intelligence and Race and Gender in Silicon Valley. Her teaching and research awards include the Lloyd W. Dinkelspiel Award for exceptional contributions to undergraduate education at Stanford, the Lasting Impact Award from the International Computing Education Research conference, a "Top 10 Papers of All Time" award at the 50th anniversary of the ACM SIGCSE Technical Symposium, and the Stanford Society of Women Engineers' Professor of the Year. She has consulted for Apple, NASA, law…

    Not rated yet
  • What Are AI Agents? Agentic Systems Explained | Stanford CS329Z Lecture 1 with Diyi Yang

    · 1 hr 9 min

    Browse Stanford's online courses in Agentic AI: https://stanford.io/4AIRb2z Lecture Overview: What is an AI agent, and how is it different from an LLM workflow? In the first lecture of Stanford CS329Z: Engineering AI Agents (Fall 2026), Stanford professor Diyi Yang traces the history of agents from the 1973 actor model to ReAct and AutoGPT, breaks down the anatomy of a modern LLM agent (LLM core, planning and reasoning, memory, tools, and environment), and explains why the most powerful agent may not be the most reliable one. She also covers course logistics and the key challenges for agents: reliability, training, safety, and evaluation. 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). Chapters: 0:00 Welcome & instructor introductions 1:18 Course overview & logistics 7:40 A short history of AI agents 14:00 ReAct, BabyAGI & AutoGPT: the agent boom 19:06 Q&A: Will model capabilities saturate? 22:05 Anatomy of an LLM agent 28:19 Planning & reasoning: CoT, ReAct, Reflexion 36:52 Q&A: ReAct vs. chain of thought 40:39 Multi-agent debate & orchestration 43:12 Agent memory: episodic, semantic, procedural 46:30 Tool use: Toolformer & Gorilla 53:31 Compound AI systems: workflows vs. agents 58:41 Tool calls & Model Context Protocol (MCP) 1:01:05 Key challenges: reliability, safety & privacy Course website: https://cs329z.stanford.edu/ Watch the full CS329Z playlist: https://youtube.com/playlist?list=PLPRcF5HR02_U&si=3Z4OYphngcmQ0GIy Recorded 9/23/2026 in CS329Z: Engineering AI Agents, a graduate course at Stanford University taught by Diyi Yang, Michael Ryan, and John Yang. #AIAgents #AgenticAI #Stanford

    Not rated yet
  • How AI Chatbots Work: LLMs, Tokens & Hallucination | Stanford CS193T Lecture 1 with Cynthia Bailey

    · 1 hr 12 min

    Explore AI courses and programs from Stanford Online: https://stanford.io/4BYTekh What's happening when you chat with an AI? In this Stanford CS193T: Thinking with AI lecture recording, Senior Lecturer Cynthia Bailey demystifies large language models from the ground up: tokens, neural networks, weights and layers, and the two-stage journey from training to inference that turns raw text into a working chatbot. She introduces the concepts (context windows, transformers, attention) that explain both what makes modern AI so capable and why it still confidently gets things wrong, including hallucination, sycophancy, and the pull to anthropomorphize a fundamentally statistical tool. No coding or technical background required: by the end, you'll have a working mental model for what AI can and can't do. Key questions answered in this lecture recording: Q: What is the definition of AI? A: Bailey argues AI is inherently ill-defined: it has meant whatever computers do that amazes us, from arithmetic in the 1950s to chess to today's text and video generation. In CS193T, AI means LLMs and multimodal generative AI. Q: How does a large language model generate text? A: An LLM is a statistical fingerprint of how language is used across huge amounts of text; it repeatedly predicts the next token from your prompt plus the response so far until the reply is finished. Q: Does ChatGPT learn from my conversations? A: Not in the sense of changing its weights: once training ends, the weights are fixed and shared by everyone. A chat seems to adapt because the model responds to what is in your context window. Q: Why do AI chatbots hallucinate? A: Picking the most probable next word produces text that sounds normal, not text that is true. The same ability to generalize to unseen input that makes LLMs powerful means hallucination will always be a risk. Q: Is 'hallucination' the right word for AI errors? A: Bailey notes the term is contested because it anthropomorphizes AI, making a statistical tool seem human. Alternatives include confabulation and fact fabrication, though some of those also come from describing human behavior. Q: What is a context window in AI? A: It is the input the model processes for each prediction, with a maximum size set by the vendor (roughly 200,000 to 10 million tokens at top companies). Bailey says to treat it as a large but finite resource you actively manage. Chapters: 0:00 Course overview: context engineering 1:10 Meet instructor Cynthia Bailey 5:55 What is AI? A moving target 8:59 LLMs, multimodal and generative AI defined 12:58 Next-token prediction: fill-in-the-blank demo 18:16 Inside a neural network: nodes and concepts 23:16 Weights, parameters and deep learning 28:58 How AI models are trained 33:38 Pre-training, data centers and GPUs 36:58 Fine-tuning and RLHF 39:31 Inference and student Q&A 45:38 Why context matters and transformers 52:25 The context window as a finite resource 54:58 Explainability, hallucinations, anthropomorphism About the speaker: Cynthia Bailey is a Senior Lecturer in the Computer Science Department at Stanford University. In 2023-2024, she served as an AI Policy Fellow in the United States Senate through the American Association for the Advancement of Science (AAAS). Her scholarship focuses on computer science education, AI/machine learning, and the social impacts of technology, including creating courses such as Equity and Governance for Artificial Intelligence and Race and Gender in Silicon Valley. Her teaching and research awards include the Lloyd W. Dinkelspiel Award for exceptional contributions to undergraduate education at Stanford, the Lasting Impact Award from the International Computing Education Research conference, a "Top 10 Papers of All Time" award at the 50th anniversary of the ACM SIGCSE Technical Symposium, and the Stanford Society of Women Engineers' Professor of the Year. She has consulted for Apple, NASA, law firms, and machine learning startups. She holds a Ph.D. in…

    Not rated yet
  • Stanford AA274A Principles of Robotic Autonomy | Autumn 2019 | Extra Session - Particle Filter SLAM

    · 1 hr 4 min

    For more information about Stanford’s graduate programs, visit: https://stanford.io/grad-ed-pf-slam Lecture 22 — Particle Filter SLAM Note: This lecture was recorded as part of the 2019 edition of the course. Course content, structure, assignments, and other materials may have changed since this recording. The course links below point to the most recent edition and may therefore differ from what is presented in the video. Read the companion textbook, Principles of Robot Autonomy, free online: https://porabook.com Follow along with the latest course schedule and syllabus: https://stanfordasl.github.io/PoRA-I Speaker: Prof. Marco Pavone Dr. Marco Pavone is an Associate Professor of Aeronautics and Astronautics at Stanford University and a Senior Director of Autonomous Vehicle Research at NVIDIA. Prior to joining Stanford, he was a Research Technologist in the Robotics Section at NASA’s Jet Propulsion Laboratory. Dr. Pavone received his Ph.D. in Aeronautics and Astronautics from the Massachusetts Institute of Technology in 2010. His research focuses on the analysis, design, and control of autonomous systems, with particular emphasis on self-driving cars, autonomous aerospace vehicles, and future mobility systems. He has been recognized with numerous awards, including the Presidential Early Career Award for Scientists and Engineers from President Barack Obama, the Office of Naval Research Young Investigator Award, the NSF CAREER Award, the NASA Early Career Faculty Award, the IEEE Kiyo Tomiyasu Award, the CSS Award for Technical Excellence in Aerospace Control, and the Early-Career Spotlight Award from the Robotics Science and Systems Foundation. Full playlist: https://www.youtube.com/playlist?list=PLR9iNyexfIkk #StanfordOnline #RobotAutonomy #Robotics #PhysicalAI

    Not rated yet
  • Stanford CME295 Transformers & LLMs | Autumn 2026 | Lecture 5 - LLM Systems

    · 1 hr 47 min

    For more information about Stanford’s graduate programs, visit: https://stanford.io/grad-ed-cme295-A2026 To follow along with the course schedule and syllabus, visit: https://cme295.stanford.edu/syllabus/ Chapters: 00:00:00 Introduction 00:09:12 Flash attention 00:50:48 Distributed training 00:54:25 Data parallelism (DP) 00:55:30 Zero Redundancy Optimizer (ZeRO) 01:00:29 Tensor parallelism (TP) 01:02:05 Pipeline parallelism (PP) 01:04:12 Context parallelism (CP) 01:06:10 Expert parallelism (EP) 01:09:52 Inference optimizations 01:22:49 KV caching 01:24:30 Paged attention 01:28:01 Grouped-query attention (GQA) 01:30:43 Multi-head latent attention (MLA) 01:32:40 Speculative decoding 01:45:27 Multi-token prediction (MTP) Afshine Amidi is an Adjunct Professor at Stanford University. Shervine Amidi is an Adjunct Professor at Stanford University. Follow the playlist: https://youtube.com/playlist?list=PLakGfbKCei80&si=HF2tNywj7nXIQq8X

    Not rated yet

More in Education

See all Education shows