An Empirical Evaluation of Cost-Efficient Large Language Models on Algorithmic Programming Tasks

📄 arXiv: 2609.18052v1 📥 PDF

作者: Chandimal Adikari, Nandika Herath

分类: cs.SE, cs.AI

发布日期: 2026-09-16

备注: 7 pages, 7 figures. Accepted for publication in the IEEE Proceedings of the 2026 International Conference on Advanced Computing Technologies (ICACT)


💡 一句话要点

评估成本效益的语言模型在算法编程任务中的应用

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大型语言模型 算法编程 代码生成 模型评估 企业应用

📋 核心要点

  1. 现有的语言模型在生成企业代码时的可靠性和正确性存在显著不足,尤其是在复杂算法问题上。
  2. 本研究通过实证评估三种成本效益高的语言模型在算法编程任务中的表现,探讨其生成代码的能力。
  3. 实验结果表明,尽管模型的结构符合性较高,但实际计算正确答案的能力较低,显示出模型在特定任务上的局限性。

📝 摘要(中文)

本研究实证评估了成本效益高的大型语言模型(LLMs)在生成符合书面规范的企业代码方面的可靠性。研究中使用了三种模型(Gemini Flash 3、GPT-5.4 mini 和 Claude Haiku 4.5),解决了992个算法问题,生成了7593个Java Spring Boot服务方法。尽管结构符合性接近上限,但38.4%的方法未能计算返回值,只有12.9%的返回答案是正确的。结果显示,响应的可靠性与正确性呈负相关,真正计算的模型回答最少且正确率为19.3%。

🔬 方法详解

问题定义:本研究旨在解决成本效益高的大型语言模型在生成符合书面规范的企业代码时的可靠性问题。现有方法在复杂算法问题上表现不佳,导致生成的代码常常不符合预期。

核心思路:研究通过对三种不同的语言模型进行实证评估,分析它们在解决算法问题时的表现,尤其关注生成代码的正确性和可靠性。设计上采用了多种模型和提示变体的组合,以全面评估模型的能力。

技术框架:整体架构包括模型选择、算法问题生成、代码生成和结果评估四个主要模块。每个模型在特定的提示下生成代码,随后对生成的代码进行分类和执行,以评估其性能。

关键创新:本研究的创新在于系统性地评估了不同语言模型在特定编程任务中的表现,尤其是通过引入缺失输入的测试,揭示了模型在面对不完整信息时的反应能力。

关键设计:在实验中,设置了多个参数组合,限制了生成的迭代次数,确保生成的代码不包含硬编码答案。采用了八类结果分类法对生成的7593个方法进行评估,确保了结果的系统性和可比性。

🖼️ 关键图片

img_0
img_1
img_2

📊 实验亮点

实验结果显示,尽管模型的结构符合性接近上限,但38.4%的生成方法未能正确计算返回值,且只有12.9%的返回答案是正确的。值得注意的是,真正计算的模型的正确率仅为19.3%,显示出模型在特定任务上的局限性。

🎯 应用场景

该研究的潜在应用领域包括软件开发、自动化编程和智能代码生成等。通过提高语言模型在算法编程任务中的可靠性,可以为企业提供更高效的代码生成工具,降低开发成本,提升开发效率。未来,随着模型的不断优化,可能会在更广泛的编程任务中得到应用。

📄 摘要(原文)

This study empirically evaluates whether cost-efficient Large Language Models (LLMs) can be trusted to generate enterprise code to a written specification. Three models (Gemini Flash 3, GPT-5.4 mini and Claude Haiku 4.5) were asked to solve 992 algorithmic problems as Java Spring Boot service methods conforming to a mandated signature and data-transfer-object specification, crossing four model and agentic coding tool combinations with two prompt variants to yield eight configurations, with iteration forbidden and hardcoded answers explicitly prohibited. Eight problem statements were withheld to probe how models respond to missing input. The 7,593 resulting methods were classified by an eight-class outcome taxonomy describing what each does about producing an answer, then deployed and executed, giving 7,936 measured requests joined to that classification. Structural conformance approached ceiling, yet 38.4% of methods do not compute the value they returned and only 12.9% of returned answers were correct. Conditioning on outcome class shows that response reliability and correctness are inversely related, whereas genuinely computing methods answered least often and were correct 19.3%. Limitations include single generation runs per configuration, partial harness coverage, single-pass timing, syntactic classification, and probable corpus contamination.