mlsanityData to 7 Oct 2026

Strategic Optimization and Challenges of Large Language Models in Object-Oriented Programming

arXiv 2408.14834 ↗First posted 27 Aug 2024cs.SE cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

In the area of code generation research, the emphasis has transitioned from crafting individual functions to developing class-level method code that integrates contextual information. This shift has brought several benchmarks such as ClassEval and CoderEval, which consider class-level contexts. Nevertheless, the influence of specific contextual factors at the method level remains less explored. This research focused on method-level code generation within the Object-Oriented Programming (OOP) framework. Based on CoderEval, we devised experiments that varied the extent of contextual information in the prompts, ranging from method-specific to project-wide details. We introduced the innovative metric of "Prompt-Token Cost-Effectiveness" to evaluate the economic viability of incorporating additional contextual layers. Our findings indicate that prompts enriched with method invocation details yield the highest cost-effectiveness. Additionally, our study revealed disparities among Large Language Models (LLMs) regarding error type distributions and the level of assistance they provide to developers. Notably, larger LLMs do not invariably perform better. We also observed that tasks with higher degrees of coupling present more substantial challenges, suggesting that the choice of LLM should be tailored to the task's coupling degree. For example, GPT-4 exhibited improved performance in low-coupling scenarios, whereas GPT-3.5 seemed better suited for tasks with high coupling. By meticulously curating prompt content and selecting the appropriate LLM, developers can optimize code quality while maximizing cost-efficiency during the development process.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 11 of its 33 references that are in the map. First posted on arXiv 27 Aug 2024.

Builds on

11 of 33 references.

References · 11

  1. 2017Attention Is All You Needcited by 59,932
  2. 2015Distilling the Knowledge in a Neural Networkcited by 10,076
  3. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  4. 2022Large Language Models Are Human-Level Prompt Engineerscited by 1,020
  5. 2023CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completioncited by 181
  6. 2023ClassEval: A Manually-Crafted Benchmark for Evaluating LLMs on Class-level Code Generationcited by 166
  7. 2023An Empirical Study of the Non-determinism of ChatGPT in Code Generationcited by 134
  8. 2022Internet-augmented language models through few-shot prompting for open-domain question answeringcited by 131
  9. 2022ReCode: Robustness Evaluation of Code Generation Modelscited by 100
  10. 2022AixBench: A Code Generation Benchmark Datasetcited by 22
  11. 2019A Survey of Automatic Generation of Source Code Comments: Algorithms and Techniquescited by 15

Built on by

Not cited yet.