Key Moments

Stanford CS329A Self-Improving AI Agents | Part 1 | Course Overview

Stanford OnlineStanford Online
Education5 min read70 min video
Aug 3, 2026|1,235 views|98|5
Save to Pod
TL;DR

Self-improving AI agents are emerging, capable of complex real-world workflows and sophisticated reasoning, but their development and verification remain significant research challenges.

Key Insights

1

Increasing model size (parameters), compute, and data has historically driven performance improvements in LLMs, with exponential growth in parameters from BERT (340M) to GPT-4 (trillions).

2

Emergent behaviors like chain-of-thought reasoning appear in larger models, enabling them to break down problems and show their work, significantly improving performance on complex tasks.

3

ChatGPT's rapid adoption (1M users in 5 days) was attributed to innovations beyond scaling, specifically instruction tuning and Reinforcement Learning from Human Feedback (RLHF).

4

Inference scaling, through methods like repeated sampling, can unlock more capability from existing models without changing parameters, demonstrating that models often know more than initially apparent.

5

Agentic workflows, moving beyond chatbots, enable end-to-end task completion by planning, interacting with environments, and self-correcting based on feedback, with applications in coding, research, and customer support.

6

Verifiers and feedback loops are crucial for improving AI agents, especially in domains like coding where unit tests can provide robust validation, though human feedback remains a bottleneck for creative tasks.

The scaling laws that powered large language models

The first lecture of Stanford's CS329A course introduces the foundational trend in large language models (LLMs): the power of scaling. For years, increasing the number of parameters, the amount of compute, and the size of the training dataset consistently led to better performance and lower loss functions. This relationship, often referred to as scaling laws, has been the driving force behind models like BERT, GPT-3, PaLM, and Gemini. For instance, model sizes have grown exponentially, from BERT's 340 million parameters to GPT-3's 175 billion, and estimates for GPT-4 suggesting trillions. This exponential growth in scale has been directly correlated with improved performance on natural language benchmarks, reasoning tasks, and the emergence of few-shot and zero-shot learning capabilities, where models can perform tasks with minimal or no specific training examples.

Emergent behaviors: Few-shot learning and chain-of-thought reasoning

Beyond predictable performance gains, scaling LLMs has led to surprising emergent behaviors. One significant capability is few-shot learning, where models can adapt to new tasks by seeing just a few examples within the prompt, drastically reducing the need for extensive fine-tuning. Even more remarkable is the emergence of chain-of-thought (CoT) reasoning. While smaller models struggle with multi-step problems, larger models, when prompted with examples that include the reasoning process (e.g., step-by-step problem-solving), can learn to generate similar reasoning chains themselves. This ability to articulate a thought process, demonstrated on tasks like math word problems, has been crucial for improving the accuracy and reliability of LLMs on complex reasoning tasks. The lecture highlighted that capabilities like CoT do not linearly improve with scale but rather appear at certain model sizes, making their discovery a testament to empirical exploration rather than pure prediction.

ChatGPT's innovations: Instruction tuning and RLHF

The rapid success of ChatGPT, which reached 1 million users in just 5 days, was not solely due to scaling but also key innovations in the fine-tuning process. The lecture detailed two critical steps: instruction tuning and Reinforcement Learning from Human Feedback (RLHF). Instruction tuning teaches models to follow explicit instructions and respond in a desired format, often using a mix of human-generated and synthetic data containing instruction-answer pairs. RLHF goes further by using human preferences to train a reward model, which then guides the LLM to generate responses that are more aligned with human values like helpfulness, harmlessness, and sensibility. This alignment process is essential for steering powerful, pre-trained models towards safe and useful interactions, though it remains an ongoing challenge.

Inference scaling: Unlocking latent capabilities

A more recent frontier is inference scaling, which focuses on improving model performance at inference time without altering the model's parameters. The 'Large Language Monkeys' project, inspired by the infinite monkey theorem, demonstrated that by asking an LLM to solve a problem multiple times (parallel sampling) and then selecting the best response using a verifier (like unit tests for code), significantly better results can be achieved. For instance, smaller models like LLaMA 8B, when sampled 10,000 times, outperformed GPT-4 with a single sample on certain benchmarks. This suggests that models possess more latent capabilities than a single forward pass reveals, and techniques like inference scaling can extract this hidden potential. This approach is distinct from traditional training and opens new avenues for enhancing AI performance.

