Skip to content
Book Open access

Aligning User Requirement with Large Language Model in Code Generation

Oct 2026 · Proceedings of the 41st IEEE/ACM International Conference on Automated Software Engineering · pp. 2422-2434 · 0 citations · 47 references

TL;DR

REA-Coder is proposed, a requirement alignment approach to enhance the code generation performance of LLMs that outperforms all advanced baselines on four LLMs across five programming benchmarks.

Abstract

Code generation refers to automatically producing executable programs from user requirements. Recently, researchers have explored approaches to enhance the correctness of generated code with advanced large language models. Although achieving improvements, existing approaches focus on designing reasoning strategies or post-refinement methods to enhance code generation performance. Despite their differences, all these methods share a common assumption: the LLM can correctly understand the given requirement. However, this assumption does not always hold. To fill this gap, we propose REA-Coder, a requirement alignment approach to enhance the code generation performance of LLMs. REA-Coder involves first identifying the requirement content that does not align with LLMs and aligning the requirements. Then, based on the aligned requirements, LLMs generate code and further verify whether the generated code aligns with the requirements, iterating this process of requirement alignment and code generation until generating correct code or achieving the maximum number of iterations. Experimental results show that REA-Coder outperforms all advanced baselines on four LLMs across five programming benchmarks. Concretely, REA-Coder achieves average improvements of 7.93%, 30.25%, 26.75%, 8.59%, and 8.15% on the five benchmarks, demonstrating the effectiveness of requirement alignment for improving the code generation performance of LLMs.

Read PDF

Similar papers

Book Open access Oct 2026

Code Generation Beyond Mainstream Languages

Large Language Models (LLMs) have transformed software engineering through automated code generation, yet their performance varies widely across target languages, specifically between mainstream (e.g., Python) and niche languages (e.g., OCL). Key challenges are determining which LLMs and prompting techniques can most e...

David Delgado · 0 citations
Open access Oct 2026

LLM See, LLM Do: Enhancing Repository-Aware Code Generation in LLMs Through Logical Context and Usage Knowledge

Large language models (LLMs) have significantly advanced automatic code generation. Although they have demonstrated remarkable ability in writing standalone code, they still struggle with real-world repository-level coding tasks due to the lack of repository-specific knowledge. Existing studies typically employ retriev...

Tanghaoran Zhang, Xin-Jun Mao, Yu-Xin Zhao et al. · 0 citations
Preprint Nov 2026

SPARK: Semantic-preserving Prompt Mutation for Code Generation using Consensus-based Verification Framework

Automated code generation with large language models (LLMs) has improved in recent years. With the lack of test cases in real-world usages, generated code is not automatically verifiable and often requires manual validation. Previous studies have leveraged consensus verification, where code solutions and corresponding...

Alireza Daghigh, Chung-Yu Wang, Luca Filippelli et al. · 0 citations
Review Oct 2026

PreMaQ: Predicting Maintainability-Related Quality of LLM-Generated Code Before Generation

As large language models (LLMs) become increasingly capable of code generation, adopting generated code in software development requires assessing not only its functional correctness but also its maintainability-related quality. If such quality could be estimated before generation, developers could avoid the cost of ge...

Taiki Wakamatsu, Yuta Ishimoto, Masanari Kondo et al. · 0 citations
Preprint Sep 2026

Understanding and Mitigating Library-Related Issues in LLM-Generated Code

Software practitioners increasingly rely on Large Language Models (LLMs) to generate code that integrates external libraries. However, LLMs often produce incorrect library usage, such as invalid imports, outdated API calls, and hallucinated dependencies, leading to compilation or runtime failures that reduce the reliab...

Yacine Majdoub, Rinad Hamid, Eya Ben Charrada et al. · 0 citations

Exploring Data-Efficient Adaptation of Large Language Models for Code Generation

A novel adaptation approach named DEED, which stands for D ata-E fficient adaptation with E rror-D riven learning for code generation, leverages the errors made by LLMs as learning opportunities, using error revision to overcome their own shortcomings, thus achieving efficient learning.

Xue Jiang, Zhiyuan Fan Zhi Jin YIHONG DONG, Wen-Pin Jiao et al. · 1 citation

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.