Guided Code Generation with LLMs: A Multi-Agent Framework for Complex Code Tasks
Amr Almorsi, Mohanned Ahmed, Walid Gomaa

TL;DR
This paper presents a multi-agent framework for guided code generation using LLMs, significantly improving accuracy on complex tasks by structuring the generation process and leveraging LLMs' strengths.
Contribution
Introduces a novel agentic framework that enhances code generation by structuring tasks and guiding LLMs, addressing their limitations in reasoning and long-context understanding.
Findings
23.79% improvement in solution accuracy on HumanEval benchmark
Framework leverages LLMs as fuzzy searchers and information retrievers
Significantly enhances practical utility of LLMs in software development
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTopic Modeling · Software Engineering Research · Text Readability and Simplification
MethodsLLaMA
