paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)

语言模型提示的自动语义增强(用于代码摘要)
ICSE Proceedings of the IEEE/ACM 46th International Conference on Software Engineering2024匹配度 3/10 · 该论文利用代码浅层语义事实增强LLM提示以改进代码摘要,属于LLM/提示工程与软件工程交叉,而非用户核心关注的“静态分析用于ML/Agent系统”或“LLM/Agent改进静态分析与形式化验证”。它虽涉及程序分析事实,但目标是代码摘要,与浮点程序分析、贝叶斯程序分析及Agentic程序静态分析均无明显直接关系。引用 89 inbox
Toufique Ahmed, Kunal Suresh Pai, Premkumar Devanbu, Earl Barr
crossref: 2026-09-12

AI 速览

一句话:提出自动提取代码浅层语义事实(如变量名、前后条件、数据流)来增强LLM提示,以改进代码摘要。

针对大语言模型(LLM)在代码摘要任务中依赖提示工程的问题,论文提出自动语义增强提示的方法。其直觉是开发者在阅读代码时会下意识地收集浅层语义事实,如参数与局部变量名、返回表达式、简单前后条件以及基本控制与数据流等。论文将这些从代码中自动提取的语义事实加入LLM提示,以提升代码摘要的质量。标题表明该方法面向代码摘要任务,但摘要未给出具体评估结果。

问题
大语言模型用于代码摘要时,提示工程尚缺乏系统方法,开发者阅读代码时自然收集的浅层语义事实未被利用。
方法
自动从代码中提取参数/局部变量名、返回表达式、简单前后条件、基本控制与数据流等语义事实,并将其注入LLM提示。
评估
标题表明面向代码摘要任务,但摘要未详述评估方式与结果。
原文摘要(Abstract)

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.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@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}
}