A 7B Model Beat GPT-4o at Agentic Tasks. The Trick Is Training the Flow, Not the Model

3 min read

Most agent work focuses on the model. Bigger model, better agent. AgentFlow flips that. It trains the flow, the orchestration of how an agent plans, executes, verifies, and generates, and the gains are large enough that a 7B-parameter model beats bigger proprietary models.

The framework has four parts. A planner breaks the task into steps. An executor carries them out, calling tools as needed. A verifier checks each step before it becomes the next step's input. A generator produces the final answer. The training method is Flow-GRPO, which optimises the whole flow end to end instead of training each part separately.

The numbers come from the paper's abstract. A 7B backbone gains 14.9 percent on search tasks, 14.0 percent on agentic tasks, 14.5 percent on mathematical tasks, and 4.1 percent on scientific tasks over strong baselines. The paper says the system surpasses larger proprietary models like GPT-4o in general terms. The scientific gain is smaller than the others, which is worth noting: the method helps most where the task has clear steps to plan and verify, and less where the work is open-ended research.

Flow-GRPO is the training method, and the name is worth unpacking. GRPO stands for group relative policy optimisation. Instead of scoring one output at a time, it samples a group of candidate outputs, compares them against each other, and rewards the ones that are better than the group average. The "flow" part is that the reward is applied to the whole orchestration, not to a single response. The planner, executor, verifier, and generator are trained together, so the planner learns to produce plans the executor can actually follow, and the verifier learns to catch the mistakes the executor actually makes.

That joint training is the key difference from prompting. A prompted agent has four parts that were never trained to work together. Each part does its best in isolation, and the errors compound. A trained flow has parts that learned each other's habits. The planner knows what the executor can do. The verifier knows what to check. The result is a system that is more than the sum of its parts, and that is why a 7B model can beat a much larger one on agentic tasks.

The lesson is about where the leverage is. A 7B model is small by 2026 standards. It cannot beat GPT-4o on raw knowledge. But give it a trained planner, a verifier that catches mistakes, and a flow that is optimised as a whole, and it wins on agentic tasks. The orchestration is doing work the model cannot do alone.

This is the same pattern showing up across the field. The model is a commodity you rent. The flow, the evals, the verification, the replay, is the product. AgentFlow is one more piece of evidence that the gap between a small model and a big one is mostly scaffolding, and scaffolding is trainable.

My read is that this changes what to build. If you are choosing between a bigger model and a better flow, the flow is cheaper and the gains are larger. Train the planner. Train the verifier. Measure the whole system, not the model.

AgentFlow 7B accuracy gains over strong baselines
Search14.9%Agentic14%Mathematical14.5%Scientific4.1%
Data from the sources listed below.

Try this

Clone the official implementation and read how the four parts are wired together.

bash
git clone https://github.com/lupantech/AgentFlow

Then build a minimal planner-executor-verifier loop yourself. You need an OPENAI_API_KEY.

python
import os
from openai import OpenAI
client = OpenAI(api_key=os.environ['OPENAI_API_KEY'])
def call(prompt):
    return client.chat.completions.create(
        model='gpt-4o-mini',
        messages=[{'role': 'user', 'content': prompt}],
    ).choices[0].message.content
plan = call('Break this task into 3 steps: plan a birthday party for 10 people with a Rs 5000 budget.')
print('plan:', plan)
draft = call(f'Execute step 1 of this plan: {plan}')
print('draft:', draft)
check = call(f'Verify this draft against the plan. List any step it missed or any budget error: {draft}')
print('verifier:', check)

Sources