Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLM) are a new class of computation engines, "programmed" via prompt engineering. We are still learning how to best "program" these LLMs to help developers. We start with the intuition that developers tend to consciously and unconsciously have a collection of semantics facts in mind when working on coding tasks. Mostly these are shallow, simple facts arising from a quick read. For a function, examples of facts might include parameter and local variable names, return expressions, simple pre- and post-conditions, and basic control and data flow, etc. One might assume that the powerful multi-layer architecture of transformer-style LLMs makes them inherently capable of doing this simple level of "code analysis" and extracting such information, implicitly, while processing code: but are they, really? If they aren't, could explicitly adding this information help? Our goal here is to investigate this question, using the code summarization task and evaluate whether automatically augmenting an LLM's prompt with semantic facts explicitly, actually helps. Prior work shows that LLM performance on code summarization benefits from few-shot samples drawn either from the same-project or from examples found via information retrieval methods (such as BM25). While summarization performance has steadily increased since the early days, there is still room for improvement: LLM performance on code summarization still lags its performance on natural-language tasks like translation and text summarization. We find that adding semantic facts actually does help! This approach improves performance in several different settings suggested by prior work, including for two different Large Language Models. In most cases, improvement nears or exceeds 2 BLEU; for the PHP language in the challenging CodeSearchNet dataset, this augmentation actually yields performance surpassing 30 BLEU.
Key facts. Cited by 72 papers in the map (data through 7 Oct 2026). Builds on 33 of its 69 references that are in the map. First posted on arXiv 13 Apr 2023.
Builds on
33 of 69 references.
References · 33
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019BERTScore: Evaluating Text Generation with BERTcited by 5,462
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2020BLEURT: Learning Robust Metrics for Text Generationcited by 1,196
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2022Towards Reasoning in Large Language Models: A Surveycited by 593
- 2021Unified Pre-training for Program Understanding and Generationcited by 361
21 more
- 2022A Systematic Evaluation of Large Language Models of Codecited by 360
- 2022Reasoning with Language Model Prompting: A Surveycited by 251
- 2023ChatGPT: Jack of all trades, master of nonecited by 204
- 2018code2seq: Generating Sequences from Structured Representations of Codecited by 177
- 2020A Transformer-based Approach for Source Code Summarizationcited by 129
- 2022Few-shot training LLMs for project-specific code-summarizationcited by 128
- 2018The Adverse Effects of Code Duplication in Machine Learning Models of Codecited by 123
- 2022Large Language Models are Few-shot Testers: Exploring LLM-based General Bug Reproductioncited by 110
- 2022Repository-Level Prompt Generation for Large Language Models of Codecited by 106
- 2023Impact of Code Language Models on Automated Program Repaircited by 85
- 2019A Neural Model for Generating Natural Language Summaries of Program Subroutinescited by 76
- 2022Repair Is Nearly Generation: Multilingual Program Repair with LLMscited by 68
- 2019Code Generation as a Dual Task of Code Summarizationcited by 62
- 2021On the Evaluation of Neural Code Summarizationcited by 47
- 2021Multilingual training for Software Engineeringcited by 43
- 2022Code Generation Tools (Almost) for Free? A Study of Few-Shot, Pre-Trained Language Models on Codecited by 39
- 2020NUBIA: NeUral Based Interchangeability Assessor for Text Generationcited by 34
- 2020Code to Comment "Translation": Data, Metrics, Baselining & Evaluationcited by 28
- 2022Generate-and-Retrieve: use your predictions to improve retrieval for semantic parsingcited by 15
- 2022Semantic Similarity Metrics for Evaluating Source Code Summarizationcited by 14
- 2022Evaluating Commit Message Generation: To BLEU Or Not To BLEU?cited by 2
Built on by
Citing papers per year: 2023: 4; 2024: 27; 2025: 29; 2026: 12.
72 papers.
Sort:
By area:
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 352
- 2024A Comprehensive Survey on Process-Oriented Automatic Text Summarization with Exploration of LLM-Based Methodscited by 101
- 2024Agents in Software Engineering: Survey, Landscape, and Visioncited by 60
- 2025Reducing Cost of LLM Agents with Trajectory Reductioncited by 44
- 2024Automatic Programming: Large Language Models and Beyondcited by 35
- 2024Source Code Summarization in the Era of Large Language Modelscited by 30
- 2023Better patching using LLM prompting, via Self-Consistencycited by 29
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2023The Hitchhiker's Guide to Program Analysis: A Journey with Large Language Modelscited by 18
- 2024Comparison of Static Application Security Testing Tools and Large Language Models for Repo-level Vulnerability Detectioncited by 18
- 2025LAMD: Context-driven Android Malware Detection and Classification with LLMscited by 18
- 2024Compressing Long Context for Enhancing RAG with AMR-based Concept Distillationcited by 16
38 more
- 2024Beyond Functional Correctness: Investigating Coding Style Inconsistencies in Large Language Modelscited by 15
- 2025Large Language Models (LLMs) for Source Code Analysis: applications, models and datasetscited by 15
- 2025LLM/Agent-as-Data-Analyst: A Surveycited by 15
- 2024The Impact of Prompt Programming on Function-Level Code Generationcited by 13
- 2024Calibration of Large Language Models on Code Summarizationcited by 12
- 2025Reflections on the Reproducibility of Commercial LLM Performance in Empirical Software Engineering Studiescited by 12
- 2024Studying LLM Performance on Closed- and Open-source Datacited by 11
- 2025Enhancing LLM Performance Through Debate: An Empirical Study on Multi-Agent Debate for Coding Taskscited by 11
- 2024RepoMasterEval: Evaluating Code Completion via Real-World Repositoriescited by 10
- 2024FT2Ra: A Fine-Tuning-Inspired Approach to Retrieval-Augmented Code Completioncited by 9
- 2024Natural Language Outlines for Code: Literate Programming in the LLM Eracited by 9
- 2024NaviQAte: Functionality-Guided Web Application Navigationcited by 9
- 2025OSVBench: Benchmarking LLMs on Specification Generation Tasks for Operating System Verificationcited by 8
- 2025LAURA: Enhancing Code Review Generation with Context-Enriched Retrieval-Augmented LLMcited by 8
- 2024Can Developers Prompt? A Controlled Experiment for Code Documentation Generationcited by 7
- 2024Prompting and Fine-tuning Large Language Models for Automated Code Review Comment Generationcited by 7
- 2025Beyond the Prompt: An Empirical Study of Cursor Rulescited by 7
- 2024Leveraging Large Language Models to Detect npm Malicious Packagescited by 6
- 2024FOKE: A Personalized and Explainable Education Framework Integrating Foundation Models, Knowledge Graphs, and Prompt Engineeringcited by 6
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarizationcited by 6
- 2024mathbbUSCD: Improving Code Generation of LLMs by Uncertainty-Aware Selective Contrastive Decodingcited by 6
- 2025Generative AI for Self-Adaptive Systems: State of the Art and Research Roadmapcited by 5
- 2025Issue-Oriented Agent-Based Framework for Automated Review Comment Generationcited by 4
- 2026CodeScout: Contextual Problem Statement Enhancement for Software Agentscited by 4
- 2023Enhancing Robustness of AI Offensive Code Generators via Data Augmentationcited by 3
- 2026ShortCoder: Knowledge-Augmented Syntax Optimization for Token-Efficient Code Generationcited by 3
- 2024Icing on the Cake: Automatic Code Summarization at Ericssoncited by 2
- 2025CCCI: Code Completion with Contextual Information for Complex Data Transfer Tasks Using Large Language Modelscited by 2
- 2025HPCTransCompile: An AI Compiler Generated Dataset for High-Performance CUDA Transpilation and LLM Preliminary Explorationcited by 2
- 2025Enhancing COBOL Code Explanations: A Multi-Agents Approach Using Large Language Modelscited by 2
- 2025Evaluating LLMs on Sequential API Call Through Automated Test Generationcited by 2
- 2024The importance of visual modelling languages in generative software engineeringcited by 1
- 2024Selective Shot Learning for Code Explanationcited by 1
- 2025An Empirically-grounded tool for Automatic Prompt Linting and Repair: A Case Study on Bias, Vulnerability, and Optimization in Developer Promptscited by 1
- 2025Mitigating Sensitive Information Leakage in LLMs4Code through Machine Unlearningcited by 1
- 2025Investigating Execution-Aware Language Models for Code Optimizationcited by 1
- 2025Variational Prefix Tuning for Diverse and Accurate Code Summarization Using Pre-trained Language Modelscited by 1
- 2025Style2Code: A Style-Controllable Code Generation Framework with Dual-Modal Contrastive Representation Learningcited by 1
50 most cited of 72 All 72 (JSON)
- 2026On the Lexical Superstition of Large Language Models for Code Comprehension: Re-evaluation on Code of Low Lexical Quality22 Sep 2026
- 2026CoSTAR: Data Synthesis-Driven Constraint-Aware COBOL Section Summarization for Legacy System Modernization10 Sep 2026
- 2026A Tool-Augmented, GPT-4 Chatbot for Real-Time Repository Data Analysis7 Sep 2026
- 2026Transformer-Assisted LLM-Based Source Code Summarisation: to Enable More Secure Software Development23 Jul 2026
- 2026Large Language Models for Code Generation from Multilingual Prompts: A Curated Benchmark and a Study on Code Quality16 Jul 2026
- 2026Quantize with Confidence? An Empirical Study of Quantization for Code Generation15 Jul 2026
- 2026Multi-Agent LLM Collaboration for Unit Test Generation via Human-Testing-Inspired Workflows10 Jul 2026
- 2026Agent4cs: A Multi-agent System for Code Summarization in Large Hierarchical Codebases1 Jul 2026
- 2026Remember Your Trace: Memory-Guided Long-Horizon Agentic Framework for Consistent and Hierarchical Repository-Level Code Documentation14 May 2026
- 2026CIAO - Code In Architecture Out - Automated Software Architecture Documentation with Large Language Models9 Apr 2026
- 2026CodeScout: Contextual Problem Statement Enhancement for Software Agents5 Mar 2026
- 2026ShortCoder: Knowledge-Augmented Syntax Optimization for Token-Efficient Code Generation14 Jan 2026
38 more
- 2025Toward Explaining Large Language Models in Software Engineering Tasks23 Dec 2025
- 2025Beyond the Prompt: An Empirical Study of Cursor Rules21 Dec 2025
- 2025Generative AI for Self-Adaptive Systems: State of the Art and Research Roadmap4 Dec 2025
- 2025LAURA: Enhancing Code Review Generation with Context-Enriched Retrieval-Augmented LLM1 Dec 2025
- 2025Effective Code Membership Inference for Code Completion Models via Adversarial Prompts19 Nov 2025
- 2025Assertion-Aware Test Code Summarization with Large Language Models9 Nov 2025
- 2025A Metamorphic Testing Perspective on Knowledge Distillation for Language Models of Code: Does the Student Deeply Mimic the Teacher?7 Nov 2025
- 2025Issue-Oriented Agent-Based Framework for Automated Review Comment Generation1 Nov 2025
- 2025Reflections on the Reproducibility of Commercial LLM Performance in Empirical Software Engineering Studies29 Oct 2025
- 2025MEC3O: Multi-Expert Consensus for Code Time Complexity Prediction10 Oct 2025
- 2025LLM/Agent-as-Data-Analyst: A Survey28 Sep 2025
- 2025Reducing Cost of LLM Agents with Trajectory Reduction28 Sep 2025
- 2025TreeRanker: Fast and Model-agnostic Ranking System for Code Suggestions in IDEs4 Aug 2025
- 2025Evaluating LLMs on Sequential API Call Through Automated Test Generation13 Jul 2025
- 2025Enhancing COBOL Code Explanations: A Multi-Agents Approach Using Large Language Models2 Jul 2025
- 2025Issue Retrieval and Verification Enhanced Supplementary Code Comment Generation17 Jun 2025
- 2025HPCTransCompile: An AI Compiler Generated Dataset for High-Performance CUDA Transpilation and LLM Preliminary Exploration12 Jun 2025
- 2025Style2Code: A Style-Controllable Code Generation Framework with Dual-Modal Contrastive Representation Learning26 May 2025
- 2025Simple and Effective Baselines for Code Summarisation Evaluation26 May 2025
- 2025Variational Prefix Tuning for Diverse and Accurate Code Summarization Using Pre-trained Language Models14 May 2025
- 2025OSVBench: Benchmarking LLMs on Specification Generation Tasks for Operating System Verification29 Apr 2025
- 2025CCCI: Code Completion with Contextual Information for Complex Data Transfer Tasks Using Large Language Models29 Mar 2025
- 2025Large Language Models (LLMs) for Source Code Analysis: applications, models and datasets21 Mar 2025
- 2025Enhancing LLM Performance Through Debate: An Empirical Study on Multi-Agent Debate for Coding Tasks15 Mar 2025
- 2025Investigating Execution-Aware Language Models for Code Optimization11 Mar 2025
- 2025Towards Reliable LLM-Driven Fuzz Testing: Vision and Road Ahead2 Mar 2025
- 2025LAMD: Context-driven Android Malware Detection and Classification with LLMs18 Feb 2025
- 2025Mitigating Sensitive Information Leakage in LLMs4Code through Machine Unlearning9 Feb 2025
- 2025An Empirically-grounded tool for Automatic Prompt Linting and Repair: A Case Study on Bias, Vulnerability, and Optimization in Developer Prompts21 Jan 2025
- 2024The Impact of Prompt Programming on Function-Level Code Generation29 Dec 2024
- 2024Transducer Tuning: Efficient Model Adaptation for Software Tasks Using Code Property Graphs18 Dec 2024
- 2024Selective Shot Learning for Code Explanation17 Dec 2024
- 2024The importance of visual modelling languages in generative software engineering27 Nov 2024
- 2024Prompting and Fine-tuning Large Language Models for Automated Code Review Comment Generation15 Nov 2024
- 2024In-Context Code-Text Learning for Bimodal Software Engineering8 Oct 2024
- 2024NaviQAte: Functionality-Guided Web Application Navigation16 Sep 2024
- 2024Agents in Software Engineering: Survey, Landscape, and Vision13 Sep 2024
- 2024mathbbUSCD: Improving Code Generation of LLMs by Uncertainty-Aware Selective Contrastive Decoding9 Sep 2024
50 newest of 72 All 72 (JSON)
- 2024Agents in Software Engineering: Survey, Landscape, and Visioncited by 60
- 2025Reducing Cost of LLM Agents with Trajectory Reductioncited by 44
- 2025LLM/Agent-as-Data-Analyst: A Surveycited by 15
- 2025Enhancing LLM Performance Through Debate: An Empirical Study on Multi-Agent Debate for Coding Taskscited by 11
- 2025Issue-Oriented Agent-Based Framework for Automated Review Comment Generationcited by 4
- 2026CodeScout: Contextual Problem Statement Enhancement for Software Agentscited by 4
- 2025Enhancing COBOL Code Explanations: A Multi-Agents Approach Using Large Language Modelscited by 2
- 2025Evaluating LLMs on Sequential API Call Through Automated Test Generationcited by 2
- 2026Remember Your Trace: Memory-Guided Long-Horizon Agentic Framework for Consistent and Hierarchical Repository-Level Code Documentationcited by 1
- 2026Agent4cs: A Multi-agent System for Code Summarization in Large Hierarchical Codebasescited by 1
- 2026Multi-Agent LLM Collaboration for Unit Test Generation via Human-Testing-Inspired Workflowscited by 0
- 2026Multi-Agent LLM Collaboration for Unit Test Generation via Human-Testing-Inspired Workflows10 Jul 2026
- 2026Agent4cs: A Multi-agent System for Code Summarization in Large Hierarchical Codebases1 Jul 2026
- 2026Remember Your Trace: Memory-Guided Long-Horizon Agentic Framework for Consistent and Hierarchical Repository-Level Code Documentation14 May 2026
- 2026CodeScout: Contextual Problem Statement Enhancement for Software Agents5 Mar 2026
- 2025Issue-Oriented Agent-Based Framework for Automated Review Comment Generation1 Nov 2025
- 2025LLM/Agent-as-Data-Analyst: A Survey28 Sep 2025
- 2025Reducing Cost of LLM Agents with Trajectory Reduction28 Sep 2025
- 2025Evaluating LLMs on Sequential API Call Through Automated Test Generation13 Jul 2025
- 2025Enhancing COBOL Code Explanations: A Multi-Agents Approach Using Large Language Models2 Jul 2025
- 2025Enhancing LLM Performance Through Debate: An Empirical Study on Multi-Agent Debate for Coding Tasks15 Mar 2025
- 2024Agents in Software Engineering: Survey, Landscape, and Vision13 Sep 2024
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 352
- 2024Compressing Long Context for Enhancing RAG with AMR-based Concept Distillationcited by 16
- 2024FT2Ra: A Fine-Tuning-Inspired Approach to Retrieval-Augmented Code Completioncited by 9
- 2025LAURA: Enhancing Code Review Generation with Context-Enriched Retrieval-Augmented LLMcited by 8
- 2025Issue Retrieval and Verification Enhanced Supplementary Code Comment Generationcited by 0
- 2025LAURA: Enhancing Code Review Generation with Context-Enriched Retrieval-Augmented LLM1 Dec 2025
- 2025Issue Retrieval and Verification Enhanced Supplementary Code Comment Generation17 Jun 2025
- 2024Compressing Long Context for Enhancing RAG with AMR-based Concept Distillation6 May 2024
- 2024FT2Ra: A Fine-Tuning-Inspired Approach to Retrieval-Augmented Code Completion2 Apr 2024
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Survey29 Feb 2024
- 2023Better patching using LLM prompting, via Self-Consistencycited by 29
- 2023Better patching using LLM prompting, via Self-Consistency31 May 2023
- 2024A Comprehensive Survey on Process-Oriented Automatic Text Summarization with Exploration of LLM-Based Methodscited by 101
- 2024Automatic Programming: Large Language Models and Beyondcited by 35
- 2024Source Code Summarization in the Era of Large Language Modelscited by 30
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2023The Hitchhiker's Guide to Program Analysis: A Journey with Large Language Modelscited by 18
- 2024Comparison of Static Application Security Testing Tools and Large Language Models for Repo-level Vulnerability Detectioncited by 18
- 2025LAMD: Context-driven Android Malware Detection and Classification with LLMscited by 18
- 2024Beyond Functional Correctness: Investigating Coding Style Inconsistencies in Large Language Modelscited by 15
- 2025Large Language Models (LLMs) for Source Code Analysis: applications, models and datasetscited by 15
- 2024The Impact of Prompt Programming on Function-Level Code Generationcited by 13
- 2024Calibration of Large Language Models on Code Summarizationcited by 12
- 2025Reflections on the Reproducibility of Commercial LLM Performance in Empirical Software Engineering Studiescited by 12
12 most cited of 51 All 51 (JSON)
- 2026On the Lexical Superstition of Large Language Models for Code Comprehension: Re-evaluation on Code of Low Lexical Quality22 Sep 2026
- 2026A Tool-Augmented, GPT-4 Chatbot for Real-Time Repository Data Analysis7 Sep 2026
- 2026Transformer-Assisted LLM-Based Source Code Summarisation: to Enable More Secure Software Development23 Jul 2026
- 2026Large Language Models for Code Generation from Multilingual Prompts: A Curated Benchmark and a Study on Code Quality16 Jul 2026
- 2026Quantize with Confidence? An Empirical Study of Quantization for Code Generation15 Jul 2026
- 2026CIAO - Code In Architecture Out - Automated Software Architecture Documentation with Large Language Models9 Apr 2026
- 2025Toward Explaining Large Language Models in Software Engineering Tasks23 Dec 2025
- 2025Beyond the Prompt: An Empirical Study of Cursor Rules21 Dec 2025
- 2025Generative AI for Self-Adaptive Systems: State of the Art and Research Roadmap4 Dec 2025
- 2025Assertion-Aware Test Code Summarization with Large Language Models9 Nov 2025
- 2025A Metamorphic Testing Perspective on Knowledge Distillation for Language Models of Code: Does the Student Deeply Mimic the Teacher?7 Nov 2025
- 2025Reflections on the Reproducibility of Commercial LLM Performance in Empirical Software Engineering Studies29 Oct 2025
12 newest of 51 All 51 (JSON)