Andrew Ng’s Four Agentic Workflow Patterns, Explained by Matthew Berman

Reflection, tools, planning and collaboration can turn a single model response into an iterative workflow, with reliability and cost tradeoffs.

ANAndrew NgIntervenant · AI Fund
Chaîne
Matthew Berman
Publié
29 mars 2024
Vidéo
23:47
Lecture
5 min
Diapositives
2
Original
anglais
Ouvrir sur YouTube
En faisant défiler, la vidéo se réduit en bas à droite et continue. Les sous-titres suivent votre langue de lecture.
Langue de lectureDisponible en 2 langues
Cet article n’est pas encore disponible en français ; il s’affiche dans l’original en anglais.
RÉSUMÉ

En 30 secondes

Matthew Berman reviews Andrew Ng’s 2024 talk on agentic reasoning and adds his own examples. Ng compares a coding benchmark across prompting and agentic approaches, then discusses reflection, tool use, planning and multi-agent collaboration, including their reliability limitations.

  1. 1From one pass to iterationNg contrasts writing an essay in one pass with outlining, researching, drafting and revising.
  2. 2A benchmark comparisonThe presented HumanEval chart compares zero-shot models with several agentic approaches; its results are specific to those setups.
  3. 3Reflection on codeA model reviews its own code and uses its critique to produce another version; improvement is not guaranteed.
  4. 4Planning and recoveryAn agent can choose tools in sequence and sometimes recover after a failure, though Ng says such systems can be unreliable.
  5. 5Speed and iterationBerman and Ng discuss how faster inference may allow more iterations, alongside the time taken by tools and services.

À retenir

  1. Agentic workflows can iterate through planning, action, review and revision rather than answer only once.
  2. Ng’s HumanEval comparison is specific to the benchmark and approaches shown.
  3. Reflection and tool use were more reliable in Ng’s experience than planning and multi-agent collaboration at the time.
  4. Execution feedback, such as failed tests, can help guide a subsequent revision.
  5. Fast inference can support more iterations, but external tools, time and cost still matter.
TEXTE INTÉGRAL

Lire le texte remanié, chapitre par chapitre

Transcription seule
01

Why iterative workflows matter

Berman introduces Ng’s talk and the contrast between single-pass prompting and iterative work.

Matthew Berman introduces a 2024 talk by Andrew Ng on agentic workflows. Berman is enthusiastic about agents and pauses the talk throughout to explain examples and add his own interpretation. He discloses in the video description that he is an investor in CrewAI.

Berman introduces Ng as a computer scientist, Google Brain co-founder, former Baidu chief scientist and Coursera co-founder. He then plays Ng’s presentation at Sequoia on how iterative workflows can change what a language model accomplishes.

Ng contrasts a single-pass prompt with an agentic workflow using an essay as an example. Instead of typing from beginning to end without revising, a system might outline, research, draft, review and revise. The key difference is iteration across steps.

Berman expands on this with a hypothetical writer, reviewer, spell checker and fact checker passing work among themselves. Different roles and tools can help divide the work, he argues, but his example is an elaboration on Ng’s general point rather than evidence that every role is needed.

02

Benchmark and four design patterns

Ng presents a HumanEval comparison and distinguishes reflection, tool use, planning and multi-agent collaboration.

Ng presents a HumanEval coding benchmark comparison. The slide reports 48% for zero-shot GPT-3.5 and 67% for zero-shot GPT-4, with several agentic approaches using GPT-3.5 scoring higher than the zero-shot GPT-4 result in that comparison.

Berman emphasizes the gap shown on the chart and points to reflection, tool use, planning and multi-agent systems. These figures compare particular benchmark setups, not a general demonstration that GPT-3.5 always matches or exceeds GPT-4 across tasks; workflows can also consume different amounts of time and computation.

HumanEval comparison
DIAPOSITIVE 1 / 2HumanEval comparisonNg’s chart compares zero-shot GPT-3.5 and GPT-4 with agentic approaches on the coding benchmark.

Ng groups agentic patterns into reflection, tool use, planning and multi-agent collaboration. In his experience at the time, reflection and tool use were relatively robust, while planning and multi-agent collaboration could be impressive but were less consistently reliable.

Berman describes reflection as asking a model to examine its own output and propose improvements. For tool use, he gives examples such as web retrieval, financial-data lookups and mathematical libraries: the model can select and call external functions instead of relying only on its initial response.

For planning, Berman describes breaking work into steps before execution. In multi-agent collaboration, different prompted roles or different underlying models can critique and build on one another’s outputs. He is optimistic, but acknowledges that getting agents to behave as intended can require testing and iteration.

03

Reflection and tool use

The examples move from code review and unit-test feedback to external search, code and image tools.

Ng demonstrates reflection with code: ask a model to write a function, feed its code back with a request to check correctness, style and efficiency, then use that critique to generate a second version. The result is not guaranteed to improve, but in his experience it works often enough to try.

Reflection on generated code
DIAPOSITIVE 2 / 2Reflection on generated codeThe slide shows a prompt asking a coder agent to check its own code and suggest improvements.

