arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.16929cs.SEcs.AIcs.CLcs.PL
收藏

LangGPT:从编程语言视角重新思考面向大语言模型的结构化可复用提示设计框架

LangGPT: Rethinking Structured Reusable Prompt Design Framework for LLMs from the Programming Language

Northeastern University(东北大学);Wuhan University(武汉大学);Zhejiang University(浙江大学);Shenyang Aerospace University(沈阳航空航天大学)
Ming Wang, Yuanzhong Liu, Xiaoyu Liang, Songlian Li, Yijie Huang, Xiaoming Zhang, Sijia Shen, Chaofeng Guan, Daling Wang, Shi Feng, Huaiwen Zhang, Yifei Zhang, … 展开作者

Ming Wang, Yuanzhong Liu, Xiaoyu Liang, Songlian Li, Yijie Huang, Xiaoming Zhang, Sijia Shen, Chaofeng Guan, Daling Wang, Shi Feng, Huaiwen Zhang, Yifei Zhang, Minghui Zheng, Chi Zhang

AI总结:

本文提出受编程语言启发的双层提示设计框架 LangGPT,通过规范化结构和扩展机制降低提示设计成本并提升复用性,实验和用户调查验证其能显著改善大语言模型表现。

摘要:

大语言模型(LLMs)已在多个领域展现出优异性能。然而,对于非人工智能专家而言,构建高质量提示以熟练地指导大语言模型仍是一项挑战。现有提示工程研究提出的优化原则较为零散,所设计的提示优化器也大多依赖经验。遗憾的是,这些工作缺乏结构化的设计模板,导致学习成本较高且可复用性较低。此外,这也不利于提示的迭代更新。受结构化可复用编程语言的启发,我们提出了 LangGPT,一个作为大语言模型编程语言的双层提示设计框架。LangGPT 具有易于学习的规范结构,并提供用于迁移和复用的扩展结构。实验表明,LangGPT 显著提升了大语言模型的性能。此外,案例研究显示,LangGPT 能引导大语言模型生成更高质量的回复。进一步地,我们通过在线社区中的用户调查分析了 LangGPT 的易用性和可复用性。

英文摘要:

LLMs have demonstrated commendable performance across diverse domains. Nevertheless, formulating high-quality prompts to instruct LLMs proficiently poses a challenge for non-AI experts. Existing research in prompt engineering suggests somewhat scattered optimization principles and designs empirically dependent prompt optimizers. Unfortunately, these endeavors lack a structured design template, incurring high learning costs and resulting in low reusability. In addition, it is not conducive to the iterative updating of prompts. Inspired by structured reusable programming languages, we propose LangGPT, a dual-layer prompt design framework as the programming language for LLMs. LangGPT has an easy-to-learn normative structure and provides an extended structure for migration and reuse. Experiments illustrate that LangGPT significantly enhances the performance of LLMs. Moreover, the case study shows that LangGPT leads LLMs to generate higher-quality responses. Furthermore, we analyzed the ease of use and reusability of LangGPT through a user survey in our online community.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