Andrew Ng: AI Agent Workflows Could Drive Massive AI Progress This Year, Possibly Mattering More Than Building Bigger Models

April 15, 2024

〈Tech Insights〉


Renowned AI pioneer and Stanford professor Andrew Ng recently published a series of articles predicting that AI agent workflows could be the main driver of massive AI progress this year, possibly mattering more than building the next large language model (LLM).

That’s exactly what MixerBox AI is working toward: making today’s large language models more useful through development that better fits what users need. So we took a deep dive into these articles and translated one of them, in the hope that more people will get to know the trends in AI agent development and seize the opportunities of the AI era!

[Key Takeaways]

  • AI agent workflows could drive massive AI progress this year, possibly mattering more than building bigger models.
  • Until now, we’ve mostly used large language models in an all-at-once zero-shot mode, expecting a final output from a single prompt. That’s far removed from how humans actually work.
  • Agent workflows let large language models revise a document over and over, through steps like outlining, researching online, drafting and revising, producing better results.
  • With OpenAI’s ChatGPT alone, even GPT-3.5 wrapped in an agent loop can far outperform GPT-4 in zero-shot mode in accuracy.
  • Design patterns for building agents: reflection, tool use, planning and multi-agent collaboration.

[Full Translation]

Dear friends,

I think AI agent workflows will drive massive AI progress this year, perhaps even more than the next generation of foundation models. This is an important trend, and I urge everyone who works in AI to pay attention to it.

Today, we mostly use large language models in zero-shot mode: we give a one-off prompt and ask the model to generate the final answer token by token, without revising its work at all. It’s like asking someone to write an entire essay in one go, typing from start to finish without ever hitting backspace, and expecting a high-quality result. Despite how hard that is, large language models do amazingly well at this task!

With an agent workflow, however, we can ask a large language model to revise a document many times over. For example, it might go through a series of steps like these:

  • Plan an outline
  • Decide whether it needs to do a web search to gather more information
  • Write a first draft
  • Review the first draft and spot any unsupported claims or unnecessary information
  • Revise the draft based on the weaknesses it found
  • And so on

This iterative process is key for most writers to produce good text. For AI, using this kind of iterative workflow produces far better results than writing in a single pass.

Devin’s recent demo caused quite a stir on social media. My team has been closely following how AI coding technology is evolving. We analyzed results from a number of research teams, focusing on how algorithms perform on the widely used HumanEval coding benchmark. You can see our findings in the chart below.

GPT-3.5 (zero-shot) was 48.1% correct. GPT-4 (zero-shot) did better, at 67.0%. However, the improvement from GPT-3.5 to GPT-4 is dwarfed by the gains from adopting an iterative agent workflow. In fact, wrapped in an agent loop, GPT-3.5 reaches up to 95.1% accuracy.

Open-source agent tools and the academic literature on agents are growing rapidly, which makes this an extremely exciting time, but also a somewhat confusing one. To help you make sense of this work, I’d like to share a framework for categorizing design patterns for building agents. My team at AI Fund has used these patterns successfully in many applications, and I hope you’ll find them useful too.

  • Reflection: The large language model examines its own work and comes up with ways to improve it.
  • Tool use: The large language model is given web search, code execution or any other capability to help it gather information, take actions or process data.
  • Planning: The large language model comes up with and carries out a multi-step plan to reach a goal (for example, outlining an essay, doing online research, writing a draft, and so on).
  • Multi-agent collaboration: Multiple AI agents work together, splitting up tasks and discussing and debating ideas, to come up with better solutions than a single agent would.

Next week, I’ll explain these design patterns in more detail and offer suggested reading for each.

Keep learning!

Andrew

PS: To learn how to build a large language model inference system optimized from the ground up, join our new short course “Efficiently Serving LLMs,” taught by Predibase CTO Travis Addair.

  • Learn techniques such as KV caching, continuous batching and quantization to speed up computation and optimize memory use.
  • Benchmark large language model optimizations and explore the trade-offs between latency and serving many users at once.
  • Use low-rank adaptation (LoRA) to efficiently serve hundreds of custom fine-tuned models on a single device.

Original source: https://www.deeplearning.ai/the-batch/issue-241/

👉👉 More from the [Tech Insights] series:

YC Founder Paul Graham: The Keys to Winning Come from Your Users

5 Big Opportunities in the AI Era: Are You Seizing Them?

MixerBox AI Chatbot: Free Download of the Latest 2024 Version and a Quick-Start Guide

Try the latest MixerBox AI for free

BlogTech Trends

← MixerBox Blog