使用ChatGPT等大语言模型(LLM)从自然语言生成代码看似具有突破性,但随着更广泛的应用,这种方法的局限性也逐渐显现:自然语言固有的模糊性给复杂软件设计带来了挑战。为此,本研究提出一种敏捷模型驱动开发(MDD)方法,借助OpenAI的GPT-4提升代码自动生成效果。本研究的核心贡献在于为现有MDD方法注入“敏捷性”,尤其适用于模型需要变更或需部署到不同编程语言的场景。\n我们通过一个无人车队多智能体仿真系统的案例研究展开验证。在方法的第一层和第二层,我们使用统一建模语言(Unified Model Language, UML)图构建了案例研究的文本化表示。在接下来的层级中,我们引入两组约束以降低模型的模糊性:对象约束语言(Object Constraints Language, OCL)用于细化代码构建细节,FIPA本体则用于规范通信语义与协议。最终,在最后一层借助GPT-4自动生成Java和Python两种语言的代码:Java代码部署于JADE框架中,Python代码部署于PADE框架中。\n研究最后我们对生成的代码进行了全面评估:从行为层面看,自动生成的代码与预期的UML序列图完全一致;从结构层面看,我们对比了仅受OCL约束的UML图生成的代码,与同时受OCL和FIPA本体约束的UML图生成的代码的复杂度。结果表明,受本体约束的模型生成的代码本质上更复杂,但仍处于可管理的范围,对后续测试和维护而言风险较低。
英文摘要:
Generating code from a natural language using Large Language Models (LLMs) such as ChatGPT, seems groundbreaking. Yet, with more extensive use, it's evident that this approach has its own limitations. The inherent ambiguity of natural language presents challenges for complex software designs. Accordingly, our research offers an Agile Model-Driven Development (MDD) approach that enhances code auto-generation using OpenAI's GPT-4. Our work emphasizes "Agility" as a significant contribution to the current MDD method, particularly when the model undergoes changes or needs deployment in a different programming language. Thus, we present a case-study showcasing a multi-agent simulation system of an Unmanned Vehicle Fleet. In the first and second layer of our approach, we constructed a textual representation of the case-study using Unified Model Language (UML) diagrams. In the next layer, we introduced two sets of constraints that minimize model ambiguity. Object Constraints Language (OCL) is applied to fine-tune the code constructions details, while FIPA ontology is used to shape communication semantics and protocols. Ultimately, leveraging GPT-4, our last layer auto-generates code in both Java and Python. The Java code is deployed within the JADE framework, while the Python code is deployed in PADE framework. Concluding our research, we engaged in a comprehensive evaluation of the generated code. From a behavioural standpoint, the auto-generated code aligned perfectly with the expected UML sequence diagram. Structurally, we compared the complexity of code derived from UML diagrams constrained solely by OCL to that influenced by both OCL and FIPA-ontology. Results indicate that ontology-constrained model produce inherently more intricate code, but it remains manageable and low-risk for further testing and maintenance.
Demonstration of DB-GPT: Next Generation Data Interaction System Empowered by Large Language Models
Ant Group(蚂蚁集团);Alibaba Group(阿里巴巴集团);JD Group(京东集团);Meituan(美团);Southwestern University of Finance and Economics(西南财经大学);Simon Fraser University(西蒙菲莎大学)
MC-GPT: Empowering Vision-and-Language Navigation with Memory Map and Reasoning Chains
School of Intelligent Systems Engineering, Shenzhen Campus of Sun Yat-sen University(中山大学深圳校区智能系统工程学院);School of Computer Science and Engineering(计算机科学与工程学院)
针对基于LLM的VLN方法记忆构建不足、策略单一的问题,本文提出MC-GPT,通过拓扑记忆地图、Navigation Chain of Thoughts及集成流水线增强导航与推理可解释性。
WizardMath: Empowering Mathematical Reasoning for Large Language Models via Reinforced Evol-Instruct
Shenzhen International Graduate School, Tsinghua University(清华大学深圳国际研究生院);Microsoft Corporation(微软公司);Shenzhen Institute of Advanced Technology, Chinese Academy of Sciences(中国科学院深圳先进技术研究院)
WizardMath 通过 RLEIF 方法在不依赖外部 Python 工具的情况下提升大语言模型的数学推理能力,在 GSM8k 和 MATH 基准上超越多个顶级开源及商用模型。
Comprehensive Evaluation and Insights into the Use of Large Language Models in the Automation of Behavior-Driven Development Acceptance Test Formulation
Empowering the Deaf and Hard of Hearing Community: Enhancing Video Captions Using Large Language Models
Analytic Computing, Institute for Artificial Intelligence, University of Stuttgart(分析计算中心、人工智能研究所、斯图加特大学);University of Stuttgart(斯图加特大学);University of Southampton(南安普顿大学)
Can Large Language Models Bridge the Gap in Environmental Knowledge?
Zayed University(扎耶德大学);Mohamed bin Zayed University of Artificial Intelligence(穆罕默德·本·扎耶德人工智能大学);Canadian University Dubai(迪拜加拿大大学);Marmara University(马尔马拉大学)
LUK: Empowering Log Understanding with Expert Knowledge from Large Language Models
School of Computer Science, Fudan University(复旦大学计算机科学学院);School of Artificial Intelligence, Optics and Electronics (iOPEN), Northwestern Polytechnical University(西北工业大学人工智能、光学与电子学院);School of Computer Science and Technology, Donghua University(东华大学计算机科学与技术学院)
CodeV: Empowering LLMs with HDL Generation through Multi-Level Summarization
State Key Lab of Processors, Institute of Computing Technology, Chinese Academy of Sciences(中国科学院计算技术研究所处理器重点实验室);University of Chinese Academy of Sciences(中国科学院大学);Cambricon Technologies(寒武科技);School of Information Science and Technology, ShanghaiTech University(上海科技大学信息科学与技术学院);University of Science and Technology of China(中国科学技术大学);Shanghai Innovation Center for Processor Technologies(上海处理器技术创新中心)
EdgeMoE: Empowering Sparse Large Language Models on Mobile Devices
Beijing University of Posts and Telecommunications(北京邮电大学);University of Electronic Science and Technology of China(电子科技大学);Zhongguangcun Laboratory(中关村实验室)
Large Language Models as Master Key: Unlocking the Secrets of Materials Science with GPT
University of New South Wales(新南威尔士大学);GreenDynamics Pty. Ltd(绿动力私人有限公司);City University of Hong Kong(香港城市大学);University of Sydney(悉尼大学);DARE ARC Training Centre in Data Analytics for Resources and Environments(DARE ARC资源与环境数据分析培训中心)
PointLLM: Empowering Large Language Models to Understand Point Clouds
The Chinese University of Hong Kong(香港中文大学);Shanghai AI Laboratory(上海人工智能实验室);Zhejiang University(浙江大学);Centre for Perceptual and Interactive Intelligence(感知与交互智能中心)
Automated Proof Generation for Rust Code via Self-Evolution
Peking University(北京大学);Microsoft Research(微软研究院);University of Illinois at Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Columbia University(哥伦比亚大学);University of California Irvine(加州大学 Irvine 分校)
TRUSTVIS: A Multi-Dimensional Trustworthiness Evaluation Framework for Large Language Models
University of Alberta(阿尔伯塔大学);Mila - Quebec Artificial Intelligence Institute(魁北克人工智能研究所);The University of Tokyo(东京大学);Macau University of Science and Technology(澳门科学技术大学)
Recommender Systems in the Era of Large Language Models (LLMs)
The Hong Kong Polytechnic University(香港理工大学);National University of Defense Technology(国防科技大学);Michigan State University(密歇根州立大学);Amazon(亚马逊);City University of Hong Kong(香港城市大学)