mlsanityData to 7 Oct 2026

MaCTG: Multi-Agent Collaborative Thought Graph for Automatic Programming

arXiv 2410.19245 ↗First posted 25 Oct 2024cs.SE cs.CV cs.MAcited by 3

On the map: LLM reasoning → Reasoning for agents, planning and code

also in 1 more
Abstract (arXiv)

With the rapid advancement of Large Language Models (LLMs), LLM-based approaches have demonstrated strong problem-solving capabilities across various domains. However, in automatic programming, a single LLM is typically limited to function-level code generation, while multi-agent systems composed of multiple LLMs often suffer from inefficient task planning. This lack of structured coordination can lead to cascading hallucinations, where accumulated errors across agents result in suboptimal workflows and excessive computational costs. To overcome these challenges, we introduce MaCTG (Multi-Agent Collaborative Thought Graph), a novel multi-agent framework that employs a dynamic graph structure to facilitate precise task allocation and controlled collaboration among LLM agents. MaCTG autonomously assigns agent roles based on programming requirements, dynamically refines task distribution through context-aware adjustments, and systematically verifies and integrates project-level code, effectively reducing hallucination errors and improving overall accuracy. MaCTG enhances cost-effectiveness by implementing a hybrid LLM deployment, where proprietary models handle complex reasoning, while open-source models are used for routine coding and validation tasks. To evaluate MaCTG's effectiveness, we applied it to traditional image processing auto-programming tasks, achieving a state-of-the-art accuracy of 83.33%. Additionally, by leveraging its hybrid LLM configuration, MaCTG significantly reduced operational costs by 89.09% compared to existing multi-agent frameworks, demonstrating its efficiency, scalability, and real-world applicability.

Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 20 of its 53 references that are in the map. First posted on arXiv 25 Oct 2024.

Builds on

20 of 53 references.

References · 20

  1. 2023GPT-4 Technical Reportcited by 18,132
  2. 2024The Llama 3 Herd of Modelscited by 14,192
  3. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
  4. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  5. 2021Program Synthesis with Large Language Modelscited by 3,509
  6. 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,155
  7. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  8. 2023MetaGPT: Meta Programming for A Multi-Agent Collaborative Frameworkcited by 1,761
  9. 2023The Rise and Potential of Large Language Model Based Agents: A Surveycited by 1,422
  10. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  11. 2023StarCoder: may the source be with you!cited by 790
  12. 2024A Survey on Large Language Models for Code Generationcited by 646
8 more
  1. 2022CodeT: Code Generation with Generated Testscited by 369
  2. 2024CodeAgent: Enhancing Code Generation with Tool-Integrated Agent Systems for Real-World Repo-level Coding Challengescited by 278
  3. 2023Planning with Large Language Models for Code Generationcited by 179
  4. 2023OpenAgents: An Open Platform for Language Agents in the Wildcited by 136
  5. 2023ToolCoder: Teach Code Generation Models to use API search toolscited by 37
  6. 2023AgentCoder: Multi-Agent-based Code Generation with Iterative Testing and Optimisationcited by 31
  7. 2017A Syntactic Neural Model for General-Purpose Code Generationcited by 2
  8. 2024Towards Large Language Model Aided Program Refinementcited by 2

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 2; 2026: 1.

3 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025AutoMisty: A Multi-Agent LLM Framework for Automated Code Generation in the Misty Social Robot
  2. 2025Enhancing LLM Performance Through Debate: An Empirical Study on Multi-Agent Debate for Coding Tasks
  3. 2026DHCG: Dynamic Construction of Hierarchical Collaboration Graphs for LLM-Based Multi-Agent Reasoning
  4. 2025MARS: toward more efficient multi-agent collaboration for LLM reasoning
  5. 2025MapCoder-Lite: Distilling Multi-Agent Coding into a Single Small LLM
  6. 2026MASFactory: A Graph-centric Framework for Orchestrating LLM-Based Multi-Agent Systems with Vibe Graphing
  7. 2023A Dynamic LLM-Powered Agent Network for Task-Oriented Agent Collaboration
  8. 2026Developing LLM-based Multi-Agent Systems in Software Engineering: A Mixed-Method Experience Report