arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.11908cs.SEcs.AIcs.ET
收藏

LLM4DS:评估用于数据科学代码生成的大型语言模型

LLM4DS: Evaluating Large Language Models for Data Science Code Generation

Pennsylvania State University(宾夕法尼亚州立大学)

Nathalia Nascimento, Everton Guimaraes, Sai Sanjna Chintakunta, Santhosh Anitha Boominathan

AI总结:

本文通过对照实验评估四种主流LLM在数据科学代码生成任务上的表现,发现所有模型均超过50%基线成功率,但仅ChatGPT和Claude显著超过60%基线,为按任务需求选择模型提供了实证依据。

摘要:

大型语言模型(LLMs)在数据科学代码生成中的应用,为增强数据操作、统计分析和可视化等任务提供了巨大潜力。然而,这些模型在数据科学领域的有效性仍未得到充分探索。本文提出了一项对照实验,实证评估了四种领先的基于LLM的AI助手——Microsoft Copilot(GPT-4 Turbo)、ChatGPT(o1-preview)、Claude(3.5 Sonnet)和Perplexity Labs(Llama-3.1-70b-instruct)——在来自Stratacratch平台的一组多样化数据科学编码挑战上的表现。采用目标-问题-度量(GQM)方法,我们评估了每个模型在不同任务类型(分析型、算法型、可视化型)和不同难度级别上的有效性。我们的研究结果表明,所有模型都超过了50%的基线成功率,证实了它们超越随机猜测的能力。值得注意的是,只有ChatGPT和Claude的成功率显著高于60%的基线,但没有一个模型达到70%的门槛,这表明在更高标准下存在局限性。ChatGPT在不同难度级别上表现出一致的性能,而Claude的成功率随任务复杂度而波动。假设检验表明,任务类型总体上对成功率没有显著影响。对于分析型任务,效率分析显示执行时间没有显著差异,尽管ChatGPT尽管成功率高,但往往更慢且更不可预测。本研究提供了对数据科学中LLMs的结构化实证评估,提供了支持根据特定任务需求进行明智模型选择的见解。我们的研究结果为未来的AI评估建立了一个框架,强调了超越基本准确率指标的严格评估的价值。

英文摘要:

The adoption of Large Language Models (LLMs) for code generation in data science offers substantial potential for enhancing tasks such as data manipulation, statistical analysis, and visualization. However, the effectiveness of these models in the data science domain remains underexplored. This paper presents a controlled experiment that empirically assesses the performance of four leading LLM-based AI assistants-Microsoft Copilot (GPT-4 Turbo), ChatGPT (o1-preview), Claude (3.5 Sonnet), and Perplexity Labs (Llama-3.1-70b-instruct)-on a diverse set of data science coding challenges sourced from the Stratacratch platform. Using the Goal-Question-Metric (GQM) approach, we evaluated each model's effectiveness across task types (Analytical, Algorithm, Visualization) and varying difficulty levels. Our findings reveal that all models exceeded a 50% baseline success rate, confirming their capability beyond random chance. Notably, only ChatGPT and Claude achieved success rates significantly above a 60% baseline, though none of the models reached a 70% threshold, indicating limitations in higher standards. ChatGPT demonstrated consistent performance across varying difficulty levels, while Claude's success rate fluctuated with task complexity. Hypothesis testing indicates that task type does not significantly impact success rate overall. For analytical tasks, efficiency analysis shows no significant differences in execution times, though ChatGPT tended to be slower and less predictable despite high success rates. This study provides a structured, empirical evaluation of LLMs in data science, delivering insights that support informed model selection tailored to specific task demands. Our findings establish a framework for future AI assessments, emphasizing the value of rigorous evaluation beyond basic accuracy measures.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