Berman compares this with his own practice of running model-generated code, finding an error and sending it back for a fix. Ng adds that an agent can run unit tests, inspect failures and revise again, turning feedback into another pass through the workflow.

A variation separates the coder and critic into different roles. They can use the same base model with different prompts: one writes code, the other reviews it. Ng describes this as a broadly useful pattern, rather than a requirement to use multiple distinct models.

Ng’s tool-use examples include web search, code execution, productivity tools and image-related functions. Earlier language models that could not directly interpret images could still invoke external tools for tasks such as object detection or image generation.

Berman emphasizes that existing libraries and APIs can become tools for a model. Their outputs are not necessarily correct or deterministic in every setting, but calling a dedicated tool can give a workflow capabilities beyond text generation.

04

Planning and collaboration

Ng discusses planning, failure recovery, research agents and ChatDev, while noting reliability limits.

Ng describes planning systems that can select a sequence of tools and sometimes recover from a failed step. His example, adapted from HuggingGPT, combines pose extraction, image generation, image-to-text and speech synthesis to carry out a multi-part request.

Ng cautions that these systems were finicky and did not always work reliably in his experience. Berman agrees that failure recovery and repeated attempts can be valuable, and expects improvements in models, tools and frameworks to reduce some of the friction.

Ng says he sometimes uses a research agent to gather information when he does not want to search manually. It can work or fail, but has already become part of his personal workflow. He then turns to collaboration among multiple agents.

He describes ChatDev as an open-source example where prompted roles such as software engineer, designer and tester converse, write code and iterate on a program. He says results can be surprisingly complex, while noting that attempts do not always succeed.

Ng also mentions multi-agent debate, in which agents argue over an answer. Berman adds that different models or models specialized for different roles might provide varied perspectives. Neither claims that role separation guarantees a better result in every task.

05

Time, speed and future work

Ng and Berman discuss waiting for iterative work, inference speed and the potential of agentic workflows.

Ng summarizes the four patterns and predicts that agentic workflows will expand the tasks AI can perform. He notes that users accustomed to immediate chat responses may need to wait minutes or longer for an agent to research, act and revise.

Berman argues that fast inference could shorten the iterative part of such workflows. He cites Groq’s token generation speeds as examples from the period and suggests that web searches or external APIs could become the bottleneck instead. These are illustrative estimates, not timing measurements for all agents.

Ng likewise suggests that fast generation from a somewhat weaker model may sometimes permit more iterations than a slower stronger model. He compares that idea with the benchmark example and frames agentic reasoning as a way to improve some applications before the next model generation arrives.

Ng describes progress toward AGI as a journey and sees agentic workflows as a possible incremental step. Berman reiterates his interest in agent workflows and inference speed. The available automatic transcript skips part of his closing commentary, so the missing passage is not reconstructed here.

Berman closes by noting questions about token costs and his expectation that pricing will evolve as models become more widely available. He thanks viewers and ends the discussion.

Sur la même chaîne

5 diapositives14:45EN
Matthew Berman· 29 oct. 2026Matthew Berman Examines Google’s Gemini 4 Carbon AnnouncementMatthew Berman · Forward FutureMatthew Berman reviews Google’s reported benchmark results, staged rollout and pricing for Gemini 4 Carbon, while noting he has not yet used the model.Foundation ModelsBenchmarksAI cost & performance+2
7 diapositives21:11EN
Matthew Berman· 28 oct. 2026Matthew Berman tests DeepSeek V4.1 Flash: coding, vision and local appsMatthew Berman · Forward FutureA hands-on tour of visual coding, image reasoning, local applications and provider economics reveals both impressive results and visible flaws.Agents de codeMultimodal AILocal inference+2
12 diapositives34:21EN
Matthew Berman· 27 oct. 2026Matthew Berman Examines Anthropic’s IPO Filing, AI Growth and GovernanceMatthew Berman, Sam Altman · Forward FutureThe presenter reviews the S-1’s financial metrics, compute strategy and voting structure while questioning the tension between rapid AI development and safety.AnthropicAI SafetyIA en entreprise+2
0:26EN
Matthew Berman· 25 oct. 2026Sam Altman on Human Values and Problem-Solving in an AI WorldSam Altman · OpenAIIn a short interview excerpt, Altman considers the enjoyment of solving hard problems and the human role in interpreting results.Human-AI CollaborationFuture of WorkAI Strategy
2 diapositives0:36EN
Matthew Berman· 25 oct. 2026Kimi K3.1 and a Rubik’s Cube Solver DemonstrationMatthew Berman · Forward FutureMatthew Berman shows a scrambled virtual cube being solved and gives the Kimi K3.1 test a favorable assessment.ÉvaluationsAgents de codeOpen-weight models
2 diapositives0:21EN
Matthew Berman· 24 oct. 2026An AI-Generated Kimi Benchmark Chart Used Invented ScoresMatthew Berman · Forward FutureMatthew Berman asks for a graph of Kimi K3.1 Pro benchmarks, then discovers that the displayed figures are illustrative placeholders.BenchmarksÉvaluationsGenerative media