arXiv:2411.08932cs.SEcs.AI2024-11被引 2

PyGen让非程序员也能一键生成可运行的Python工具包。

PyGen: A Collaborative Human-AI Approach to Python Package Creation

  • 用大模型自动解析用户需求,生成完整代码、文档和包结构。
  • 生成的包经人工与模型评估,模块化程度高且文档完整。
  • 适合科研人员、开发者快速实现创意,降低编程门槛。

自动化与创新是现代科技发展的基石。本文提出PyGen,一个赋能研究者、技术人员和爱好者的自动化平台,将抽象想法转化为可用的Python软件工具。PyGen利用自回归大语言模型增强人类在构思、迭代与创新中的创造力,结合前沿开源代码生成技术,显著减少工具开发的手动负担。用户输入提示后,PyGen可自动完成从概念到包生成及文档编写的全流程。实验表明,PyGen大幅提升研究者生产力,生成的包具备强健性、模块化与良好文档。我们采用提示优化策略,将模糊描述转化为具体可执行指令。通过人工评估、基于LLM的评价及CodeBLEU指标对生成结果进行验证,结果详列于正文。同时分析了局限性并提出改进策略。PyGen体现伦理化自动化愿景,倡导包容性、可访问性与协作开发。该项目开启了智能体与人类协同推动科技进步的大规模探索。代码与示例已开源:https://github.com/GitsSaikat/Pygen。

原文摘要 · Abstract (English)

The principles of automation and innovation serve as foundational elements for advancement in contemporary science and technology. Here, we introduce Pygen, an automation platform designed to empower researchers, technologists, and hobbyists to bring abstract ideas to life as core, usable software tools written in Python. Pygen leverages the immense power of autoregressive large language models to augment human creativity during the ideation, iteration, and innovation process. By combining state-of-the-art language models with open-source code generation technologies, Pygen has significantly reduced the manual overhead of tool development. From a user prompt, Pygen automatically generates Python packages for a complete workflow from concept to package generation and documentation. The findings of our work show that Pygen considerably enhances the researcher's productivity by enabling the creation of resilient, modular, and well-documented packages for various specialized purposes. We employ a prompt enhancement approach to distill the user's package description into increasingly specific and actionable. While being inherently an open-ended task, we have evaluated the generated packages and the documentation using Human Evaluation, LLM-based evaluation, and CodeBLEU, with detailed results in the results section. Furthermore, we documented our results, analyzed the limitations, and suggested strategies to alleviate them. Pygen is our vision of ethical automation, a framework that promotes inclusivity, accessibility, and collaborative development. This project marks the beginning of a large-scale effort towards creating tools where intelligent agents collaborate with humans to improve scientific and technological development substantially. Our code and generated examples are open-sourced at [https://github.com/GitsSaikat/Pygen]

自动化AI编程开源工具

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。