Agentic AI (Full Course Recording)
Watch on YouTubeAndrew Ng teaches how to build agentic AI workflows, where an LLM-based app executes multiple steps to complete a task, and argues that the key differentiator between effective and less effective builders is a disciplined process of evals and error analysis. He covers task decomposition, four design patterns (reflection, tool use, planning, multi-agent collaboration), how to build and iterate evals, how to use traces to find which component to improve, and how to optimize cost and latency later.
- He frames 'agentic' as an adjective so systems can be agentic to different degrees, from deterministic sequences to highly autonomous agents that plan their own steps. - He argues that wrapping an older model like GPT-3.5 in an agentic workflow can produce a bigger improvement than upgrading to the next model generation. - He teaches decomposing tasks by asking whether each step can be done by an LLM or a tool, and if not, how a human would do it and whether it can be broken down further. - He recommends building a quick and dirty system first, reading outputs, then adding small evals (10-20 examples) and iterating on both the system and the evals. - He teaches error analysis: read traces, focus on failed examples, count in a spreadsheet which component performs worse than a human expert, and prioritize accordingly. - He advises focusing on output quality first and optimizing cost and latency later by timing and costing each step.
Based on Andrew Ng's public content. Not affiliated with or endorsed by Andrew Ng.
Supports these rules
Use evaluations and targeted error analysis
ConfirmedTurn vague ideas into testable prototypes
Quotes from this video
“one of the biggest predictors for whether someone is able to do it really well versus be less efficient at it is whether or not they're able to drive a really disciplined evaluation process.”
“the best practice is really to build it first and then examine it to figure out where it is not yet satisfactory”
“is often better to just build a quick system in a safe reasonable way that doesn't leak data.”
“rather than going by gut to decide which of these many components to work on, I think it's much better to carry out an error analysis to better understand each step in the workflow.”
“quick and dirty evals is fine to get started.”
“just as you iterate on an agentic workflow and make it better over time, you should plan to iterate on your evals as well.”
“I'll often advise teams to focus on getting high quality outputs and to optimize cost and latency only later.”
“I tend not to fine-tune a model until I've really exhausted the other options because fine-tuning tends to be quite complex.”