Source-linked AI summary
Chain-of-Agents: End-to-End Agent Foundation Models via Multi-Agent Distillation and Agentic RL
Weizhen Li, Jianbo Lin, Zhuosong Jiang, Jingyi Cao, Xinpeng Liu, Jiayu Zhang, Zhenqiang Huang, Qianben Chen, Weichen Sun, Qiexiang Wang, Hongxuan Lu, Tianrui Qin, Chenghao Zhu, Yi Yao, Shuying Fan, Xiaowan Li, Tiannan Wang, Pai Liu, King Zhu, He Zhu, Dingfeng Shi, Piaohong Wang, Yeyi Guan, Xiangru Tang, Minghao Liu, Yuchen Eleanor Jiang, Jian Yang, Jiaheng Liu, Ge Zhang, Wangchunshu Zhou
TL;DR
Existing multi-agent systems rely on engineered workflows and face computational overhead and limited data-centric learning. Chain-of-Agents distills multi-agent behavior and applies agentic reinforcement learning within one model; the resulting AFMs establish new state-of-the-art performance across nearly 20 agent benchmarks.
Problem
Existing multi-agent systems rely on engineered workflows, incur computational overhead, and have difficulty generalizing or benefiting from data-centric learning.
Source: §1 · p. 3Method
Chain-of-Agents simulates multi-agent collaboration within one model, using multi-agent distillation for supervised tuning and agentic reinforcement learning to improve agent problem-solving.
Source: §1 · pp. 3–4Results
AFMs establish new state-of-the-art performance across nearly 20 diverse agent benchmarks, including 55.3% Pass@1 on GAIA with a 32B model.
Source: §1 · p. 3Takeaways & Limitations
The reported results support end-to-end agent models as an alternative to ReAct-like tool-integrated reasoning across RAG, web, and code domains.
Source: §7 · p. 21The paper identifies prevailing specialized-agent architectures as limited by coordination overhead and state fragmentation, constraining adaptive coordination over extended reasoning chains.
Source: §6.1 · p. 20
Abstract
from arXiv · showhide
Recent advances in large language models (LLMs) and multi-agent systems have demonstrated remarkable capabilities in complex problem-solving tasks such as deep research, vibe coding, and mathematical reasoning. However, most existing multi-agent systems are built upon manual prompt/workflow engineering with sophisticated agent frameworks, making them computationally inefficient, less capable, and can not benefit from data-centric learning. In this work, we introduce Chain-of-Agents (CoA), a novel paradigm of LLM reasoning that enables native end-to-end complex problem-solving in the same way as a multi-agent system (i.e., multi-turn problem solving with multiple tools and multiple agents) within one model. In chain-of-agents problem-solving, the model dynamically activates different tool agents and role-playing agents to simulate multi-agent collaboration in an end-to-end fashion. To elicit end-to-end chain-of-agents problem-solving abilities in LLMs, we introduce a multi-agent distillation framework to distill state-of-the-art multi-agent systems into chain-of-agents trajectories for agentic supervised fine-tuning. We then use agentic reinforcement learning on verifiable agentic tasks to further improve the models' capabilities on chain-of-agents problem solving. We call the resulting models Agent Foundation Models (AFMs). Our empirical studies demonstrate that AFM establishes new state-of-the-art performance across diverse benchmarks in both web agent and code agent settings. We make the entire research, including the model weights, code for training and evaluation, and the training data, fully open-sourced, which offers a solid starting point for future research on agent models and agentic RL.
5.1 Computational Efficiency · 1 Introduction
Chain-of-Agents (CoA) brings multi-agent collaboration into a single model, and the paper presents Agent Foundation Models (AFMs) trained to solve agentic tasks end to end. The introduction reports benchmark gains and lower inference token consumption, while outlining distillation and agentic reinforcement learning as the training approach.
1 Introduction
- Existing multi-agent systems can incur high communication and workflow costs, require reconfiguration for new tasks, lack data-centric learning, and rely on LLMs not trained for multi-agent, multi-tool workflows.Source: §1 · p. 3
- Tool-Integrated Reasoning trains end-to-end think-action-observation trajectories, as in Search-R1 [21] and WebThinker [29], but does not train LLMs to support multi-agent systems end to end.The introduction contrasts this with multi-agent frameworks’ diverse tools and role-playing collaboration [15] [26] [82].Source: §1 · p. 3
- CoA dynamically activates tool and role-playing agents within one model, supporting end-to-end multi-agent problem solving without sophisticated prompt or workflow engineering.The paper says this reduces inter-agent communication overhead and supports end-to-end training; AFMs are models with native CoA problem-solving.Source: §1 · pp. 3–4
- The tuning framework generates and filters agentic tasks, distills successful multi-agent-system trajectories such as OAgents [82] into CoA-compatible trajectories, then fine-tunes LLMs and applies agentic RL on verifiable tasks.Source: §1 · pp. 3–4
- AFM establishes new state-of-the-art performance across nearly 20 agent benchmarks; its 32B model scores 55.3% on GAIA, 11.1% on BrowseComp, and 18.0% on HLE.The stated web-agent results are Pass@1 success rates.Source: §1 · pp. 3–4
- AFMs score 47.9% on LiveCodeBench v5 and 32.7% on CodeContests, while the model achieves a 59.8% solve rate on AIME2025.The paper reports that AIME2025 improves by over 10.5% absolute versus previous best-performing TIR methods, including ReTool [7] and SimpleTIR [66].Source: §1 · p. 3
5.1 Computational Efficiency
- AFM reduces inference cost, measured by token consumption, by 84.6% compared with traditional multi-agent systems while achieving competitive performance.Source: §1 · p. 3
1 Introduction
- The authors make the model weights, training and evaluation code, and training data fully open-source.Source: §1 · p. 4
2 Background
The background motivates the framework through three paradigms for complex-task reasoning: ReAct, multi-agent systems, and tool-integrated reasoning.
2 Background
- ReAct interleaves thought, action, and observation steps, with each thought conditioned on prior trajectory history to determine the next action.Source: §2 · p. 4
• Multi-Agent Systems:
- Multi-agent systems comprise specialized agents with internal states and policies over their action spaces that communicate through messages.Source: • Multi-Agent Systems · p. 4
• Tool-Integrated Reasoning:
- Tool-integrated reasoning lets a single agent select external tools based on a global reasoning state, observe execution outcomes, and update its state.Source: • Tool-Integrated Reasoning · p. 4
3 Method
CoA brings multi-agent collaboration into a unified model through dynamic agent orchestration, then trains the model on distilled agent trajectories and reinforces tool use with task-specific data filters and rewards.
3.1 Chain-of-Agents Paradigm
- CoA dynamically coordinates specialized agents within one decoding process, maintaining persistent reasoning state while reflection supports critique and the unified model preserves contextual continuity.The framework describes Thinking and Reflection agents alongside domain-specific tool agents; it also contrasts CoA’s orchestration with rigid Tool-Integrated Reasoning pipelines.Source: §3.1 · pp. 4–5
3.2.1 Training Data Generation
- Agent-level distillation transfers expert multi-agent systems’ sequential decisions and complete execution trajectories into CoA training data, extending sequence-level distillation [24].The authors use OAgents [82], recording agent activations, reasoning states, and outputs to create trajectories for agentic supervised fine-tuning.Source: §3.2.1 · pp. 5–6
- Curation excludes trajectories with <5 total agent-tool interactions, removes dirty data such as incorrect answers or instruction-noncompliant samples, prioritizes self-critical reflection, and upsamples initially low-credibility trajectories that ultimately reach correct answers through iterative re-reasoning.Reasoning chains span 5–20 hops.Source: §3.2.1 · pp. 6–7
- The distilled corpus requires multi-tool coordination and emphasizes reflective trajectories, particularly those with iterative error correction.The reported reasoning chains span 5–20 hops, compared with the 2–3 hops typical of standard benchmarks.Source: §3.2.1 · p. 7
3.3.1 Data Sampling for RL Training
- For web RL, queries with a 32-prediction pass rate above 0.3 are excluded, while remaining challenging queries are sampled; code queries solved in all 8 AFM trials are discarded.The resulting web RL subset is kept separate from SFT data and focuses on cases where tool-based reasoning is valuable.Source: §3.3.1 · p. 8
3.3.2 Reward Function Design
- Web RL uses binary LLM-judge correctness rewards, whereas code and math RL require both correct answers and format compliance for full reward.Code correctness is checked in a sandbox against all test cases, and math answers are evaluated with Math-Verify.Source: §3.3.2 · pp. 8–9
4 Experiments
The experiments evaluate AFM on multi-hop QA, complex web tasks, mathematical reasoning, and code generation, reporting results across model sizes and agentic benchmarks alongside training datasets, evaluation protocols, and gains from multi-agent-distilled SFT and agentic RL.
4.1.1 Experimental Setup
- The web-agent SFT dataset contains 16,433 trajectories, including 8,826 MHQA and 7,607 web-agent examples, with reasoning chains spanning 5–20 agent-interaction hops.Web-agent training data combines generated depth- and width-extended tasks with filtered real-world QA; RL uses 169,615 MHQA instances and 10,427 web-agent instances. Evaluation includes single- and multi-hop QA plus GAIA, BrowseComp, and text-only HLE.Source: §4.1.1 · pp. 9–10
4.1.2 Experimental Results
- AFM-RL achieves the highest average across seven MHQA datasets, with 41.3%, 40.8%, 45.2%, and 45.5% for four Qwen-2.5 3B/7B model variants.These scores improve on previous best methods by 6.8%, 1.7%, 2.1%, and 6.4%, respectively; AFM-SFT also surpasses previous state-of-the-art methods. The models generalize from NQ and HotpotQA training to other multi-hop QA datasets.Source: Table 6 · p. 11, §4.1.2 · p. 13
4.1.1 Experimental Setup
- The experiments use Qwen-2.5 3B, 7B, and 32B backbones and evaluate predictions with binary LLM-as-Judge correctness assessments.The judge is Qwen-2.5-72B; comparisons include direct-inference models and tool-integrated or agent-framework baselines, using shared backbones where applicable.Source: §4.1.1 · pp. 11–13
4.1.2 Experimental Results
- AFM with Qwen-2.5-32B-Instruct achieves 55.3% on GAIA, 11.1% on BrowseComp, 63.0% on WebWalker, and 18.0% on HLE.The GAIA score is 2.1% above WebSailor and 3.8% above WebDancer; WebWalker exceeds WebThinker-RL (46.5%), WebDancer (47.9%), and WebShaper (51.4%), while HLE exceeds WebThinker-RL (15.8%) and WebDancer (7.2%).Source: Table 7 · p. 12, §4.1.2 · p. 13
- AFM reaches 55.3% on GAIA, approaching GPT-4.1-based OWL (55.8%) and OAgents (58.3%), while its 18.0% HLE score exceeds OWL, DeepSeek-R1, and QwQ-32B.AFM-7B-Instruct scores 15.6% on HLE, 0.2% below WebThinker-RL using QwQ-32B; the paper also reports that this 7B model surpasses other 32B tool-integrated methods across benchmarks.Source: §4.1.2 · p. 13
- With Qwen2.5-32B-Instruct, AFM-SFT scores 50.5% on GAIA, 61.5% on WebWalker, and 10.0% on BrowseComp, leading the compared methods on each reported benchmark.On GAIA it exceeds WebSailor-SFT-32B (46.6%), WebDancer-SFT-32B (35.0%), and WebShape-SFT-32B (44.6%); on WebWalker it exceeds WebShape-SFT-32B (44.6%), and on BrowseComp it exceeds WebSailor-SFT-32B (7.2%).Source: Table 8 · p. 13, §4.1.2 · pp. 13–14
- The authors attribute AFM’s multi-level GAIA performance to bidirectional search-and-code tool interaction and its knowledge-intensive results to distilling distributed collaboration into one model.They describe these as resolving the Tool Coordination Dilemma and Multi-Agent Transfer Dilemma, respectively.Source: §4.1.2 · p. 14
4.2.1 Experimental Setup
- The code-agent dataset combines code-generation, math, and mixed code-and-math sources; after trajectory synthesis and quality filtering, about 47,000 reasoning traces whose final answers pass unit tests or numerical verification are retained for SFT.Every code problem carries an average of at least 50 test cases, and the dataset spans common-to-contest-level programming and high-school-to-Olympiad mathematics.Source: §4.2.1 · p. 14
- The comparison includes text-only reasoning models and Qwen-2.5 7B/32B tool-integrated reasoning systems; Reveal alone was RL-trained on code-generation tasks.The text-only set includes Qwen2.5-Coder-Instruct, QwQ-32B-Preview, SimpRL-Zoo, and Eurus-2-PRIME; the tool-integrated set includes ToRL, SimpleTIR, ReTool, AutoTIR, ZTRL, Effective TIR, Reveal, and Verl-Tool.Source: §4.2.1 · p. 16
4.2.2 Experimental Results
- SFT gains 22.0% (7B) and 23.4% (32B) average accuracy over the base models, while RL adds 20.8% and 18%, respectively, over SFT.The passage attributes CoA reasoning capabilities—including planning, reflection, and tool calling—to multi-agent distillation, with RL consolidating and strengthening them.Source: §4.2.2 · p. 16
- RL-enhanced AFM gains 8.5% (7B) and 13.2% (32B) average accuracy over its backbones across three programming tasks, outperforming ReTool-32B and Reveal-32B.SFT-only AFM also surpasses these baselines on Live-CodeBenchV5; RL adds 1.8% (7B) and 3.2% (32B) over SFT.Source: §4.2.2 · pp. 16–17
- 64.3% (7B) and 78.0% (32B) average accuracy put AFM-RL 3.6% above SimpleTIR-7B-Multi and ReTool-32B, respectively, across five benchmarks.AFM-RL-32B also improves absolutely by 10.5% on AIME25 and 5.7% on OlympiadBench.Source: §4.2.2 · p. 16, Table 11 · p. 17
5 Analysis
Analysis finds that AFM uses fewer tools and tokens, code-agent training supports robust invocation of unseen tools under strict formats, and test-time scaling improves benchmark scores.
5.1 Computational Efficiency
- AFM uses the fewest tool calls and lowest overall and tool-call token consumption among the compared methods, with lower inference latency than methods other than OAgents.The analysis compares OAgents, WebThinker, and AFM on 10 randomly sampled GAIA instances; targeted filtering of irrelevant content is cited as reducing redundant token accumulation.Source: §5.1 · pp. 17–18, Figure 5 · p. 18
5.2 Generalization on Unseen Agents
- The code-agent model correctly orchestrates unseen Web search and Python tools on the first attempt, while the web-agent model usually fails strict invocation formats and aborts with parser errors.The code agent was trained on code and math tasks using a Python interpreter, whereas the web agent was trained only on search tasks using Web Search and Crawl Page.Source: §5.2 · pp. 18–19
- All models generalize strongly on conventional report-generation tasks, but under character-level tool-format constraints the web agent degrades while the code agent remains robust and completes tasks successfully.The contrast is attributed to the code agent’s training under strict code-formatting constraints.Source: §5.2 · p. 19
5.3 Agentic Test-Time Scaling
- GAIA Pass@3 reaches 69.9 for AFM, up 14.6 points from AFM’s 55.3; WebWalker reaches 78.7 versus AFM’s 63.0 and AFM-Bo3’s 64.7, while HLE reaches 33.2 versus AFM-Bo3’s 23.0.These results show gains across GAIA, WebWalker, and HLE.Source: Table 13 · p. 19, §5.3 · p. 20
- On GAIA, AFM scores 55.3 at Pass@1 versus SmolAgents’ 66.7, while AFM-Pass@3 scores 69.9 versus SmolAgents-Pass@3’s 73.9 and leads WebDancer-Pass@3 and WebSailor-Pass@3 by 16.8 and 6.8 points.AFM also scores 55.3 versus WebDancer’s 51.5 and matches WebSailor’s 53.2 at Pass@1.Source: Table 13 · p. 19, §5.3 · p. 20
- AFM-Bo3 raises GAIA’s average score from 55.3 to 57.3 and HLE from 18.0 to 23.0 compared with AFM.AFM-Bo3 selects the best of three candidate trajectories, with judgments by Qwen2.5-72B-Instruct; AFM-Pass@3 uses three attempts with one correct answer.Source: Table 13 · p. 19, §5.3 · pp. 19–20
6 Related Work
Related work advances multi-agent coordination, tool-integrated reasoning, and reinforcement learning, but identifies persistent limits in coordination, adaptability, and efficient multi-tool use. AFM aims to unify coordinated multi-tool reasoning without heavy manual engineering or explicit supervision.
6.1 Multi-Agent Systems
- Specialized multi-agent systems support distributed expertise, but pairwise coordination overhead and fragmented state limit synergies; CoA-related work addresses code-agent errors and analyzes coordination mechanisms.Examples include orchestrator-worker search, CodeSim plan verification, AgentCoder test generation [16], and OAgents module-level analyses [82].Source: §6.1 · p. 20
6.2 Tool-Integrated Reasoning
- CoT supports closed-world reasoning [62], but external-information needs expose out-of-scope knowledge risks; tool-integrated methods add tool-use loops yet struggle with dynamic selection and coordination.Static prompting includes IRCoT [57] and ReAct [68]; later work explores dynamic prompting [78], memory-augmented control [8], demonstration-based SFT [61] [70], and RL [21] [29] [65], which still face sparse rewards and weak multi-tool coordination.Source: §6.2 · pp. 20–21
6.3 Reinforcement Learning for Reasoning
- RL-based tool invocation enables adaptive execution [30] [43], while OTC optimizes correctness and tool efficiency and Tool-Star [5] explores hierarchical multi-tool rewards; AFM targets coordinated reasoning with less manual engineering.Prior approaches often remain focused on single tools, isolated reasoning-execution loops, costly annotations, or repeated tool calls.Source: §6.3 · p. 21
7 Conclusion
Chain-of-Agents supports end-to-end multi-agent problem-solving in native agent models, trained through multi-agent distillation and agentic reinforcement learning. The resulting models outperform existing tool-integrated-reasoning methods across several domains, and the work’s code and data are open-sourced.
7 Conclusion
- The resulting agent foundation models significantly outperform existing tool-integrated-reasoning methods across RAG-based, web, and code agents.The work reports this as an experimental result across various domains.Source: §7 · p. 21
- Chain-of-Agents enables native end-to-end multi-agent problem-solving and supports multi-agent systems that outperform ReAcT-like agents.The conclusion contrasts it with the tool-integrated-reasoning paradigm.Source: §7 · p. 21
- The approach combines multi-agent distillation for supervised training data with agentic reinforcement learning to optimize a series of agent foundation models.Source: §7 · p. 21
- The research’s training and evaluation code and data are open-sourced to facilitate future research on agent models and agentic reinforcement learning.Source: §7 · p. 21
8 Contributions
The section names the core contributors and assigns responsibility for web-agent, code-agent, data, and paper-writing work.
Core Contributors
- Core contributors are Weizhen Li, Jianbo Lin, Zhuosong Jiang, Jingyi Cao, Xinpeng Liu, Jiayu Zhang, Zhenqiang Huang, Qianben Chen, Weichen Sun, and Qiexiang Wang.Source: Core Contributors · p. 22
Project Responsibilities
- Web-agent work assigned SFT to Weizhen Li, Jingyi Cao, and Qianben Chen; RL to Weizhen Li, Jianbo Lin, and Chenghao Zhu; evaluation to Hongxuan Lu; and leadership to Weichen Sun.Source: Project Responsibilities · p. 22
- Code-agent work assigned RL to Zhuosong Jiang, SFT to Xinpeng Liu, evaluation to Zhenqiang Huang, and leadership to Qiexiang Wang.Source: Project Responsibilities · p. 22
- Data work assigned the agent paradigm to Jingyi Cao, data generation to Jiayu Zhang, and leadership to Qianben Chen.Source: Project Responsibilities · p. 22
- Paper writing was assigned to Qianben Chen, Qiexiang Wang, Weichen Sun, Tianrui Qin, and Shuying Fan.Source: Project Responsibilities · p. 22
A Tool Agents · A.1 Web Agent
The web agent combines search and page-crawling tools to retrieve information and return page summaries that support continued in-depth searching.
A.1 Web Agent
- The web agent uses two tool agents: web search and page crawling.Source: §A.1 · p. 28
- Google searches use Serpapi with model-generated queries and retrieve the top 10 results per query.Source: §A.1 · p. 28
- Each search result provides a title, snippet, and corresponding URL for subsequent analysis and decision-making.Source: §A.1 · p. 28
- The crawl agent uses model-generated URLs and Jina to retrieve page information, with URLs, search queries, and thinking content as configuration parameters.Source: §A.1 · p. 28
- Qwen2.5-72B-instruct summarizes each crawled page, and the agent concatenates those summaries into its returned result.Source: §A.1 · p. 28
- Requiring summaries to retain relevant URLs enables repeated use of the crawl agent for in-depth web searching.Source: §A.1 · p. 28
A.2 Code Agent
The code-agent sandbox uses nsjail to isolate Python execution, improve filesystem security, and enforce resource limits.
A.2 Code Agent
- The nsjail sandbox isolates Python execution, supports containerized environments, and limits AFM runs to 5 seconds of CPU time and 5 GB of memory.Namespace isolation mitigates unauthorized access to host resources.Source: §A.2 · p. 28
B Dynamics Analysis during RL Training of Code Agent
During RL training, the Code Agent’s AIME25 accuracy improved steadily after its context length was expanded from 16k to 32k at step 40. Mean critic rewards and average response length also increased across training.
B Dynamics Analysis during RL Training of Code Agent
- AIME25 accuracy improved steadily during RL training, with context length expanded from 16k to 32k at step 40 for stability.Figure 7c shows the accuracy trend.Source: B Dynamics Analysis during RL Training… · p. 28, Figure 7 · p. 28
- Mean critic rewards consistently increased during RL training, indicating progressive performance improvement and stable, effective DAPO training.Figure 7a presents the reward trend.Source: B Dynamics Analysis during RL Training… · p. 28, Figure 7 · p. 28
- Average response length consistently increased across training phases, suggesting the model learned more complex coding strategies and engaged in more tool interactions.Figure 7b presents the response-length trend.Source: Figure 7 · p. 28, B Dynamics Analysis during RL Training… · p. 29
C Case Study
The case studies trace AFM working through web-research, programming, and numerical problems, including both a correctly answered query and searches or solutions that remain unresolved or require revision. They show the agent reflecting on assumptions, debugging, and iteratively adjusting its approach.
Case Trajectory of AFM on Gaia
- For Gaia, the agent planned a sequence of searches to identify the APOD city, its namesake, a Chicago landmark, and the architectural firm.After identifying Marquette, it questioned its assumption that a Chicago landmark was named after Jacques Marquette and adjusted the plan to verify the connection.Source: C Case Study · pp. 29–30
- The Gaia trajectory identified Marquette, Michigan, as named for Jacques Marquette, linked it to Chicago’s Marquette Building, and answered “Holabird” for its designers, earning a score of 4.The firm was Holabird & Roche.Source: C Case Study · pp. 30–31
Case Trajectory of AFM on BrowseComp
- On BrowseComp, an initial broad search failed to identify the blog post or movie, and a subsequent search for anxiety-related films also returned irrelevant results.The reflection judged the search approach ineffective and its tool use and trajectory monitoring poor.Source: C Case Study · pp. 32–33
- The BrowseComp reflection proposed first identifying likely movies and then searching for matching eighth-grade blog posts before checking DVD Talk reviews.This was a proposed strategy; the supplied trajectory does not show it finding the requested post or reviewer.Source: C Case Study · p. 33
C Case Study
- The initial search strategy was judged ineffective because restrictive combined queries returned irrelevant results, prompting a shift to sequential searches for the movie and then the blog post.The revised approach first checked whether “Eighth Grade” was the movie, then planned to search for anonymous blog archives if it was not.Source: C Case Study · p. 33
- Crawls of generic LiveJournal, archive, and DVD Talk pages found no relevant blog post or reviewer information.The searches and crawls had not established the requested post date, movie, or DVD Talk reviewer name.Source: C Case Study · pp. 34, 36
- A final search returned a Hugging Face dataset described as mentioning an eighth-grade writer and anxiety attacks from a specific movie, but the supplied crawl excerpt does not reveal the answer.The target is the anonymous blogger’s first post date and the first and last name of a DVD Talk reviewer who reviewed the movie in February from 2000 to 2008.Source: C Case Study · p. 37
Web-research case study
- The anonymous blogger’s first post was dated October 23, 2011, and the DVD Talk reviewer for the mentioned movie was Scott Weinberg.The task analysis says the post and review met the specified date and content constraints.Source: C Case Study · pp. 37–38
CASE TRAJECTORY OF AFM ON LIVECODEBENCH V4
- The LiveCodeBench task requires reversing input strings into vertical output lines, padding missing characters with *, and ensuring no line ends with *.The construction plan fills an M-by-N matrix and trims trailing asterisks from each output row.Source: C Case Study · p. 38
- After the initial matrix output appeared in reverse order, the trajectory reversed the row order, producing the expected sample output.The corrected output was “fda geb h*c i.”Source: C Case Study · pp. 40, 42
- A second uneven-length test produced “wh *e *l *l *o,” which the trajectory judged consistent with the vertical-writing and no-trailing-asterisk rules.The explanation checks each line against the last-to-first character alignment and padding requirements.Source: C Case Study · p. 42
CASE TRAJECTORY OF AFM ON AIME2024
- The AIME2024 trajectory begins by defining walking speed and coffee-shop time, then setting up total-time equations for the two given speeds.It proceeds toward solving for the unknowns and calculating the total time at speed s + 1/2 km/h, but this excerpt supplies no final answer.Source: C Case Study · p. 43
C Case Study
- The initial calculation returned an impossible walking speed of −4.5 km/h and 360 minutes, so the trajectory selected the positive root and corrected the break to 24 minutes.The passage attributes the earlier discrepancy to a likely unit or algebraic entry mistake.Source: C Case Study · p. 44
- At 3.0 km/h, the walk plus coffee break takes 204 minutes, using a walking speed of 2.5 km/h and a 24-minute break.The recalculation checks the 24-minute break against both original conditions.Source: C Case Study · pp. 44–45
- Removing 6 cups of honey makes the remaining honey weigh less than an equal-volume gallon of mayonnaise.The calculation repeatedly subtracts one cup of honey until its remaining mass falls below the mayonnaise’s.Source: C Case Study · p. 46
D Prompts
The prompts specify task-specific procedures for web-page summarization, mathematical problem solving, code generation, and answer equivalence judging, including structured outputs and tool-assisted iterations.
D.1 Summary Prompt
- The summary prompt requires complete, query-relevant webpage extraction in three concise categories—query information, clues and ideas, and relevant links—or “No relevant information.”It also directs the model to preserve relevant links with descriptions and cover page text, tables, lists, and code blocks.Source: §D.1 · p. 47
D.2 Mathematical problem-solving Prompt
- The math prompt requires structured think, plan, code, observation, reflection, and answer functions, with optional sandbox Python for calculations, verification, testing, or visualization.The final response uses a boxed answer.Source: §D.2 · pp. 47–48
- Mathematical solutions must begin with one high-level plan, then follow plan, iterative think/code/observation/reflection cycles, think, and answer, keeping reflection distinct from think.The prompt restricts special function tokens to their designated functions and requires reflection to review code observations and mathematical validity.Source: §D.2 · pp. 47–48
D.3 Code generation Prompt
- The code-generation prompt asks for an expert Python solution, with think before code or answer and a single initial plan that decomposes the task into sequential subtasks.Planning should stay high-level, while the code should be minimal and single-responsibility and consider edge cases and scale.Source: §D.3 · p. 48
- Code outputs use either Python with embedded test inputs or Python plus shell input for stdin, and must include imports, debugging output or assertions, and no file operations.The prompt specifies the required code-fence formats and end marker.Source: §D.3 · p. 49
- Code solutions follow plan, iterative think/code/observation/reflection cycles, think, and answer; reflection checks results, bugs, edge cases, and performance before informing the next think.The final answer contains only essential, readable, well-commented solution code, without example usage or test cases.Source: §D.3 · p. 49
LLM-AS-JUDGE PROMPT.
- The judge prompt asks whether a prediction is semantically equivalent to the labeled answer despite differences in expression order, description format, or measurement units, and returns a rationale plus correct/incorrect judgment.The required output fields are rationale and judgement.Source: LLM-AS-JUDGE PROMPT · p. 50
D.5 Prompt for Agent Generalization Experiments · MULTI TOOL PROMPT
The multi-tool prompt defines a restricted set of reasoning, search, coding, and answer functions, with procedural rules for planning, tool use, verification, and final responses.
MULTI TOOL PROMPT
- The prompt permits only nine functions: think, plan, tool, observation, reflection, suggested_answer, double_check, code, and answer.It also lists web_search, crawl_page, and code as available tools.Source: MULTI TOOL PROMPT · p. 50
- Before using plan, tools, reflection, or answer functions, the model must use think to explain its next procedural step.Plans should break the question into fine-grained tool-executable subquestions and may be updated after reflection.Source: MULTI TOOL PROMPT · p. 50
- The model should search again when results are irrelevant, crawl relevant URLs for detail, and use web_search followed by crawl_page for deeper research.The prompt allows repeated tool calls to gather sufficient external knowledge.Source: MULTI TOOL PROMPT · p. 50
- For precise calculations, numerical analysis, statistical analysis, or mathematical operations, the prompt requires code-based verification before answering.Code must use Python delimiters, and print() must display the expected output.Source: MULTI TOOL PROMPT · p. 50
- Final answers should be concise, definite, accurate, and unambiguous, while special tags must not appear in free text.The prompt says to keep answers as concise as possible and avoid answering until sufficiently confident.Source: MULTI TOOL PROMPT · pp. 50–51
- The model must provide suggested_answer before answer and give the final answer only after double_check scores it at least 3; lower scores require replanning.Reflection may be used at any time, and poor scoring criteria call for replanning.Source: MULTI TOOL PROMPT · p. 50
Related papers
This paper cites
- DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning2025
- Let's Verify Step by Step2023
- HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answering2018
- HybridFlow: A Flexible and Efficient RLHF Framework2024
- MuSiQue: Multihop Questions via Single-hop Question Composition2021
- Measuring and Narrowing the Compositionality Gap in Language Models2022
Cited by
- Compositional RL: Evaluating and Training LLMs for Collaborative Reasoning2026
- Agentic Large Language Models2026
- COPC: Coupled Off-Policy Correction for Asynchronous LLM Reinforcement Learning2026
- Efficient Agentic Reasoning Through Self-Regulated Simulative Planning2026
- MetaAgent-X : Breaking the Ceiling of Automatic Multi-Agent Systems via End-to-End Reinforcement Learning2026
- Marco DeepResearch: Unlocking Efficient Deep Research Agents via Verification-Centric Design2026