mlsanityData to 7 Oct 2026

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

arXiv 2304.06815 ↗First posted 13 Apr 2023cs.SE cs.LGcited by 72

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

  1. 2017Attention Is All You Needcited by 59,932
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2019BERTScore: Evaluating Text Generation with BERTcited by 5,462
  4. 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
  5. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  6. 2020BLEURT: Learning Robust Metrics for Text Generationcited by 1,196
  7. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  8. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
  9. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
  10. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
  11. 2022Towards Reasoning in Large Language Models: A Surveycited by 593
  12. 2021Unified Pre-training for Program Understanding and Generationcited by 361
21 more
  1. 2022A Systematic Evaluation of Large Language Models of Codecited by 360
  2. 2022Reasoning with Language Model Prompting: A Surveycited by 251
  3. 2023ChatGPT: Jack of all trades, master of nonecited by 204
  4. 2018code2seq: Generating Sequences from Structured Representations of Codecited by 177
  5. 2020A Transformer-based Approach for Source Code Summarizationcited by 129
  6. 2022Few-shot training LLMs for project-specific code-summarizationcited by 128
  7. 2018The Adverse Effects of Code Duplication in Machine Learning Models of Codecited by 123
  8. 2022Large Language Models are Few-shot Testers: Exploring LLM-based General Bug Reproductioncited by 110
  9. 2022Repository-Level Prompt Generation for Large Language Models of Codecited by 106
  10. 2023Impact of Code Language Models on Automated Program Repaircited by 85
  11. 2019A Neural Model for Generating Natural Language Summaries of Program Subroutinescited by 76
  12. 2022Repair Is Nearly Generation: Multilingual Program Repair with LLMscited by 68
  13. 2019Code Generation as a Dual Task of Code Summarizationcited by 62
  14. 2021On the Evaluation of Neural Code Summarizationcited by 47
  15. 2021Multilingual training for Software Engineeringcited by 43
  16. 2022Code Generation Tools (Almost) for Free? A Study of Few-Shot, Pre-Trained Language Models on Codecited by 39
  17. 2020NUBIA: NeUral Based Interchangeability Assessor for Text Generationcited by 34
  18. 2020Code to Comment "Translation": Data, Metrics, Baselining & Evaluationcited by 28
  19. 2022Generate-and-Retrieve: use your predictions to improve retrieval for semantic parsingcited by 15
  20. 2022Semantic Similarity Metrics for Evaluating Source Code Summarizationcited by 14
  21. 2022Evaluating Commit Message Generation: To BLEU Or Not To BLEU?cited by 2

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 4; 2024: 27; 2025: 29; 2026: 12.

72 papers.

Sort:

By area:

  1. 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 352
  2. 2024A Comprehensive Survey on Process-Oriented Automatic Text Summarization with Exploration of LLM-Based Methodscited by 101
  3. 2024Agents in Software Engineering: Survey, Landscape, and Visioncited by 60
  4. 2025Reducing Cost of LLM Agents with Trajectory Reductioncited by 44
  5. 2024Automatic Programming: Large Language Models and Beyondcited by 35
  6. 2024Source Code Summarization in the Era of Large Language Modelscited by 30
  7. 2023Better patching using LLM prompting, via Self-Consistencycited by 29
  8. 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
  9. 2023The Hitchhiker's Guide to Program Analysis: A Journey with Large Language Modelscited by 18
  10. 2024Comparison of Static Application Security Testing Tools and Large Language Models for Repo-level Vulnerability Detectioncited by 18
  11. 2025LAMD: Context-driven Android Malware Detection and Classification with LLMscited by 18
  12. 2024Compressing Long Context for Enhancing RAG with AMR-based Concept Distillationcited by 16
