通过交替生成主代码与依赖,实现大规模代码项目的高效递归生成。
See-Saw Generative Mechanism for Scalable Recursive Code Generation with Generative AI
- 主代码与依赖交替生成,动态保持同步
- 支持数百个互依赖文件的生成,降低计算开销
- 适合需要复杂依赖管理的大规模代码生成场景
使用生成式AI模型生成复杂、大规模代码项目时,受限于上下文长度、依赖关系管理及迭代优化需求。本文提出一种新的看板(See-Saw)生成机制,通过在主代码更新与依赖生成之间交替进行,确保代码组件的一致性与功能性。该方法动态优化令牌使用,并将主代码关键元素融入依赖生成过程,从而支持包含数百个相互依赖文件的项目高效、可扩展生成。实验验证表明,该机制能有效管理依赖关系,维持代码连贯性,同时显著降低计算开销。
原文摘要 · Abstract (English)
The generation of complex, large-scale code projects using generative AI models presents challenges due to token limitations, dependency management, and iterative refinement requirements. This paper introduces the See-Saw generative mechanism, a novel methodology for dynamic and recursive code generation. The proposed approach alternates between main code updates and dependency generation to ensure alignment and functionality. By dynamically optimizing token usage and incorporating key elements of the main code into the generation of dependencies, the method enables efficient and scalable code generation for projects requiring hundreds of interdependent files. The mechanism ensures that all code components are synchronized and functional, enabling scalable and efficient project generation. Experimental validation demonstrates the method's capability to manage dependencies effectively while maintaining coherence and minimizing computational overhead.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。