← All AI Engineer talks

AI Engineer World's Fair 2025

Real AI Agents Need Planning, Not Just Prompting

About this talk

Yuval Belfer of AI21 Labs argues that complex instruction following requires agents that plan and adapt rather than rely solely on larger prompts. He contrasts routing, tool use, MCP, and ReAct with dynamic planning and replanning, then describes AI21 Maestro's planner and execution engine, including Best-of-N generation and decisions informed by expected cost, latency, and success probability. He reports improvements on IFEval and an internal requirement-satisfaction dataset while recommending the simplest architecture that solves the task.

Chapters

  1. 0:00Instruction following beyond prompt engineering
  2. 1:27Agent architectures: routing, tools, MCP, and ReAct
  3. 3:12Dynamic planning and replanning
  4. 4:34AI21 Maestro, Best-of-N, and execution tradeoffs
  5. 6:41Benchmark results and practical architecture selection

Talk transcript

  1. 0:00

    The year is 2022. OpenAI just released InstructGPT, which is the first model who can take instructions and actually follow them, really do what you want it to do. They have even called their model InstructGPT.

  2. 0:16

    So how come three and a half years later, in 2025, when they release GPT-4.1, they still have trouble to follow instruction? And it's not just them, right? Every language model has some problems with following instructions.

  3. 0:34

    And why is that? So if you remember the good old days of InstructGPT, this was one of the examples that blew everybody's mind, right? Explain the moon landing to a [REDACTED:age].

  4. 0:45

    We got something nice, and everybody went bananas. And then with time, more and more developers started to use language models, and now the instruction looks more something like this,

  5. 0:58

    or this, or this. Right? And that's what everybody's doing, just taking all the information, all the context, all the constraints, all the requirements, and just put everything in one prompt and hope for the better.

  6. 1:13

    And really, even for simple tasks such as instruction following, LLMs alone are no longer enough, and this is where AI agents come to play. And agents don't just use prompting, they need planning.

  7. 1:27

    I'm Yuval. I work at AI21 Labs, where we developed our own language models and also an agentic framework, and I want to talk to you about planning. So let's maybe start first with what is an agent.

  8. 1:40

    There's a philosophical debate, everybody's wondering, and the truth is, as an engineer myself, I don't care. Whatever works, just make it work, call it an agent, call it a workflow, call it whatever.

  9. 1:54

    Some people call LLM as a router an agent, where we have some sort of a routing model that just takes any query and directs it into a specialized LLM.

  10. 2:05

    Is, is this an AI agent? Who cares? We also have function calling, right, where essentially we're providing the LLM a list of external tools that it can use and let it interact with other APIs, with the world, Google Search, uh, where this is something that now a lot of people talk about MCP, where it standardize this and

  11. 2:27

    everything MCP related is an agent. Again, doesn't matter, as long as it works, and there's a lot of information about MCP right now, so we will not get into it.

  12. 2:36

    And maybe the most popular agent, uh, of it all is ReAct, Reasoning and Action, where this is a framework that can be done with any language model in the framework of thought, then act upon that thought, and observe, and so on, and so on.

  13. 2:52

    Every time the model wants to do some sort of a step towards, uh, the solution, but this is something that happens each step at a time, and there is no look ahead to the entire plan.

  14. 3:04

    Right? This is kind of like part of a plan. I know the situation right now, I know what the next step I want to go to, and so on, and so on.

  15. 3:12

    And what is planning that, that we're talking about, that every AI agent essentially needs to do? So it's figuring out the steps that you have to take to reach your goal.

  16. 3:24

    And when do you want to use it is when there is no straightforward problems, essentially complex tasks, and that it requires parallelization and explainability, right? Rather than ReAct, where you can't really understand what happened, you can just see all the thoughts that happened throughout, but you don't really know why.

  17. 3:43

    You can talk about forms-based, uh, planners, such as text bl- based, as Agentic 1 by Microsoft, or code-based planners by Small Agents, uh, from Hugging Face.

  18. 3:56

    What do you mean when I say dynamic planning, is that there is an option to do replan. And essentially, it's not just have one plan and go all the way in this plan.

  19. 4:06

    In the middle, you can ask yourself, "Mm, is this plan good, or should I do replanning and go somewhere else?" And when we talk about efficiency, we want to put smart execution into that.

  20. 4:18

    Essentially, every planner need an execution engine because an execution engine can analyze dependencies between steps, which enables paral- parallel execution, and can also have some sort of a trade-off between speed and cost.

  21. 4:34

    For instance, you can use branch prediction for s- uh, faster systems. Let's take a look of a simplified version of AI21 Maestro, which is a system that uses both a planner and smart execution engine.

  22. 4:49

    So you can see here the very simple case of instruction following. Really, we have a prompt, which is essentially some context and the task, and the requirements are all those, uh, shouldn't be more than 10 paragraphs, the tone should be formal, all mentions of our brand should be positive, and so on, and so on.

  23. 5:08

    The thing that you usually just shove in the prompt, now they are separated, so it will be easier to validate. And you can see that in every step here, we have some sort of a, an execution tree or execution graph, if you will, where in every step the, uh, planner and the execution engine chooses several candidates and

  24. 5:27

    only continue to fix and improve those who seem promising. And really, there are several techniques here that you can use for any system, such as using Best-of-N, where essentially instead of one generation, we sample from any LLM with high temperature, several generations, or maybe use different LLMs.

  25. 5:49

    We also ditch the candidates that do not seem like they will be good and only pursue the best candidate or candidates based on predefined budget. And also, we have some sort of validation, so iterations, and keep fixing, and so on, and so on.

  26. 6:05

    Here is how it looks in something where it may be a bit more complicated, where again we have the input, the original, uh, input of the system, and then we have those, uh, tracks where the execution engine can say what is the expected cost, the expected latency, latency, and success probability, and the planner will choose accordingly the

  27. 6:27

    right path to go. Where at the end, we will have some sort of a reduce, where we will have a lot of, uh, results, and we want to take the best one or combine all of them for a complete answer to the query that we had in, in the beginning.

  28. 6:41

    And you can see that it actually works. Right? You can actually see that for IFEval, for instance, uh, we get really high results for GPT-0, 4o, or Claude Sonnet 3.5, or o3-mini.

  29. 6:54

    We're getting very, very high results by just improving them and using our planner and smart execution engine. Also, for requirement satisfaction, which is a data set that we build internally based on customer data, again, you can see that we improve upon just a single call for LLMs, and we are paying a little bit here, uh, with, right,

  30. 7:14

    more runtime and more money, but we get higher quality.

  31. 7:20

    So this is really the takeaways here, that LLMs alone are not always enough, even for what we call simple tasks, such as just instruction following. I will always say start simple and then use whatever work.

  32. 7:32

    So if you can use SLMs, use SLMs. If you can just take a model and put, uh, some tools into it, have at it, that's great. Use ReAct if you can.

  33. 7:42

    And if you really need, if your task is so complex you have to use planning and execution e- engine, this is where you should go and explore, and I do invite you to join the Maestro waitlist to check it out and see if it works for you.

  34. 7:57

    Thank you.