Guided Code Generation with LLMs: A Multi-Agent Framework for Complex Code Tasks
On the map: LLM reasoning → Reasoning for agents, planning and code
also in 1 more
Abstract (arXiv)
Large Language Models (LLMs) have shown remarkable capabilities in code generation tasks, yet they face significant limitations in handling complex, long-context programming challenges and demonstrating complex compositional reasoning abilities. This paper introduces a novel agentic framework for ``guided code generation'' that tries to address these limitations through a deliberately structured, fine-grained approach to code generation tasks. Our framework leverages LLMs' strengths as fuzzy searchers and approximate information retrievers while mitigating their weaknesses in long sequential reasoning and long-context understanding. Empirical evaluation using OpenAI's HumanEval benchmark with Meta's Llama 3.1 8B model (int4 precision) demonstrates a 23.79% improvement in solution accuracy compared to direct one-shot generation. Our results indicate that structured, guided approaches to code generation can significantly enhance the practical utility of LLMs in software development while overcoming their inherent limitations in compositional reasoning and context handling.
Key facts. Cited by 8 papers in the map (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 11 of its 11 references that are in the map. First posted on arXiv 11 Jan 2025.
Builds on
11 of 11 references.
References · 11
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2022GLM-130B: An Open Bilingual Pre-trained Modelcited by 843
- 2024LongRoPE: Extending LLM Context Window Beyond 2 Million Tokenscited by 313
- 2023Effective Long-Context Scaling of Foundation Modelscited by 303
- 2024Long-context LLMs Struggle with Long In-context Learningcited by 286
- 2024Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attentioncited by 200
- 2024Multimodal Needle in a Haystack: Benchmarking Long-Context Capability of Multimodal Large Language Modelscited by 55
- 2024Do Large Language Models Have Compositional Ability? An Investigation into Limitations and Scalabilitycited by 40
- 2024Hermes 3 Technical Reportcited by 34
- 2021OpenHands: Making Sign Language Recognition Accessible with Pose-based Pretrained Models across Languagescited by 31
Built on by
Citing papers per year: 2025: 7; 2026: 1.
8 papers.
- 2025Vibe Coding vs. Agentic Coding: Fundamentals and Practical Implications of Agentic AIcited by 42
- 2025RPG: A Repository Planning Graph for Unified and Scalable Codebase Generationcited by 19
- 2025Optimizing Prompt Sequences using Monte Carlo Tree Search for LLM-Based Optimizationcited by 9
- 2025Position: Foundation Models for Tabular Data within Systemic Contexts Need Groundingcited by 6
- 2025MultiFileTest: A Multi-File-Level LLM Unit Test Generation Benchmark and Impact of Error Fixing Mechanismscited by 4
- 2025Analyzing Code Injection Attacks on LLM-based Multi-Agent Systems in Software Developmentcited by 2
- 2026RefEvo: Agentic Design with Co-Evolutionary Verification for Agile Reference Model Generationcited by 1
- 2025Lifecycle-Aware code generation: Leveraging Software Engineering Phases in LLMscited by 0
- 2026RefEvo: Agentic Design with Co-Evolutionary Verification for Agile Reference Model Generation27 Apr 2026
- 2025Analyzing Code Injection Attacks on LLM-based Multi-Agent Systems in Software Development26 Dec 2025
- 2025Lifecycle-Aware code generation: Leveraging Software Engineering Phases in LLMs28 Oct 2025
- 2025RPG: A Repository Planning Graph for Unified and Scalable Codebase Generation19 Sep 2025
- 2025Optimizing Prompt Sequences using Monte Carlo Tree Search for LLM-Based Optimization8 Aug 2025
- 2025Position: Foundation Models for Tabular Data within Systemic Contexts Need Grounding26 May 2025
- 2025Vibe Coding vs. Agentic Coding: Fundamentals and Practical Implications of Agentic AI26 May 2025
- 2025MultiFileTest: A Multi-File-Level LLM Unit Test Generation Benchmark and Impact of Error Fixing Mechanisms10 Feb 2025
Similar, not cited
Close in wording, no citation either way
- 2025A Survey on Code Generation with LLM-based Agents
- 2025CodeCoR: An LLM-Based Self-Reflective Multi-Agent Framework for Code Generation
- 2025CodeVisionary: An Agent-based Framework for Evaluating Large Language Models in Code Generation
- 2026LLM-Based Multi-Agent Systems for Code Generation: A Multi-Vocal Literature Review
- 2025Enhancing LLM Code Generation: A Systematic Evaluation of Multi-Agent Collaboration and Runtime Debugging for Improved Accuracy, Reliability, and Latency
- 2025Towards Advancing Code Generation with Large Language Models: A Research Roadmap
- 2025AdaCoder: An Adaptive Planning and Multi-Agent Framework for Function-Level Code Generation
- 2024Self-Organized Agents: A LLM Multi-Agent Framework toward Ultra Large-Scale Code Generation and Optimization