Skip to main content
Back

Meituan Trains AI Agents to Stop Repeating the Same Tool Mistakes

Meituan researchers turn error recovery into a trainable skill, doubling multi-turn tool-call accuracy on BFCL v3 and outperforming GPT-4o-mini on repair.

  • Meituan proposes structured reflection, turning error-to-repair into an explicit, trainable Reflect-Call-Final action.
  • Training combines DAPO's decoupled clipping and dynamic filtering with GSPO's sequence-level importance sampling for stable RL.
  • Reward decomposes outputs into reflection, call set, and final message with multiset call matching and similarity backoff.
  • Tool-Reflection-Bench includes ~5k train and ~1k test samples using four failure-injection operators over BUTTON and XLAM.
  • Multi-turn accuracy on BFCL v3 rises 28 to 39 percent across Llama-3.1-8B, Qwen2.5-7B, and Qwen3-4B backbones.
  • Code and dataset are open-source at MeiGen-AI/Tool-Reflection-Bench under MIT license.

Anyone who has watched an LLM agent trip over a tool call knows the pattern: it makes a mistake, gets an error back, and then confidently makes the exact same mistake again. A new paper from Meituan's Vision Agent Team argues this is a training problem, not a prompting one. Their fix is to treat the path from failure to repair as a first-class action the model learns to produce, rather than a heuristic side-effect of chain-of-thought.

The work, titled Failure Makes the Agent Stronger, introduces a technique called structured reflection along with a benchmark and training recipe for tool-using agents. Code and data are on GitHub under an MIT license.

Why one-shot tool training breaks down

Most tool-augmented LLMs today are trained with supervised fine-tuning or coarse-grained RL that optimizes a single tool call in isolation. That works for a first attempt, but multi-turn interactions are a different beast. A tiny typo in a parameter, a swapped argument, or a call issued in the wrong order invalidates the whole function invocation, and the reward signal collapses to zero. Existing self-correction approaches lean on prompts that tell the model to think harder, which is fragile because the model never actually learned to diagnose an error, only to keep generating.

Reflection, the authors argue, should be an explicit, controllable, trainable step rather than a hopeful byproduct of longer reasoning traces.

The Reflect, Call, Final loop

Structured reflection reformats every training trajectory as three tagged segments the policy must produce in order: