Pinned Tweet
Exciting news! For the first time since Code in Place, I am launching a new online course. It is called Probability for AI and it was made for you and your loved ones: pai.stanford.edu
Probability for AI is a course that teaches you the math language that AI speaks. The class has no prerequisites. By the end of 6 weeks you will have a deep understanding of how neural networks work and you will have built a portfolio of sharable apps (made using our free Code Agent tools).
The secret sauce is a massive community of teachers. I have a hypothesis that as a society we drastically underestimate how many folks would love to spend 10 hours a year teaching others. Teaching is community service and teaching is a way to deeply understand a subject. The students get the highest quality free course possible, but I think its the teachers who get the best experience.
Applications are due at the end of September. Come join! And please reshare this post with your friends.
Apply as a student and build an AI Word Detective with a Coding Agent: pai.stanford.edu/apply/pai1/…
Apply as a teacher and practice teaching our teachable agents: pai.stanford.edu/apply/pai1/…
Even if you don't end up joining the class you might enjoy the application process! Thanks to everyone who made this possible. I am truly appreciative that Stanford supports me teaching classes for the world. See you in class. Please repost and spread the word. The more the merrier.
Chris Piech retweeted
技术降低了创造的门槛,而我们的专业积累,决定了能提出什么样的问题。
@StanfordCodeIP Probability for AI 第一周打卡完成!📚
第一周从概率公理、独立性、条件概率,一路推到全概率公式和贝叶斯定理。@chrispiech 把节奏放得比较基础:先建立共同的数学语言,再逐步深入 AI 的训练、推理与评估。
但这门课最打动我的,不只是数学本身,而是它正在探索的一种 AI 教育新范式。
分享三个这周最大的体会:
1. 当 Coding Agent 降低技术门槛,Domain Knowledge 的价值开始凸显
Chris 发起这门课的初衷,是希望理解 AI 不再是少数拥有高等数学和 CS 背景的人的特权。同学中不仅有程序员,还有歌剧演员、曾在乞力马扎罗山参与救援的医生,以及开发野火检测 App 的 13 岁少年。
这让我想到,AI 教育的意义,或许不只是培养更多懂技术的人,而是让深耕不同领域的人,拥有把专业经验和直觉转化为产品的能力。歌剧演员对声音的敏感、医生在复杂环境下积累的判断力,或者在我自己的领域里,将法律与监管的不确定性转化为 AI 和金融系统中的可执行约束。这些来自不同领域的知识、经验和问题意识,都可能成为 AI 应用创新的起点。
当「做出来」变得越来越容易,「知道什么值得做」反而更加珍贵。
2. 双向学习:用概率理解 LM,再借助 AI 建立概率直觉
这周我通过 Coding Agent 完成了三个小项目:Word Detective、Inference Time Calculator 和 Medical Test Detective。
比如学习全概率公式和贝叶斯定理时,课堂设计了一个 Gemini 与人类文本检测器:先计算不同来源的文本被标记的总体概率,再根据检测结果,反向推断被标记的文本来自 Gemini 的条件概率。随后,我又在 Medical Test Detective 中应用同样的贝叶斯逻辑,尝试调整疾病的基础患病率、检测灵敏度和假阳性率,观察这些参数如何改变阳性结果所代表的含义。原本抽象的先验概率、条件概率和贝叶斯更新,借助 Coding Agent 变成了可以交互、验证和反复实验的小应用。
我很喜欢这种双向学习方式:一边用概率理解语言模型的工作原理,一边借助 AI 的实际应用,反过来建立对数学概念的直觉,这样不再只是记住一个公式,而是真正理解为什么基础概率会改变我们对证据的判断。
3. “We're all teachers and learners.”
这门课还有 500 多名志愿 Section Leaders,来自世界各地,带领不同背景的同学进行小组讨论。Chris 提出了一个我很喜欢的理念:我们既是学习者,也是老师。
学生不再只是被动接收知识,也可以帮助其他同学理解问题,分享来自不同专业的经验;老师同样可以从学生的跨领域视角中获得新的启发。
我觉得 AI 时代的教育变化,不只是引入更多智能工具,也可能是传统师生关系的重新组织。真人教学负责启发、讨论与协作,Coding Agent 则让每个人都能按照自己的节奏动手创造、验证想法。AI 在这里并没有取代教育中人与人的连接,反而让一个跨越年龄、专业和地域的学习社区,有机会创造更多东西。
未来参与 AI 创造,或许不必先花几年成为全职程序员。我们可以带着已有的行业积累、经验与好奇心进入 AI,在学习中创造,也在创造中学习。
Week 1 done. Five more weeks to go! 🚀
#Stanford #ProbabilityForAI #CodingAgents #AI
Chris Piech retweeted
Got into @StanfordCodeIP Probability for AI.
I'm learning ML and building projects, and the more I do, the more math matters.
Probability teaches you not just what a model predicts, but how much to trust it.
Thanks, @chrispiech and Mehran Sahami.
Chris Piech retweeted
Excited to be joining Probability for AI, a free online course taught by @chrispiech and Mehran Sahami at @Stanford
As a medical student passionate about data and #AI, I’m looking forward to exploring how probability can help change in medical decisions.
Chris Piech retweeted
Stanford AI Lab is alive and well at COLM! Check out these SAIL projects this week in SF. 🎉
ai.stanford.edu/blog/colm-20…
Chris Piech retweeted
Lecture 1 of Stanford CS 329H, Machine Learning from Human Preferences.
We opened with a quick anonymous poll. A curious 10-year-old asks why the sky is blue: 91% of the room picked the vivid answer over the scientific one. Someone asks for the time complexity of quicksort: 88% picked the answer with caveats over the simple one.
What counts as a better answer depends on who is asking. A reward model trained on pooled comparisons without that context has to average over it, and every thumbs-up and arena vote it learns from carries the same problem.
The tools for handling this come from six fields that rarely cite each other: psychometrics, discrete choice, machine learning, decision theory, behavioral economics, and social choice. The course and our textbook put them in one place.
If you train on human feedback, you'll learn which assumptions your preference model makes and when they break. If you ship one model to millions of people, you'll be able to say whose preferences the default encodes.
The book is free online: mlhp.stanford.edu
Schedule and speakers: cs329h.stanford.edu
Stanford students: adds close Friday, Oct 9.
I stand by this quote! “I think the upper bound of the number of people who would spend 10 hours [a year] teaching could be close to a billion people,” Piech said. “It’s just a human thing to want to pass on knowledge, and maybe we’ve put too many barriers to prevent people from spending their 10 hours.”
Thanks @StanfordDaily
stanforddaily.com/2026/09/28…
Chris Piech retweeted
Replying to @chrispiech
@chrispiech completed the PAI application. I have never seen a more joyous person teaching probability. Thank you very much for making the application interesting.
This one cool prompting trick will get you conditional probabilities :-).
For an education research project, @juliettewoodrow and I needed a principled way to get p(x|y), where x was student work and y was a summary of the student. Pretty classic problem.
We ended up writing a paper about it! Coming out at COLM. The key idea: use contrastive estimation theory to derive a better way to prompt LLMs for probabilities.
stanford.edu/~cpiech/bio/pap…
Probability for AI. Free class for the world from Stanford. Applications to teach + learn due this Saturday (Sept 27th). pai.stanford.edu
Chris Piech retweeted
not sure mathematicians understand what AI means for them in practice so here's a list of consequences extrapolated from the software world:
- each mathematician will become more productive, side projects that could've taken days/weeks might now take hours
- building new theories will become easier, mathematicians can design the building blocks and use AI to prove the interesting properties
- math production will be democratized, indeed vibe math is already a thing
- theorem proving will become less relevant, deciding what to prove and diagnosing proof failures will become more important
- understanding a proof will become more important than the proof itself and will consume most of the time
- mathematicians will have more time to socialize their ideas as AI works in the background
- deep knowledge of a domain might become harder to obtain as most opt to be generalists letting AI take care of the details
Chris Piech retweeted
BTW freeCodeCamp has a PLATINUM transparency rating from Candid, which ranks charities by transparency.
freeCodeCamp is a simple charity with a simple mission: create FREE learning resources for EVERYONE.
Y'all can donate knowing we'll do just that. 🏕️donate.freecodecamp.org
Chris Piech retweeted
Two new Stanford courses are free this fall — and applications close at the end of the month.
Probability for AI and Code in Place X are six-week programs designed for anyone who wants to understand how AI works, not just how to use it. No prerequisites, no experience needed:
pai.stanford.edu | codeinplace.stanford.edu
Chris Piech retweeted
imitation is the sincerest flattery… humans& wishes to flatter you, humans. (i’m very proud of the team for this awesome initial release. more exciting things to come!)
This is my daughter on a yak. If you thought "hey that's kinda random" you sound ready for a probability class! New class on Probability for AI from Stanford. Taking applications for students and teachers: pai.stanford.edu
It was a pleasure working with you @allenainie. Congrats on the award!
I just found out our paper won an outstanding paper award at #RLC2026. This is my last PhD work with my incredible advisors @EmmaBrunskill @chrispiech
Huge thanks to the @RL_Conference for giving this work a recognition 🥳🥳 rl-conference.cc/RLC2026Awar…
📝 arxiv.org/abs/2608.14851





















