Selective Shot Learning for Code Explanation
Not on the map. Why?
Abstract (arXiv)
Code explanation plays a crucial role in the software engineering domain, aiding developers in grasping code functionality efficiently. Recent work shows that the performance of LLMs for code explanation improves in a few-shot setting, especially when the few-shot examples are selected intelligently. State-of-the-art approaches for such Selective Shot Learning (SSL) include token-based and embedding-based methods. However, these SSL approaches have been evaluated on proprietary LLMs, without much exploration on open-source Code-LLMs. Additionally, these methods lack consideration for programming language syntax. To bridge these gaps, we present a comparative study and propose a novel SSL method (SSL_ner) that utilizes entity information for few-shot example selection. We present several insights and show the effectiveness of SSL_ner approach over state-of-the-art methods across two datasets. To the best of our knowledge, this is the first systematic benchmarking of open-source Code-LLMs while assessing the performances of the various few-shot examples selection approaches for the code explanation task.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 15 of its 25 references that are in the map. First posted on arXiv 17 Dec 2024.
Builds on
15 of 25 references.
References · 15
- 2023An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generationcited by 193
- 2018Learning to Mine Aligned Code and Natural Language Pairs from Stack Overflowcited by 165
- 2020A Transformer-based Approach for Source Code Summarizationcited by 129
- 2022Few-shot training LLMs for project-specific code-summarizationcited by 128
- 2022Natural Language to Code Generation in Interactive Data Science Notebookscited by 86
- 2022Experiences from Using Code Explanations Generated by Large Language Models in a Web Software Development E-Bookcited by 84
- 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)cited by 72
- 2023Large Language Models are Few-Shot Summarizers: Multi-Intent Comment Generation via In-Context Learningcited by 71
- 2023A Comparative Analysis of Large Language Models for Code Documentation Generationcited by 24
- 2020Leveraging Code Generation to Improve Code Retrieval and Summarization via Dual Learningcited by 16
- 2022Python Code Generation by Asking Clarification Questionscited by 16
- 2023Developer-Intent Driven Code Comment Generationcited by 16
Built on by
Citing papers per year: 2026: 1.
1 paper.