一句话:提出多目标提示框架并实现为 VS Code 插件,自动学习开发者提示意图并补全关键词,提升 LLM 生成安全规范代码的一致性。
大语言模型的代码生成表现高度依赖输入提示的精细与完备程度,而人工反复迭代提示既增加学习成本,也直接影响解决方案的交付周期与成本,用户熟练度与提示完备性之间存在明显权衡。本文设计了一种新颖的多目标提示优化方案,并以 Visual Studio Code IDE 插件的形式实现:该方案通过学习底层提示意图,自动补充关键词以增强提示,使其与开发者在编写安全代码时所遵循的语义集合对齐,从而覆盖参数与局部变量命名、返回表达式、简单的前置与后置条件,以及基本控制流与数据流等要素。论文重点在于插件形式的工具设计与实现,用以缓解提示学习曲线与提示完备性之间的权衡;摘要未给出量化评估或对比实验数据。
Recent breakthroughs in Large Language Models (LLM), comprised of billions of parameters, have achieved the ability to unveil exceptional insight into a wide range of Natural Language Processing (NLP) tasks. The onus of the performance of these models lies in the sophistication and completeness of the input prompt. Minimizing the enhancement cycles of prompt with improvised keywords becomes critically important as it directly affects the time to market and cost of the developing solution. However, this process inevitably has a trade-off between the learning curve/proficiency of the user and completeness of the prompt, as generating such a solutions is an incremental process. In this paper, we have designed a novel solution and implemented it in the form of a plugin for Visual Studio Code IDE, which can optimize this trade-off, by learning the underlying prompt intent to enhance with keywords. This will tend to align with developers' collection of semantics while developing a secure code, ensuring parameter and local variable names, return expressions, simple pre and post-conditions. and basic control and data flow are met.
@inproceedings{PhokelaSSDSK23,
title = {Smart Prompt Advisor: Multi-Objective Prompt Framework for Consistency and Best Practices},
author = {Kanchanjot Kaur Phokela and Samarth Sikand and Kapil Singi and Kuntal Dey and Vibhu Saujanya Sharma and Vikrant Kaulgud},
booktitle = {ASE},
year = {2023},
doi = {10.1109/ase56229.2023.00019}
}