paper-with-me

홈 › Papers

Uncovering Intention through LLM-Driven Code Snippet Description Generation

2025-06-18 · Yusuf Sulistyo Nugroho, Farah Danisha Salam, Brittany Reid, Raula Gaikovina Kula, Kazumasa Shimari, Kenichi Matsumoto

Documenting code snippets is essential to pinpoint key areas where both developers and users should pay attention. Examples include usage examples and other Application Programming Interfaces (APIs), which are especially important for third-party libraries. With the rise of Large Language Models (LLMs), the key goal is to investigate the kinds of description developers commonly use and evaluate how well an LLM, in this case Llama, can support description generation. We use NPM Code Snippets, consisting of 185,412 packages with 1,024,579 code snippets. From there, we use 400 code snippets (and their descriptions) as samples. First, our manual classification found that the majority of original descriptions (55.5%) highlight example-based usage. This finding emphasizes the importance of clear documentation, as some descriptions lacked sufficient detail to convey intent. Second, the LLM correctly identified the majority of original descriptions as "Example" (79.75%), which is identical to our manual finding, showing a propensity for generalization. Third, compared to the originals, the produced description had an average similarity score of 0.7173, suggesting relevance but room for improvement. Scores below 0.9 indicate some irrelevance. Our results show that depending on the task of the code snippet, the intention of the document may differ from being instructions for usage, installations, or descriptive learning examples for any user of a library.

📄 PDF Abstract BibTeX arXiv:2506.15453

Code (0)

등록된 구현이 없습니다.

Tasks

Descriptive

Similar Papers 제목 키워드 기반

Code Editing from Few Exemplars by Adaptive Multi-Extent Composition

2021-09-29 · Peizhao Li, Xuchao Zhang, Ziyu Yao, Wei Cheng 외

This paper considers the computer source code editing with few exemplars. The editing exemplar, containing the original and modified support code snippets, showcases a certain editorial style and implies the edit intenti…

INDICT: Code Generation with Internal Dialogues of Critiques for Both Security and Helpfulness

2024-06-23 · Hung Le, Yingbo Zhou, Caiming Xiong, Silvio Savarese 외

Large language models (LLMs) for code are typically trained to align with natural language instructions to closely follow their intentions and requirements. However, in many practical scenarios, it becomes increasingly c…

Code GenerationNavigate

Exploring LLM biases to manipulate AI search overview

2026-03-30 · Roman Smirnov arxiv

Modern large language models (LLMs) are used in many business applications in general, and specifically in web search systems and applications that generate overviews of search results - LLM Overview systems. Such system…

Reinforcement LearningAnswer Generation

Investigating Agency of LLMs in Human-AI Collaboration Tasks

2023-05-22 · ASHISH SHARMA, Sudha Rao, Chris Brockett, Akanksha Malhotra 외

Agency, the capacity to proactively shape events, is central to how humans interact and collaborate. While LLMs are being developed to simulate human behavior and serve as human-like agents, little attention has been giv…

Multi-intention Inverse Q-learning for Interpretable Behavior Representation

2023-11-23 · Hao Zhu, Brice De La Crompe, Gabriel Kalweit, Artur Schneider 외

In advancing the understanding of natural decision-making processes, inverse reinforcement learning (IRL) methods have proven instrumental in reconstructing animal's intentions underlying complex behaviors. Given the rec…

Decision MakingQ-Learning