Planning and Multi-Step Reasoning
Transcript
So today's lecture is going to be about planning and multi-step reasoning. So today's lecture, we are going to cover three papers on multi-step reasoning and planning. Let's start with this paper from ICML of last year. So the title of the paper is Language Agent Tree Search Unifies Reasoning Acting and Planning in Language Models. So the types of applications that we want to target in multi-step tasks are tasks that we not only need to reason about things,
but also need to act through those reasoning steps and search our trajectories, or optimize trajectories and how we get to a final correct answer. So in the reasoning step, the model needs to think about what needs to be done? For example, what the budget is, where the plan is. These are the reasoning steps for a trip or vacation planning prompt. The act is OK. Now that you have certain types of reasoning or thinking, how do you gather more information, or act on these reasoning steps?
For example, the action could be a browsing the web, generating a query to search, read Reddit, or a travel blog, and so on. And then another step is search. Given these feedback, or the information that's gathered online, how can we refine our plan so far? Maybe we can consider alternative destinations, search new things to do while we are there, and so on. So there are a series of reasoning, action, and search steps that needs to be done to solve this problem of, for example, planning a trip.
So the problem, or the challenge that this paper specifically wanted to address was the following. The goal here was, let's go from the LLM, generate a plan, and executing on that plan, to really try to encourage diversification and exploration of different types of plans, or paths that the model can take because models-- And this is true still to this day, that creating a diversity of solutions, or acting upon them and planning multiple steps of optimization to reach a solution. So this paper focused on bringing known techniques from reinforcement learning and multi-step planning that
existed in the past, including multi-step Monte Carlo tree search into the LLM reasoning path. And given that the models can take feedback in, it also introduced ways for the model to take different feedback as the model explores with the environment and bring that back in order to refine and optimize future plans and search processes.
So just a quick example of how this worked. For example, the prompt is to plan a trip to Hawaii. There are different ways and different actions that the model can take, so it can, for example, if we sample the model for this prompt, the model might decide that we might consider asking friends that already went to Hawaii, or read subreddits related to that. And then this framework introduced a mechanism for getting a score for each of these actions,
and then update the search space, or the trajectory of follow-up expansion of this tree that is being formed based on that score. And we talk about how these scores are generated. In this case, action 1 has a higher score, so we expand that action, so the model expands that action. So in this case, ask two friends, friend a and friend b, about opinions, and then based on the quality of responses, their score for that, and the model can expand from there,
so there is a flavor of multi-action sampling in this case. The actions can, in fact, be executed in parallel. Like these two actions, or these two actions, they both can be executed in parallel. And there's this notion of let's do continuous exploration based on the best state, but also consider a mix of exploration and exploitation, and that's where the MCTS comes in.
So there are two papers that-- this paper was basically saying, how it diverges from those. Math-Shepherd is a paper that we saw previously, and in that paper, there was a verifier that was guiding the search process in the test time. Basically, the reasoning trajectories are scored by this verifier, and then the expansion is guided by that. But in LATs, which is this paper that we are going to learn more about in this lecture, this scoring is not based on reasoning theorists,
but it's based on the outcomes of the actions that the model takes. And also there is this part about reflection of the model to evaluate how this trajectory went, and also about the observations from the environment. It also improves based on previous methods frameworks on reasoning such as the ReAct work, where basically in ReAct, there is this extra step up. We are going to see how this works, but there is this extra step memorization, and, again,
reflection and an interaction with the environment that we have in the LATs paper. And specifically, we have more and more planning into the process. So here is the intuition behind LATs. There is the chain of thought, where the reasoning process is basically decomposed into a number of steps. There is this notion of tree expansion. Basically, through these types of actions, that action generation that we have, we have a tree, that we form a tree, and we do search and planning through that.
And then we have this borrowed that from the ReAct framework, where the feedback from these actions are incorporated into this search process for the future search and so on. So this method concretely has six types of stages, selection, expansion, evaluation, simulation, back propagation, and reflection, so let's see exactly how this method works. And let's walk through an example prompt. So in this case, the prompt is navigate through a maze to reach an exit. And then the initial observation is
that you're in a dimly lit room, there are two doors, one on the left and one on the right, and the goal is to reach an exit in this case, so let's see how these different steps of LATs come into play. So first is the selection process. In this stage, we need to select a node to expand. Let's say, we have done that. We see exactly how that's done, but given that we have selected a node, and this is based on UTC, we are going to see it in a bit, we
want to see what actions that we can take from that node. So in this case, our initialize node is this thing, you're in a dimly lit room and so on. Now, let's say, the model samples different actions here. In this case, three actions are sampled. One is open the left door, open the right door, and the third one is inspect the room for clues. Then the next step is each of these actions are executed in the environment, and the observation is basically appended to the context.
So in this case, say, if the action is open the left room, the observation is dark corridor with paintings. Action B is open the right. There is another observation and so on for action C. Now comes the evaluation. So let's say, we have an action, we have executed an action, we want to evaluate our new state that we are going into. For this part, they suggest averaging for creating a score. Based on the current action and observation, they suggest adding up two scores together.
One is using an LM score, basically using LLM-as-a-Judge and prompting the model for evaluating how promising this state is, and literally asking it to give a score based on 0 to 1 for this state. And the other one is the self-consistency score. And that is, let's assume instead of three actions here, we had sampled 50 times. We had sampled 50 actions, and we categorized them into different types of actions. And if an action is sampled more, we give a score corresponding to the rate,
or the frequency of an action being sampled. So in this case, the self-consistency score for state A was higher because 75% of the time maybe the action was sampled, so the way to create just one value for this action is to add up these two. So now we have a value for action A corresponding to state s_A. And then we have the simulation part. For example, in a greedy method from the previous stage, we have s_A having the highest score. s_B and s_C have much lower scores,
so we go and expand s_A all the way begin. We can continue this process. We sample more from s_A and we continue expansions until we reach an end state, or whether it's successful, or it fails, or until we reach the budget that we have for expansion of this state. So in this case, from state s_A-- so this was s_A, and then we have the candidate actions that start from that state. And then in this case, it's greedy. It takes one action approach, this staircase, and then we reach an observation, which we are lucky in this case, we have the exit door clearly marked. We got a point here.
And then let's say the simulation is done. We either have a successful trajectory or it's a failure, then we can-- the important part here is how do we use this observation to backprop and update the scores that we had for different actions that were taken? So this is the backprop stage, and then that is used to influence the score of each state, and we're going to talk about it in a bit. Let's talk about how these value function and backpropagation is used.
So for the value function, we already saw that. That is a weighted average of asking an LLM-as-a-Judge given this observation, this action, what are the chances of success? Give us a score between 0 to 1. And then there is the self-consistency, which basically we just count how many times a given action is sampled. Then there is the notion of UCT, or upper confidence bounds applied to trees. That's something that this basically the number, or score
that is used for selection because at each point, we have a range of values that we want to see, which node we go and expand. So the way UCT works, and this is completely borrowed from the MCTS literature. The way it's designed is to try to balance between exploration and exploitation. If we just go based on the highest value at that point, we might miss out other nodes that right now, maybe at the current moment have a lower value, but down the road at the end might
have higher value, so let's balance the two of them. So the way UCT works is that it has this exploitation one, which is V of s, plus a hyperparameter, times this other term, which encourages exploration. And the way this work here is that the Np is the number of times a parent of a node is visited, and Ns is the number of nodes that this current node is, not the parent, but the current node is visited. And basically, think about it this way.
Relative to the parent node, if a node is visited less, we want to encourage visiting that node more. And if that node relative to the parent is visited a large number of times, then this number, this division, this becomes a smaller number and UCT becomes lower relative to unexplored children of a parent node. So UCT, again, is the number that we use for selection of a node and going from there. Now, back propagation, and that's where we go at the end of a trajectory, either we succeed or fail.
The return of that trajectory is used to update the values, and this is like back propagated through the steps. So at each point, the value of a state is the value of the old state, times the number of visits to that node, minus 1, plus the return, divided by the total number of visits to that node. So that's how the math behind this framework. Yes. Why does it have one [INAUDIBLE] you take a long time, but it didn't take long? It's just something. There's some math and theoretical intuitions behind it. There is no proof that this is the optimal round, but you want to just balance the two in that this is considered a more optimized way of doing things. [INAUDIBLE] Yes.
So once backpropagation is done, they also append this reflection of the model itself about the trajectory that was expanded. If it fails or it succeeds, the model adds some thinking behind what happened, what led to the failure or the success of this trajectory, and this apparently has been very helpful in overall increasing the quality of this approach. So they tested this approach on HotPotQA, which is some data set that we use it for multi-step reasoning optimization.
Basically, the way this data set works is that for each question for answering them, you need retrieval from, at least, two different Wikipedia pages because it's just designed like that, so you need this multi-step by design process in order to find an answer. And they're doing really well. Just look into in terms of as they increase the number of samples or the number of trajectories that they sample, they can significantly improve performance, and the reflection
and bringing those reasoning traces also gives a lot of boost at the end to the model. So basically, they have provided a mechanism to translate more compute at test time effectively to better solutions for this multi-step reasoning tasks. They also tested that on WebShop, which is this interesting data set for practical applications.
This is just to show you an example of how this data set works. For example, there is-- I'm looking for a small portable folding desk that's already fully assembled. It should have this color and this finish and so on, and the price is-- so it's by design, it's a multi-step process, and they're showing that their approach without any fine tuning. And just at test time, they can get really high results, even close to human experts in this case.
So to summarize, what LATs proposed was a new technique for bringing in reasoning, taking actions and planning all together, and brought in our known ideas like MCTS into the language model world. And they got very strong results on multiple domains. And given their test time approach and the modular approach, it's very portable and relatively easy to create. The downside, of course, is the cost.
Each of these back propagation and expansion of a tree, all of those are adding a lot of cost, and the cost benefits was not really analyzed in the paper. Another assumption that this paper didn't address was really that there are scenarios, where taking an action may be irreversible. So that's going to be challenging like, how do we adapt to those scenarios, if, for example, the model is running a transaction? If it actually takes those actions,
it could be very consequential, like paying for a service and so on. So that is another scenario, where this approach might not be adaptable to. So here, there are a few questions about this paper that I really would like you to think about it maybe for a couple of minutes, and then we discuss anything related to where you see the strengths or weaknesses of this paper, or if you were to adapt it or extend it, how would you do that? So let's start doing that, and I'll get back to you in a couple of minutes.
All right, let's get back. Anyone wants to comment on this fork? So the UCT method is basically like upper confidence-bound from banded learning setting, right? There's other algorithms for embedded learning like picking and exploring various arms. Did they try different ones in this paper? The question is UCT is one way to create this exploitation, but there are a lot of literature, now that whether they compared? Yeah. No, and there is that whole literature
of multi-armed bounded and other ways that we can bring in exploration, exploitation into the optimization process, and all of that could be also explored here. Their main contribution is that created a platform that now others can bring in other approaches to optimization. Yeah. Anything else? Questions or comments?
OK, let's move on to the next paper. [INAUDIBLE] Yes, go ahead. If we want to keep track of the action trajectory based with the Monte Carlo tree search, what if there are times when there's repeated actions like action AB, AB is, or when the same action is seen in multiple nodes, is there any way to optimize this tree, or does this tree recognize all of these repeated actions as independent trajectories?
So the question is, if a series of actions are repeated, how do you-- so the philosophy behind this is that if an action is repeated inside a trajectory, given a parent node, you would increase the count of that action, and that comes in the UCT formulation. So ideally, you would capture in that as you are forming this tree. And ideally, this is a tree that you're forming. Not some fully connected graph, so this is the assumption behind this. Yes. So let's now talk about SPRINT.
This is a NeurIPS 2025 paper, so this hasn't been even presented here at the conference. So this paper is about, again, it gives you a flavor of this planning and parallel execution of those plans and how we can use the model itself to enable it to think better in parallel, and we can optimize that. So this paper, SPRINT, was motivated by this observation that the reasoning models such as o1, Gemini Think, Gemini 2.5 Pro, and pretty much all the frontier
models right now, they have this tendency that for harder problems, they think more. And this longer thinking corresponds to higher accuracy, so these models to think for longer and longer like chain-of-thoughts. For example, these two graphs here show that the DeepSeek-R1 during the training process. As the training process continues, obviously, it becomes better at solving this, Amy, these math problems. But also, if we take a look at the average length per response,
that is also going up, so it seems like there is a correlation between model thinking for longer and a larger sum of number of tokens and the accuracy that we get from that. Now, again, so the observation here was that these long reasoning steps are helpful, but at the same time, many of these reasoning steps seem to be independent of each other. For example, the model tries alternative approaches, it decomposes a task into subtasks that some of them
can be run in parallel, and then some of these steps are verifying the previous steps. But there is a lot of-- if we look into the graph that describes the reasoning trace, there are parts of these computations that are independent of each other, so we don't need to really wait for all of these steps to be created sequentially by the model, so we want to see how we can leverage this parallelism observation. And so the idea is, we want the model
identify this parallelization opportunities and act on it. So SPRINT is a framework that does come in during the post-training and/or fine tuning process, and what it does is that it takes a reasoning model and enables the reasoning model to execute the response generation. We are a planner that creates a set of plans for how to approach solving a problem and a set of executors, and those executors can be run in parallel in order to carry out the plan. And this can happen again and again.
We can have the next slide. We can have a plan, a bunch of execution plans that are carried out in parallel, and then we can have another set of plans and then another set of parallel executions, so the interleaving of these planning and execution is what it can enable acceleration of the reasoning process. So let's see how we can enable the model to create these parallel traces. And this is something that I want you to think about it beyond just this paper,
and we're seeing it in the following work that we are talking about. A lot of times when we want to create data and figure out a certain behavior in the model, we can use the LLMs itself in the fine tuning data creation process, and here is an example of that. Given a reasoning model's response trajectory to a question, we can decompose it in a number of steps via an LLM. So in this case, for example, we had DeepSeek-R1 generate these reasoning traces and responses to these questions.
And then we had a model like GPT-4o going through this reasoning trace, and annotate the steps of the reasoning response. And not only that, for each of these steps, we ask the GPT-4o to annotate whether which part is the planning part, and which part is the execution part. And in some steps, there were multiple execution pieces for a given plan. So for example, we had this query, we had the reasoning trace, and then there are a bunch of things that needs to be done.
And then when the reasoning stops, there is a final answer. Then we use GPT-4o to go through this process and create these steps 1, 2, and k. Basically, now we have these annotations, and within each step, the model also annotates the plan and the execution. Which part is the planning part? Which part is the execution of that plan? Given that, then we can create a DAG of these steps. So we have step 1 and step 2 and all the way, and we can, again, use the model.
And the model does a really good job here of saying whether how these steps are related to each other. For example, step 4 and 2 are not dependent on each other, but they both depend on step 1-- is a follow-up to step 1, so now we have a DAG of an optimizer and basically, creating the DAG that describes how this reasoning trace works. And then we can do packing of these steps. For example, step 1 can be done first, and step 2 and 3 can be done completely in parallel with each other and so on.
And once we have these data set that we have annotated, then LRM here is just a large reasoning model. Basically, all LLMs are now inherently reasoning models, so what we are creating here is this data set of the steps, plan, and executions in parallel, and we basically fine tune the model, for example, DeepSeek-R1 to now think in that way. So previously, we would just create those inherently have these properties, but now we want the model to think more and more in parallel by showing these parallel-like planning and execution traces. And we just fine tune the model. In this case, just a supervised fine tuning of basically showing the model the same stuff, the same thinking processes, but now annotated with these texts.
And this helps the model that at inference time, now, the model can output these tags. For example, here is plan 1, and then here are the execution patterns for this. And here is plan 2, and so on. So, for example, for plan i, there is a set of thinking and a parallel execution that the model just outputs itself, and then we can go over executing these plans in parallel, and then syncing the output and returning the context. And then the model goes through plan i plus 1,
and then there is a number of parallel subplans within that the model can output and we can go from there. Why this matters? So the cost of LLM inference, especially when we get to multi-step reasoning, becomes a huge burden. And you might have already noticed that yourself, and you spend a lot of time waiting for the model to output the response it gets.
It might make you not happy, you want the answers fast, but also it's a lot of costs and a lot of delay that goes into generating these responses. So right now, here is how the sequential reasoning models work, so there is a query, there is a plan, and then execution of that plan. There's plan 2, execution of plan 2, and so on, so this is the time that it takes to generate, or go over this thinking process and generate the final answer. But if we could leverage this independence
from plan 1 and plan 2, we could have the model execute. We could have the execution of those plans be done at the same time. Here is what after we fine tuned with the spring at inference time happens, so instead of model generating plan 1 and executing that, then generating plan 2, model generates these two plans first, plan 1 and 2, and then it starts executing. The execution of those plans happen at the same time. And then the execution could be using a tool.
For example, the model is come up with a calculation, and then we can use this calculator Python to execute plan 1 and plan 2 and so on and then go to the next stage. And the fine tuning data, again, this is another visualization of how given these annotations that we have for plans and execution, we create the fine tuning data, so we are basically asking the model to think in parallel, if the plans are independent of each other. We are basically teaching the model to come up with plan
1 and 2 at the same time, because they're independent depend of each other and we execute them. Yes. So if there's a need for a replaning, how does the model remember which plans correspond to which executions, and all of those things? Later in the infant stage, after the execution for someone who realizes that, oh, what I did was wrong. How does it remember to do a replanning of go to the plan of 3 instead of plan of 2?
So this fork, you're bringing the previous work in here. Here, the model can-- so what we are teaching the model here is that to think about plans at each point of time, even if it's a revision of an existing plan. If it can generate plans that can be executed in parallel, it should do so. It should not wait for the execution of plan 1 to generate plan 2, because plan 2 is independent of plan 1 anyway. So this is how we are creating this data set for training the model to teaching it to think maximally in parallel and generate those plans. If the model wants to go back and reverse on a plan, it still can do that. It still sees all of these contexts. It's just like the model is trained to think more
in parallel. And also because it's trained to be like that, and we have this special tags, or ways of the model generating these plans and execution plans, we can act on it and leverage those parallelism. Yes. Is the plan to change the structure of this LLM, because before, you just need to predict the next token, but now you seem to have three parallel lines? It's always next open. It's just that there is instead of everything, the plan and execution, one at a time, if there is a tag like here,
this is plan i, and here are the execution. And here is plan 2, plan i and i plus 1. For example, here is plan 1 and plan plus 2. This is the high level count. And then now that we know that there are these two plans, we can just branch out and run them in parallel. So that's the idea here. So here is the training recipe starting from-- so we generate 6k thinking trajectories for MATH data set. We keep the ones with higher parallelization,
and we do supervised fine tuning on DeepSeek-R1 Distill-Qwen-7B on this reformatted trajectories. And the interesting property that we observed was that, so when we started the project, the goal was to maximize parallelism for reducing the sequential token generation, so we save on that. But it turns out this process actually helps out with accuracy as well. The model seems to like these more structured way of thinking, and this way of encouraging parallelism
helps the model have higher accuracy as well. And here, what we are showing that is the average number of sequential tokens over the baseline model like R1 Distill-7B. And the SPRINT model, again, is distilling R1. This basically, there we are fine tuning the 7B model, and there's a big jump like a 3 and 1/2% jump over that, while also becoming much more efficient than a 32B in terms of number of sequential tokens. Like you said, there's [INAUDIBLE] and more opportunity
to explore more approaches given the fixed compute budget, because-- It could be, yeah. And we have some data on that, which I believe I'm going to show. The model does explore more and think in parallel more. And another interesting observation was that we have out of domain generalization as well. So the training to think in parallel was done for the MATH data set, but we also saw the model is doing better. Not only have more opportunities for this parallelism, but also
higher accuracy, for example, countdown or GPQA diamond data set, so there is no training. We have not trained on those data sets, but the model generalizes. And this could go back to what you were suggesting, that the model can think in parallel. And that inherently seems to help the model, but as a side effect, we also have opportunities for leveraging this parallelism and reducing the number of sequential tokens. Could there be a scenario, where individually, the answers are
correct in parallel branches, but when you combine it, say in a sequential manner, the answer may be wrong, and in that case, what will take precedence? And in that case-- What will take precedence? Because sometimes, even in a mathematical equation, individually, when you look at them in isolation, the answer might look seemingly correct, but when you put all the steps together, the answer may eventually be wrong. So when the model generates, no matter
if it generates sequentially, or in parallel, at the end of the day, everything is condensed into the context, so the model sees that. And this is the thinking process. The answer, after this, the model should generate a synthesized final answer, so if there are contradictions in the sequential, or in parallel, the model is expected to resolve that before generating a final answer. So in that case, it's a little difficult to say because both approaches can suffer from contradictions
in the thinking. But here, what we are seeing is more that these plans are rather than being different approaches to solve the same problem, they're different steps to solve one problem. So another interesting observation was that-- and perhaps intuitive some that harder problems require more iterative planning and execution. The other observation-- this was maybe less intuitive was that in the early stages-- so we have a bunch of these parallel planning execution, parallel planning execution.
In the early stages, the more parallelism, or more exploration is observed by the model, and then in the later stages, we converge to maybe to less plans. Basically, the exploration is more in the early stages, and towards the end, we want to really go dive deep into a single plan and execution. Yes. How can you ensure that the independent reasoning tasks are evenly load balanced and do not encounter bottlenecks? Do independent tasks, for example, have similar expected execution times? Here, you are saying that how do we make sure? So when we divide independent tasks, how do we ensure that these are going to be executed in about similar times?
So the question is, how do we ensure that these independent plans that are now run at the same time, they take similar times? So the thing is we can ensure that. There are some measures taken to enable that, but we still could have a straggler. Maybe step 2 versus 4 here, step 4 may take a lot longer than step 2, but at the same time, we are confined to just step 4, not step 4 plus step 2 runtime. And we have some measures. For example, if the execution is just too simple,
we merge that into the plan and try to create these bigger and bigger chunks that we can do in parallel, but that could be an optimization as well, the optimizing this across the stages. So I was wondering if there's a group analysis for it [INAUDIBLE]? I'm not sure. I'm not sure if there's analysis exactly on that. Question? Yes. Could you go back to the slide? So I saw on the MATH and GPQA, the SPRINT has comparable accuracy and number of tokens as the baseline.
So I'm curious, for those benchmarks, what is the mean width of the tree, and what's the maximum width? In terms of because the width of the tree determines how much parallelism you can exploit. So what you're getting at is that the width is task-dependent basically? Yeah. The parallelism that we can exploit, and for some of these, basically if the ratio of the sequential tokens is for one task. For example, I believe, for MATH is lower than for GPQ domain, then yes, that's an indication of parallelism. Some tasks could be inherently more parallel than the other.
And I don't know the exact number of the width of the tree here, but that to be able to leverage this approach, parallelism should exist. But what we observed is that that is the case for many of the reasoning problems like MATH and other reasoning tasks in GPQA and so on. And some of these are-- again, for example, if you look at this for the MATH data set compared to some of these methods with even lower, but comparable accuracy, we are increasing the bandwidth, or reducing the number of sequence token by something like 40%, which is a long, large number.
But it is true that this is going to be task-dependent. And maybe getting back to your questions, we have larger savings for problems that need more thinking. So for example, here we are showing the sequential token reduction by SPRINT over the baseline. Sorry, over the RFT model. This is the rejection fine tuning methods, so this is a baseline we are comparing with. If the number of tokens in generated, like in the thinking process is small, then there is probably less opportunity
for parallelism. So by doing this, oh, let's plan and execute, actually, we can be worse than the baseline. But this appears in the harder problems and problems that require more thinking and more number of parallel tokens, and that's where this method shines and shows in parallelism. I'm not sure how many of you have read the recent Sonnet 4.5 system card, but it was very interesting to me that it says, the prompt for the system card encourages
the model to use tools as much as possible, and, at least, 100 times. That's a very large number that the model is encouraged to use the tool. And this just shows that we are going into this regime that we are solving more and more interesting problems, and we are actually going more and way beyond 8 to 10k, even for the number of tokens that the model deals with for solving a problem. Yes. So can you come back to the fine tuning of data set diagram with all the trees? Fine tuning process. I think one. Yeah there. Doing inference, does it reduce the entire step 1 to step k the entire thing, but different layers, or does it do a sequential? No. During inference, it just likes this. So the model learns to generate plans that can be executed in parallel at the same time, so it first generates plan 1 and 2, and then once plan 1 is outputted, execution of plan 1 starts.
Once plan 2 is outputted, execution of plan 2 starts, then the result is put back in the context, and then the model is generating two more plans. So the model still takes this sequential approach to generating plans and execution, but the difference is that if it learns, or is trained to at each point of time, if there are plans that can be executed in parallel, it generates those at the same time. So here, would be after step 1, it generates step 2 and 4 at the same time, and then you see the results for that and then so on and it continues.
So think about it, each step is a plan and a set of executions in the training. But this step here is defined as plan 1 and exit 1, and then it be changed the notion of-- Do they also match this? So let's say, they execute two plans that can be parallelized, and then they collect the context and then add it to the prompt for the next level. Do they also do that in the training phase as well to match how they are proping it? This is how the training data will look like. So plan 1 and 2 are independent, so plan 1 and 2 are put together next to each other,
and then we have execution 1 and 2 during training. So that's how the model sees during training that plan 1 and 2 could be outfitted together, but at inference, the execution is actually also done in parallel. Let's move on to the last paper because I want to make sure we cover that. But just before that, opportunity. So here, the work that supervised fine tuning, but, of course, methods like RL and GRPO can enable potentially much more benefit from this data and much more this generalization property usually works well with RL.
And other notions about tool use, overlapping different tools, or actually realizing the wall clock speed of this other work that can be done here in the implementation of this method. So now, let's go through another method called SWiRL. This is also a continuation of multi-step synthetic data generation and helping the model do multi-step better. And this is a work that is going to be presented next week at COLM in Conference in Language Modeling in Montreal. So this is another just a preview.
This is another training. We are using training and basically fine tuning a language model to help it do multi-step reasoning better. So motivation, again, many real world tasks require multi-step reasoning and tool use. For example, if you want to answer multi-hop question using a search engine, you want to solve math problems, or use solving a software engineering like doing a project, planning a trip, analyzing data, and so on. Usually, we go as humans, we use these tools,
and reason through them for important tasks more than one, so we need a cohesive number of steps of reasoning and tool use in order to solve a problem. So the challenges, again, in multi-step reasoning and tool use setting is that then you're doing reasoning and tool use. Even for one step, it can get complicated, but as we expand on this and generate multiple steps of reasoning and tool use, the errors and the complications can compound over these different steps.
If we want the model to-- and another focus of this paper is enabling tool use, like teaching the model to use the right tools, for example, a calculator, Python executor, and so on. Using these tools live during the training process can be very challenging because tools can fail, they can be slow, and the training process is already time consuming and challenging, so this can further slow that down. And if you look back in terms of the fine tuning processes,
such as reinforcement learning from human feedback, from AI feedback, or execution feedback, many of these are optimized for single step tasks. Basically, the model takes a lot of whatever it wants to do, generates a final answer, and the reward is just based on the final answer, whether it's correct or not, and then we back propagate that towards actions. And here, we want to have more of governance on the process of generating these steps and how we can optimize them.
So this framework called SWiRL, and the design goal for SWiRL is the following. First of all, at a high level, we want the model to solve complex problem and multi-step reasoning task. We want the model to know when to call a tool, generate the right queries to invoke a tool, because we need to know how to use a tool, the model needs to know that, carry out these reasoning steps and maintain accuracy across them, and learn how to recover from an error
and learn when to stop taking new steps and calling new tools, and say, OK, I'm now ready to generate a final answer, so we want the model to know these steps. We also want to avoid using tools during the training process, because like I mentioned, this can be slow. Tools can fail, and can have bugs, so we want to avoid that. And ideally, we want the model to generalize this, so ideally, we want the model to learn when to adapt to new tools and new reasoning tasks and capabilities.
So to approach this, here is the process. The first step of this process is that let's start with creating synthetic multi-step data for a model, so given a prompt-- and in order to really annotate these steps, let's have the model take one step at a time and let the model know at each step that it's free to reason, create a chain of thought, call a tool, or propose a final answer. So having an input prompt at step 1, we tell the model, you have access to these tools, you
can generate a reasoning step. If you're ready to generate the final answer, just say that and create that. So given this prompt, the model would take the first action, which could be a reasoning step followed by a tool call, and then we show the model the environment response. So given that, then we show the model again the same prompt, but this time, we have the context from the previous step. So basically, we say, here is the original prompt, here is the previous action, and here is the result of taking that action from the environment. You can take a new action and call a tool, or if you're ready to create a final answer, just output the final answer. So by design, through this adapt to iterative prompting, we are creating this multi-step data set,

Ask anything
We've read this whole study set, so questions about it get the best answers.