In 30 seconds
Teams can prototype agents quickly, but Andrew Ng says reaching production reliability requires disciplined error analysis and evaluation. He argues that AI improves more readily on tasks with automatically checked answers than on decisions requiring judgment, raising questions about how people learn those skills. In conversation with Stanford professor Diyi Yang, Ng describes relying on tests and sandboxing rather than routinely reading generated code; Yang argues for rigorous review until stronger guarantees exist. Both stress understanding the systems being built, even as agents produce more code.
- 1Quick prototypes need to give way to measured error analysisNg says prompt changes can yield early gains but often plateau without curated examples and regression tests.
- 2AI can be easier to train on verifiable answers than on judgmentNg contrasts automatically graded code or math with decisions such as product priorities and hiring. He believes the performance gap is often underestimated.
- 3A chatbot that completes work may not help its user learnNg argues cognitive offloading can reduce retention and cites a study reporting lower test scores in one educational setting.
- 4Ng and Yang disagree on how much generated code to reviewNg describes testing, guardrails and sandboxing; Yang worries about unexpected failures and wants rigorous review until stronger guarantees are available.
- 5Understanding architecture still matters when an agent writes codeNg says people who know the available tradeoffs can provide context and check choices that an agent might otherwise make arbitrarily.
- 6Ng expects implementation gaps to outlast basic AI knowledge gapsHe argues that adapting banks, factories and teams requires practical domain knowledge and coordination, not only individual training.
- 7Ng built a typing game around his daughter’s interest in catsHe says the game motivated practice and describes a hope for individualized AI learning experiences designed around mastery.
Takeaways
- Move from rapid, safely bounded prototypes to reference cases, error analysis and regression tests as an agent project matures.
- Inspect actual failures before investing in a particular tool or component; the bottleneck may differ from the expected one.
- Distinguish automatically verifiable tasks from decisions that require domain judgment and have several plausible answers.
- Use engineering fundamentals to specify and check architecture, security and tradeoffs when agents write code.
- Ng recommends human review when code is manageable and the stakes are high; Yang argues for a more rigorous near-term review process.
- Design learning experiences to develop understanding rather than merely getting a chatbot to complete an assignment.
Read the edited text by chapter
Start with experiments, then make evaluation rigorous
Ng says strong agent teams progress from fast prototypes to systematic error analysis and regression tests. The process should change with the maturity of the project.
Diyi Yang asks what has changed Andrew Ng’s view of agents in recent months. Ng says his outlook has not shifted dramatically: the clearest difference he sees between strong and weaker teams is still disciplined error analysis and evaluation-driven development.
Experienced AI practitioners often give surprisingly similar advice about which experiment a team should try next, Ng says. Their agreement is imperfect, but it reassures him that engineering AI systems is not a random search through every possible change.
Ng says the right process also changes with the project’s maturity. Early on, he favors quick prototypes: build something, inspect its behavior and change it. Later, teams need carefully curated reference cases, rigorous evaluations and regression testing.
Quick iteration can take a system from zero to roughly 80% accuracy, in Ng’s illustration. But repeatedly changing prompts or tools without disciplined measurement can produce alternating improvements and regressions. A more rigorous process helps a team make smaller gains toward the level a deployment requires.
The opposite mistake is knowing only a heavyweight process. Ng describes building several design prototypes over a weekend and discussing them with his team. Strong builders need both speeds and must learn when to move gradually from exploration to stricter testing.
Find failures before choosing what to optimize
Agent behavior can be difficult to predict. Ng recommends testing simple, safely bounded prototypes and comparing failures with how people perform the task.
Yang asks where agents struggle and where students should invest their engineering effort. Ng says AI systems add uncertainty beyond ordinary software: their behavior depends on training data and learning processes that developers may not fully understand in advance.
Because it is difficult to know which component will fail, Ng suggests building a simple agent and observing it. A coding agent might struggle with memory, instructions, tools, user intent or cost. Spending months on tools before testing could target the wrong bottleneck.
He favors quick experiments with appropriate sandboxing and monitoring. In one recent project, an API enforced a much lower rate limit than its published threshold, forcing him to find another tool. Trying the workflow exposed a constraint he says he could not have inferred reliably from the documentation.
Yang observes that agent building can feel scattered compared with the more predictable directions and formal objectives of machine-learning theory. She asks how to navigate the design space and whether clearer feedback could support recursive self-improvement.
Ng agrees that agent behavior can be harder to anticipate, but challenges the idea that practical machine learning was always elegant. In his experience it involved running experiments, inspecting errors, cleaning dirty data and deciding whether more data justified its cost.
He says automating a task people already know how to do is usually easier to debug. For an invoice-processing workflow, a team can compare each failed step with what a person would have done. For an unsolved mathematical problem, that reference may be missing.
Ng says businesses sometimes automate work to cut costs, but he finds it more interesting when automation lets them do a task much faster or perform far more of it. Human familiarity with the task can make the error analysis more systematic.
Why judgment remains difficult for AI
Automatically verifiable tasks are easier to train and benchmark than decisions with several plausible answers. Ng thinks observers often overgeneralize from progress on the former.
Yang asks what advantages people retain and how students should think about careers amid anxiety over automation. Ng acknowledges that many graduates face a difficult job market, while arguing that AI remains much stronger at some tasks than others.
He calls intelligence jagged. Tasks with verifiable answers, such as some coding or mathematics problems, allow large numbers of attempts to be graded automatically. That makes them more amenable to training methods such as reinforcement learning than tasks whose quality requires judgment.
Judgment tasks can have several good and bad answers without one mathematical solution: choosing a system architecture, prioritizing features, selecting a market or deciding when to hire. Ng thinks the gap between AI’s performance on such decisions and on readily verified tasks is larger than many people appreciate.
He says it is possible to improve models on judgment-heavy work, but doing so can require expensive expert labels, specialized data and carefully designed training. Reward functions may be imperfect or invite shortcuts, making progress slower and more difficult.
Benchmarks themselves tend to favor tasks that are easy to grade. Ng recalls how observers generalized from victories in chess, Go and Jeopardy to broader intelligence. He thinks people can similarly overestimate progress on judgment because progress on verifiable tasks is more visible.
Learning needs more than completed homework
Yang asks how learners acquire judgment when AI can do assignments. Ng argues that tools designed for completing work can encourage cognitive offloading rather than mastery.
Yang asks how people acquire judgment if agents can complete assignments for them. She describes learning as a process of practice and experience, and asks how education can provide productive friction rather than let skills atrophy.
Ng argues that ordinary AI chatbots are poorly designed for learning because they are optimized to help users get work done. He says having a chatbot do the thinking can reduce what a learner retains, and cites a University of Pennsylvania study reporting lower test scores in one setting.
He worries that the effects of relying on a chatbot could accumulate through education and adult work, while presenting that broader effect as his concern. In his view, STEM education has often emphasized obtaining a correct answer, even as AI becomes better at many readily checked answers.
Ng says learning from a chatbot is possible in principle, just as someone could find useful mathematics videos on social media. His concern is that the way most people use tools designed for completing work does not necessarily develop their own understanding.
He describes Learn Vector as an effort to build more personalized, one-to-one learning experiences designed around mastery rather than completion. Yang agrees that systems could be designed to help people learn, understand AI output and oversee it, rather than only generate more work.
The disagreement over reviewing generated code
Ng relies heavily on tests and sandboxing, while Yang argues for rigorous review in the near term. Both discuss unexpected failures and the limits of trust.
Yang asks whether engineers should still write code and review it. Ng says he has mostly stopped writing by hand and has also stopped reviewing much generated code by eye because the volume would make him a bottleneck.
Asked how he can trust the result, Ng points to rigorous tests, guardrails and sandboxing. In one coding-agent experiment, he restricted tools to a particular working directory. He says that deterministic boundary gave him more confidence than relying solely on the model not to behave strangely.
Ng compares this with managing human engineers: teams have shipped buggy code despite their best efforts, then used tests, deployment processes and remediation to contain or fix failures. That experience makes him more comfortable with coding agents, although it does not make generated code infallible.
Yang disagrees about the near term. She says a human colleague’s habits and risks can be easier to anticipate, whereas agent failures can be surprising. She gives an example of a registration system exposing a comparison involving users’ passwords and argues for rigorous review until stronger guarantees exist.
Ng acknowledges that his teams have suffered failures involving coding agents, including permanently deleted data and a security issue caused by a test backdoor left in production. He also notes that humans have made production mistakes, and says he is unsure whether his own review is always better than an agent’s.
Understand the system even when an agent writes it
Ng says engineering fundamentals reveal tradeoffs that may otherwise be omitted from prompts. Human review can still make sense for small, high-stakes systems.
He adds an important qualification: ‘vibe coding’ without understanding can produce security problems and poor architecture. Engineers who understand databases, networks and machine learning can identify tradeoffs and supply context that the model might otherwise lack.
If a developer does not know that different database types exist, the prompt may omit information needed for a sensible choice. Ng says understanding fundamentals helps people check architecture, decomposition and abstractions even when they do not write every line themselves.
Repeated experience with agent failures also helps calibrate trust, in his view. He has seen some problems caught before deployment and has learned that an automated security review can be useful without being completely trustworthy.
For high-stakes, manageable amounts of code, Ng says a human should review it; he gives spaceflight software as an example. His concern is that reviewing very large volumes of generated code by eye can become a severe bottleneck.
Yang asks whether making agents produce shorter, clearer code should be an optimization objective, noting that agent patches can be much longer than human ones. Ng largely agrees: concise code could be easier for both people and other agents to review, and Yang adds that it could save tokens.
Research resources and open models
Ng is concerned about research funding but optimistic about academic work and open-weight models. He sees restrictive regulation as a risk to the latter.
Ng says some AI providers have incentives that may lead to higher token consumption, and that some coding harnesses use more than he thinks necessary. Yang then asks how academic researchers can compete with frontier labs when long-running, multi-agent experiments require substantial resources.
Ng says he has seen professors elsewhere ask students to spend their own money on GPUs because departments lacked funding. He is concerned about the resources available to academic research and the pressure this places on students.
He nevertheless remains optimistic about academic contributions: researchers continue to publish valuable work with fewer resources than frontier labs. At the same time, he worries that sustained cuts to research funding could damage institutions in ways that are hard to reverse.
An audience member asks whether open-source and open-weight models can survive against well-funded labs. Ng says he expects them to survive and identifies restrictive regulation as a major risk. He argues that both proprietary and open models can serve a wide spectrum of tasks.
The harder gap is applying AI inside organizations
Ng expects technical knowledge to spread, but says industry-specific implementation and team coordination take longer. Yang is more optimistic about AI-assisted learning.
Asked about the workforce’s AI knowledge gap, Ng says technical know-how often spreads rapidly after new tools become available. He thinks some claims about a lasting secret advantage are exaggerated, while acknowledging that differences in prompting and use remain.
The more durable gap, he argues, is practical implementation: improving a bank, healthcare organization or factory requires knowledge of the work and the organization. He expects making teams AI-native to take years, because training individuals is not the same as changing how a team collaborates.
Yang is more optimistic that a motivated learner can use AI to reach a high level of expertise. She points to explanations, visualizations and examples tailored to a learner, and argues that workers’ accumulated domain judgment can be a foundation for reskilling.
Ng agrees that AI makes learning easier but questions whether motivation alone is enough. He notes that motivated people could already learn from books and the internet, and thinks more support may be needed even as new tools enable projects that were previously difficult.
Build judgment and domain-specific skills
Ng cautions against giving up work out of fear of replacement. He advises scientists to combine general AI skills with practices specific to their discipline.
A student asks whether humans providing judgment will accelerate their own replacement, and asks for advice to early-career scientists outside computer science. Ng says he worries that fear of replacement may cause people to give up even where current AI cannot do their work well.
He recounts a student discouraged from writing because she thought ChatGPT would always write better. Ng encourages using AI while developing judgment and contextual understanding, which he sees as continuing weaknesses in generated work.
For scientists, Ng recommends complementing general AI skills with discipline-specific practices. Prompting and coding tools matter, he says, but using AI well in physics, chemistry, law or marketing also depends on the particular work and the practitioner’s judgment.
Human context, code and learning
Ng expects less hand-written code, while Yang raises concerns about shared knowledge communities. They end with a discussion of children’s education.
Another student worries about AI generating code while also mediating the knowledge people use to evaluate it. Ng expects much less code to be written or reviewed by hand over time, and says correctness tests and user feedback can provide signals beyond models simply training on their own outputs.
He compares generated code to compiler output: a specialist might improve a particular result, yet compilers can optimize many operations better than an individual. He expects AI-written code to become more acceptable, while arguing that computer-science fundamentals still help people steer tradeoffs.
Ng says people often have context from prior conversations or product experience that is absent from a prompt. Yang adds a different concern: communities such as Wikipedia and Stack Overflow do more than answer questions; people collaborate there to verify and maintain shared knowledge.
Ng warns that AI-generated work can look convincing to someone unfamiliar with a topic while appearing unclear or wrong to an expert. He encourages people to use AI but take responsibility for the clarity of their thinking and the quality of what they submit.
A parent asks about children’s learning and Ng’s education work. Ng says his young children’s AI use is limited. To encourage his daughter to type, he built a game, Typemoles, with cat costumes as rewards; she practiced enough to complete its levels.
He hopes typing will help create a path toward responsible AI use. Ng expects children to grow up with AI, but argues that current chatbots are poorly suited to learning. He says Learn Vector is working on individualized experiences that stay with a learner until they master a concept.
More from this channel
1:08:53EN
1:18:42EN
1:21:11EN
1:14:57EN
30:50EN
1:17:43EN