MS&E 203: Building and Evaluating AI Products and Agents

Stanford University Fall 2026

Course Description

A project-based course on building AI products and agents end-to-end. Students build a real product over the quarter, justifying AI fit, navigating latency, quality, and cost trade-offs, and rigorously evaluating their own system. The course moves from an individual mechanics phase into a team build, ending in a Demo Day. The topic arc moves from building the right thing, to evaluating and improving it, to designing, stress-testing, and shipping.

A 3-unit course with one 2-hour session per week for 10 weeks; each session is roughly 1 hour of lecture and reading discussion plus 1 hour of lab (workshop, project work, or guest Q&A). Demo Day (Week 10) is an extended session. Plan for roughly nine hours per week including class time, in line with Stanford's three-hours-per-unit norm. Designed primarily for upper-division undergraduates and master's students, with target majors including MS&E, CS, Symbolic Systems, and EE; open to all Stanford students. Enrollment is capped at 12 teams of 4 students (48 students total).

Learning Goals

By the end of the course, students will be able to:

Prerequisites & Onboarding

CS 106A or equivalent required; probability or statistics coursework (e.g., CS 109, EE 178/278, MS&E 120/220, MS&E 125, STATS 116, CME 106, MATH 151) recommended.

Enrolled students without the equivalent background complete onboarding modules covering how LLMs work, git and AI coding tool basics (Cursor, Claude Code, or Antigravity), API setup and key handling, database basics, and deployment and stats. Modules 1–3 are delivered as live walkthroughs on Google Meet in the first weeks, with the content in a shared doc open for comments; Module 0 is a self-paced video. The modules (or equivalent knowledge) should be completed by the Week 3 session. Full module descriptions are in Appendix A.

Instructors

Prof. Madeleine Udell

Assistant Professor, Management Science & Engineering, Stanford University

Stanford website →

Darius Emrani

CEO, Scorecard AI · ex-Waymo simulation and evaluation

LinkedIn →

Pasha Nahass

Product Lead, Google DeepMind, Gemini App

LinkedIn →

Course Schedule

Deliverables are due at noon the day of class.

Individual Phase · Weeks 1–3

Each student runs a compressed product cycle solo.

Week 1: Why AI Products Are Different

Topics

When is AI the right tool, and what is an "AI product"? Reason about the tradeoffs of probabilistic systems, treating today's constraints (non-determinism, latency, cost) as examples of a durable pattern, not a fixed list.

Reading

Week 2: Product Discovery in the Age of AI

Topics

Surface real user needs through interviews and jobs-to-be-done; use AI to synthesize research while judging whether its output is genuine signal or sophisticated noise.

Deliverable

Discovery brief for a product / agent idea with explicit AI-fit assessment.

Reading

Week 3: Evals Fundamentals

Topics

Build a prototype, then learn to tell whether it's any good: choose evaluation dimensions, score outputs, read benchmarks skeptically (Goodhart, gaming), and weigh human against automated judges. In-class lab: interactive case study, followed by a workshop to design evals for students' own prototypes.

Deliverable

Working prototype of the idea from your discovery brief.

Reading

Team Phase · Weeks 4–10

Teams of four form in Week 4, organized around three gates.

Week 4: Improving the Product

Topics

Turn evaluation into an improvement loop: pick the right lever (prompt → retrieval → scaffolding → fine-tune → RL) and apply self-improvement methods including adversarial self-improvement and recursive self-improvement, while avoiding optimizing your measure into meaninglessness.

Deliverable

Gate 1: Form teams and draft project proposal (~3 pages)

Reading

Week 5: Multi-Turn Evaluation and Simulation

Topics

Judge behavior across whole interactions, and build simulated users to test at scale, anchoring on measuring the sim-to-real gap.

Reading

Week 6: User Research Beyond the Metrics

Topics

Where qualitative research complements granular evals (sentiment, the felt experience, diary studies, and AI-generated users), and where they break down.

Reading

Week 7: When AI Products Fail (Case Study)

Topics

Diagnose real failures as systemic rather than single-cause, and identify the eval, guardrail, or research that would have caught each. E.g., Air Canada was held legally liable when its support bot invented a bereavement-refund policy that didn't exist.

Deliverable

Eval feedback for two other teams' projects.

Reading

Week 8: Responsible AI

Topics

Red-team for worst-case and harmful behavior, address agentic safety risks (destructive actions, leaked secrets), and weigh who sets the boundaries on AI use.

Deliverable

Gate 2: Midterm report (~5 pages + working build)

Reading

Week 9: Voice and Multimodal (Case Study)

Topics

Evaluate beyond text, where latency, tone, turn-taking, and cross-modal grounding create new failure modes, with worked-through real product examples.

Reading

Week 10: Demo Day

Topics

Defend an evidence-backed ship-or-don't-ship call with your eval results and a concrete next-iteration plan, before outside judges.

Deliverable

