Guided Code Generation with LLMs: A Multi-Agent Framework for Complex Code Tasks

Amr Almorsi, Mohanned Ahmed, Walid Gomaa
1/11/2025
cs.AI

No confident code implementation found for this paper. 5 possible matches can be shown below.

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 code generation can significantly enhance the practical utility of LLMs in software development while overcoming their inherent limitations in compositional reasoning and context handling.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 5 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{almorsi2025guided,
  title  = {Guided Code Generation with LLMs: A Multi-Agent Framework for Complex Code Tasks},
  author = {Amr Almorsi and Mohanned Ahmed and Walid Gomaa},
  year   = {2025},
  eprint = {2501.06625},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2501.06625v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2501.06625.svg)](https://codeofpaper.com/paper/2501.06625)

Discussion