38 more
  1. 2024Beyond Functional Correctness: Investigating Coding Style Inconsistencies in Large Language Modelscited by 15
  2. 2025Large Language Models (LLMs) for Source Code Analysis: applications, models and datasetscited by 15
  3. 2025LLM/Agent-as-Data-Analyst: A Surveycited by 15
  4. 2024The Impact of Prompt Programming on Function-Level Code Generationcited by 13
  5. 2024Calibration of Large Language Models on Code Summarizationcited by 12
  6. 2025Reflections on the Reproducibility of Commercial LLM Performance in Empirical Software Engineering Studiescited by 12
  7. 2024Studying LLM Performance on Closed- and Open-source Datacited by 11
  8. 2025Enhancing LLM Performance Through Debate: An Empirical Study on Multi-Agent Debate for Coding Taskscited by 11
  9. 2024RepoMasterEval: Evaluating Code Completion via Real-World Repositoriescited by 10
  10. 2024FT2Ra: A Fine-Tuning-Inspired Approach to Retrieval-Augmented Code Completioncited by 9
  11. 2024Natural Language Outlines for Code: Literate Programming in the LLM Eracited by 9
  12. 2024NaviQAte: Functionality-Guided Web Application Navigationcited by 9
  13. 2025OSVBench: Benchmarking LLMs on Specification Generation Tasks for Operating System Verificationcited by 8
  14. 2025LAURA: Enhancing Code Review Generation with Context-Enriched Retrieval-Augmented LLMcited by 8
  15. 2024Can Developers Prompt? A Controlled Experiment for Code Documentation Generationcited by 7
  16. 2024Prompting and Fine-tuning Large Language Models for Automated Code Review Comment Generationcited by 7
  17. 2025Beyond the Prompt: An Empirical Study of Cursor Rulescited by 7
  18. 2024Leveraging Large Language Models to Detect npm Malicious Packagescited by 6
  19. 2024FOKE: A Personalized and Explainable Education Framework Integrating Foundation Models, Knowledge Graphs, and Prompt Engineeringcited by 6
  20. 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarizationcited by 6
  21. 2024mathbbUSCD: Improving Code Generation of LLMs by Uncertainty-Aware Selective Contrastive Decodingcited by 6
  22. 2025Generative AI for Self-Adaptive Systems: State of the Art and Research Roadmapcited by 5
  23. 2025Issue-Oriented Agent-Based Framework for Automated Review Comment Generationcited by 4
  24. 2026CodeScout: Contextual Problem Statement Enhancement for Software Agentscited by 4
  25. 2023Enhancing Robustness of AI Offensive Code Generators via Data Augmentationcited by 3
  26. 2026ShortCoder: Knowledge-Augmented Syntax Optimization for Token-Efficient Code Generationcited by 3
  27. 2024Icing on the Cake: Automatic Code Summarization at Ericssoncited by 2
  28. 2025CCCI: Code Completion with Contextual Information for Complex Data Transfer Tasks Using Large Language Modelscited by 2
  29. 2025HPCTransCompile: An AI Compiler Generated Dataset for High-Performance CUDA Transpilation and LLM Preliminary Explorationcited by 2
  30. 2025Enhancing COBOL Code Explanations: A Multi-Agents Approach Using Large Language Modelscited by 2
  31. 2025Evaluating LLMs on Sequential API Call Through Automated Test Generationcited by 2
  32. 2024The importance of visual modelling languages in generative software engineeringcited by 1
  33. 2024Selective Shot Learning for Code Explanationcited by 1
  34. 2025An Empirically-grounded tool for Automatic Prompt Linting and Repair: A Case Study on Bias, Vulnerability, and Optimization in Developer Promptscited by 1
  35. 2025Mitigating Sensitive Information Leakage in LLMs4Code through Machine Unlearningcited by 1
  36. 2025Investigating Execution-Aware Language Models for Code Optimizationcited by 1
  37. 2025Variational Prefix Tuning for Diverse and Accurate Code Summarization Using Pre-trained Language Modelscited by 1
  38. 2025Style2Code: A Style-Controllable Code Generation Framework with Dual-Modal Contrastive Representation Learningcited by 1

50 most cited of 72 All 72 (JSON)