一句话:提出自动提取代码浅层语义事实(如变量名、前后条件、数据流)来增强LLM提示,以改进代码摘要。
针对大语言模型(LLM)在代码摘要任务中依赖提示工程的问题,论文提出自动语义增强提示的方法。其直觉是开发者在阅读代码时会下意识地收集浅层语义事实,如参数与局部变量名、返回表达式、简单前后条件以及基本控制与数据流等。论文将这些从代码中自动提取的语义事实加入LLM提示,以提升代码摘要的质量。标题表明该方法面向代码摘要任务,但摘要未给出具体评估结果。
Large Language Models (LLM) are a new class of computation engines, "programmed" via prompt engineering. Researchers are still learning how to best "program" these LLMs to help developers. We start with the intuition that developers tend to consciously and unconsciously collect semantics facts, from the code, while working. Mostly these are shallow, simple facts arising from a quick read. For a function, such facts might include parameter and local variable names, return expressions, simple pre- and post-conditions, and basic control and data flow, etc.
@inproceedings{paperbot11436,
title = {Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)},
author = {Toufique Ahmed and Kunal Suresh Pai and Premkumar Devanbu and Earl Barr},
booktitle = {ICSE},
year = {2024},
doi = {10.1145/3597503.3639183}
}