Gate 3: Demo Day (12-min demo; 5–7 page report due 72 hrs after class)

Peer feedback and ratings.

Grading

CategoryComponentWeight
Individual work Discovery brief, working prototype 10%
Team project
  • Project proposal (10%)
  • Midterm report & working build (15%)
  • Final report & Demo Day (35%)
60%
Participation In-class discussion, pop quizzes, and acting as a peer eval rater for two other teams 30%

Team Project Criteria

Project work (proposal, midterm report, and final report) will be graded on:

Project grades are individual, not purely team-based: the final project score is adjusted by a peer evaluation from project partners rating each member's contribution, so students on the same project may receive different final project grades.

Participation Criteria

Each student uses two other teams' products and submits a short structured review (user observations plus a rating against the team's stated success criteria). Attendance is required, with up to 2 absences across the quarter, tracked through pop quizzes at random points in every session, graded on engagement. Students must earn at least 50% of available participation points to pass the course; falling below this threshold results in a failing grade regardless of project performance.

Policies

Deliverables are due at noon the day of class. One 48-hour extension per student, no questions asked; otherwise, each additional late day incurs a 10% penalty per day. Students with accommodations from the Office of Accessible Education (OAE) should share their letters with the teaching team as early in the quarter as possible.

All coursework is subject to the Stanford Honor Code. AI tools are encouraged, but submitted work must reflect the students' own thinking.

Appendix A: Onboarding Modules

Complete these unless you already have the equivalent background. Modules 1–3 are each a live walkthrough on Google Meet in the first week or two, recorded, with questions taken live; the content also lives in a shared Google Doc open for comments. Modules 1 and 2 end in hands-on tasks that chain: the output of each module is the input to the next, so students finish with one small app they built, shipped, and measured. All modules (or equivalent knowledge) should be completed by the Week 3 session.

Module 0: How LLMs Actually Work · ~1–3.5 hrs, self-paced

Watch Karpathy, "Deep Dive into LLMs like ChatGPT" (2025). Students new to LLMs should watch in full; everyone should at minimum watch the chapters on hallucinations and tool use (1:20:32), models need tokens to think (1:46:56), jagged intelligence (2:04:53), and RLHF (2:48:26), which ground the evaluation and failure-mode work in Weeks 3–7. Unlike Modules 1–3, there is no live session; questions go in the shared doc.

Module 1: Development Setup (Git and AI Coding Tools) · ~1.5 hrs

Students watch the provided 20-minute intro-to-git tutorial, then pick one AI coding tool (Cursor, Claude Code, or Antigravity) and skim its quickstart, linked in the module. Task: build something trivial, such as a to-do app or a calculator, from a plain-English prompt, then commit and push it to a new repo. The point is to get a first rep of AI-assisted building in before Week 3's prototype lab, and to be able to collaborate on team code without friction.

Module 2: Shipping a Prototype (APIs, Data, and Hosting) · ~1.5 hrs

Everything needed to get a prototype running, reachable, and handling data responsibly. Students get API access to at least one frontier model (OpenAI, Anthropic, or Google) and follow the provided quickstart to make a first call. The module also covers security basics like API key handling and keeping code separate from customer data. A database quickstart (Supabase or a local SQLite file) shows the basic write-and-read pattern, and students get oriented to deploying on a web host like Vercel. Task: extend your Module 1 app with one feature that calls a model API and stores the result in a database, then deploy it to a live URL with the API key stored as an environment variable.

Module 3: Stats Refresher · ~30 min

A short provided explainer on expected value, variance, and confidence intervals, drawn on when scoring outputs and reading error bars in Week 3. Intended mainly for students who haven't taken the recommended probability or statistics coursework.

Appendix B: Starter Projects

Some example project ideas teams may pick from or adapt. Each is scoped to a 7-week build and teaches a distinct evaluation lesson.

Meeting Notetaker with Structured Outputs

A desktop assistant that runs alongside calls without joining as a bot, captures the user's typed shorthand alongside the audio, and produces action items, decisions, and owner-tagged open questions. Teaches LLM-as-judge calibration against humans: students collect real meetings, hand-label "good action item" examples, then build an LLM judge and measure its agreement with humans before trusting it for scaled evaluation.

First-Pass Content Moderation for a Real Online Community

Partner with one Discord server, subreddit, or open Slack and build the first-pass moderator: flag, route to a human, or auto-action. Students specify the policy in plain English, build the classifier, and ship a moderator UI. Teaches asymmetric error costs: false-positive harms and false-negative harms have very different shapes, and the team must build separate dashboards for each and defend their threshold choice.

Fantasy Sports Draft Copilot with Model Tiering

Sync to a fantasy league. During the live draft, give real-time recommendations with rationale (fast, cheap inference). During the season, give weekly start/sit advice with confidence intervals and post-mortems (slower, deeper analysis). Teaches cost optimization by tiering models (Haiku class for draft turn, Opus class for weekly recap) and forces students to defend the routing decision.