The rise of agentic workflows

The course transitions to the concept of self-improving AI agents, moving beyond simple chatbots to systems capable of executing complex, end-to-end real-world workflows. Agents are defined by their ability to plan, take actions, interact with an environment, receive feedback, and self-correct to achieve a given goal. Examples like Claude Code and Deep Research illustrate this shift, enabling tasks like automated research or complex coding modifications solely through English instructions. This paradigm shift requires models to possess planning capabilities, multi-step reasoning, and robust self-improvement mechanisms, often involving interactions with external tools and maintaining memory of their ongoing tasks.

Orchestration and verification in agentic systems

Agentic workflows are orchestrated through various methods, including prompt chaining, routing, parallelization, and dedicated orchestrator models. A key component is verification: ensuring the agent's outputs are correct and reliable. In domains like coding, unit tests serve as powerful verifiers, allowing agents to generate code and then test it. For more creative or open-ended tasks, however, verification becomes a bottleneck, often relying on human feedback or LLM-based judges. The challenge of the 'generator-verifier gap' highlights the need for robust feedback loops. The course will explore how these systems are built, emphasizing the importance of planning, multi-step reasoning, and self-correction, with dedicated lectures on topics like verifiers and RLHF.

Course structure and project opportunities

Stanford's CS329A course offers a comprehensive curriculum on self-improving AI agents, featuring lectures, guest speakers from AI labs, and hands-on projects. The course structure includes three homework assignments and a significant course project, encouraging students to explore agentic systems, develop new benchmarks, or improve existing methods. Students will have access to API credits and can work in teams. The project timeline includes proposal submission, midterm presentations, and a final poster session. The grading rubric allocates 50% to homeworks and 50% to the project, emphasizing research-oriented work rather than simple application development. The course aims to equip students with the knowledge to build and understand the next generation of intelligent agents.

Common Questions

The primary scaling trends that lead to better language model performance are increasing the number of parameters, expanding the dataset size, and increasing the amount of compute used for training. These factors contribute to lower test loss and improved capabilities.

Topics

Mentioned in this video

Software & Apps
CS 329A

The course on self-improving AI agents being taught.

Gemini

A model Azalia Mirhoseini worked on at Google DeepMind.

cs329a.stanford.edu

The website for the CS 329A course, containing lecture materials, papers, and schedule.

BERT

An older language model mentioned in the context of scaling parameters.

T5

An older language model mentioned in the context of scaling parameters.

GPT-3

A foundational large language model that demonstrated performance improvements with scaling.

PaLM

A large language model mentioned in the context of scaling laws and emergent behaviors.

ChatGPT

A highly successful AI chatbot launched in November 2022, known for its rapid user acquisition and innovations like instruction tuning and RLHF.

GPT-4

An estimated large language model with trillions of parameters, discussed in the context of exponential growth in model size.

GPT-4o

A model that reasoning models are compared against, showing outperformance in reasoning tasks but not necessarily in creative writing.

Canvas

The platform used for course updates, assignments, and office hours.

Gradescope

The platform for submitting project milestones and homeworks.

Llama 8B

A language model whose performance on benchmarks can improve significantly with increased sampling during inference.

Gemini Thinking

A model series that integrates fine-tuning and test-time scaling, contributing to advancements in reasoning models.

LLaMA 3 8B

A language model whose performance on benchmarks can improve significantly with increased sampling during inference.

Claude Code

A coding agent that enables real-world workflows by planning, interacting with the environment, and achieving tasks end-to-end.

Codex

An OpenAI coding agent that allows users to modify files and figure out test cases using English instructions.

Code Monkeys

A project from the previous year that explored generating unit tests for model-generated code to aid verification.

EdStem

A platform for asking and broadcasting course-related questions to the community.

More from Stanford Online

View all 116 summaries

Ask anything from this episode.

Save it, chat with it, and connect it to Claude or ChatGPT. Get cited answers from the actual content — and build your own knowledge base of every podcast and video you care about.

Get Started Free