mlsanityData to 7 Oct 2026

SRLCG: Self-Rectified Large-Scale Code Generation with Multidimensional Chain-of-Thought and Dynamic Backtracking

arXiv 2504.00532 ↗First posted 1 Apr 2025cs.SE cs.CLcited by 2

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

Abstract (arXiv)

Large language models (LLMs) have revolutionized code generation, significantly enhancing developer productivity. However, for a vast number of users with minimal coding knowledge, LLMs provide little support, as they primarily generate isolated code snippets rather than complete, large-scale project code. Without coding expertise, these users struggle to interpret, modify, and iteratively refine the outputs of LLMs, making it impossible to assemble a complete project. To address this issue, we propose Self-Rectified Large-Scale Code Generator (SRLCG), a framework that generates complete multi-file project code from a single prompt. SRLCG employs a novel multidimensional chain-of-thought (CoT) and self-rectification to guide LLMs in generating correct and robust code files, then integrates them into a complete and coherent project using our proposed dynamic backtracking algorithm. Experimental results show that SRLCG generates code 15x longer than DeepSeek-V3, 16x longer than GPT-4, and at least 10x longer than other leading CoT-based baselines. Furthermore, they confirm its improved correctness, robustness, and performance compared to baselines in large-scale code generation.

Key facts. Cited by 2 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 13 of its 33 references that are in the map. First posted on arXiv 1 Apr 2025.

Builds on

13 of 33 references.

Closest ancestors · 1

Same direction, newest first

  1. 2023CodeCoT: Tackling Code Syntax Errors in CoT Reasoning for Code Generation17 Aug

Other references · 12

  1. 2023GPT-4 Technical Reportcited by 18,132
  2. 2023A Survey of Large Language Modelscited by 2,537
  3. 2024DeepSeek-V3 Technical Reportcited by 724
  4. 2023Self-Edit: Fault-Aware Code Editor for Code Generationcited by 110
  5. 2024Chain of Thoughtlessness? An Analysis of CoT in Planningcited by 100
  6. 2024CodeHalu: Investigating Code Hallucinations in LLMs via Execution-based Verificationcited by 32
  7. 2024History, Development, and Principles of Large Language Models-An Introductory Surveycited by 30
  8. 2024Towards Understanding the Characteristics of Code Generation Errors Made by Large Language Modelscited by 28
  9. 2024Structured Chain-of-Thought Prompting for Few-Shot Generation of Content-Grounded QA Conversationscited by 9
  10. 2024Evaluating Consistency and Reasoning Capabilities of Large Language Modelscited by 7
  11. 2025Large Language Model Guided Self-Debugging Code Generationcited by 7
  12. 2024Fixing Function-Level Code Generation Errors for Foundation Large Language Modelscited by 4

Built on by

Cited by year

Citing papers per year: 2025: 2.

2 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024An Empirical Study on Self-correcting Large Language Models for Data Science Code Generation
  2. 2024DevEval: A Manually-Annotated Code Generation Benchmark Aligned with Real-World Code Repositories
  3. 2025MRG-Bench: Evaluating and Exploring the Requirements of Context for Repository-Level Code Generation
  4. 2023Self-planning Code Generation with Large Language Models
  5. 2025Towards Advancing Code Generation with Large Language Models: A Research Roadmap
  6. 2025FastCoder: Accelerating Repository-level Code Generation via Efficient Retrieval and Verification
  7. 2024CodeLutra: Boosting LLM Code Generation via Preference-Guided Refinement
  8. 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approaches