Large-Language Models (LLMs) are changing the way learners acquire knowledge outside the classroom setting. Previous studies have shown that LLMs seem effective in generating to short and simple questions in introductory CS courses using high-resource programming languages such as Java or Python. In this paper, we evaluate the effectiveness of LLMs in the context of a low-resource programming language -- OCaml, in an educational setting. In particular, we built three benchmarks to comprehensively evaluate 9 state-of-the-art LLMs: 1) $λ$CodeGen (a benchmark containing natural-language homework programming problems); 2) $λ$Repair (a benchmark containing programs with syntax, type, and logical errors drawn from actual student submissions); 3) $λ$Explain (a benchmark containing natural language questions regarding theoretical programming concepts). We grade each LLMs responses with respect to correctness using the OCaml compiler and an autograder. And our evaluation goes beyond common evaluation methodology by using manual grading to assess the quality of the responses. Our study shows that the top three LLMs are effective on all tasks within a typical functional programming course, although they solve much fewer homework problems in the low-resource setting compared to their success on introductory programming problems in Python and Java. The strength of LLMs lies in correcting syntax and type errors as well as generating answers to basic conceptual questions. While LLMs may not yet match dedicated language-specific tools in some areas, their convenience as a one-stop tool for multiple programming languages can outweigh the benefits of more specialized systems. We hope our benchmarks can serve multiple purposes: to assess the evolving capabilities of LLMs, to help instructors raise awareness among students about the limitations of LLM-generated solutions, and to inform programming language researchers about opportunities to integrate domain-specific reasoning into LLMs and develop more powerful code synthesis and repair tools for low-resource languages.


翻译:大语言模型(LLM)正在改变学习者在课堂外获取知识的方式。先前研究表明,LLM在针对使用高资源编程语言(如Java或Python)的计算机科学入门课程中,似乎能有效生成简短简单问题的解答。本文在OCaml这种低资源编程语言的教育背景下,评估LLM的有效性。具体而言,我们构建了三个基准测试来全面评估9个最先进的LLM:1)$λ$CodeGen(包含自然语言作业编程问题的基准);2)$λ$Repair(包含从实际学生提交中提取的具有语法、类型和逻辑错误的程序的基准);3)$λ$Explain(包含关于理论编程概念的自然语言问题的基准)。我们使用OCaml编译器和自动评分器,根据正确性对每个LLM的响应进行评分。此外,我们的评估超越了常见的评估方法,通过人工评分来评估响应的质量。研究表明,尽管在低资源环境下,LLM解决的作业问题数量远少于其在Python和Java入门编程问题上的成功案例,但排名前三的LLM在典型函数式编程课程的所有任务上均表现有效。LLM的优势在于纠正语法和类型错误,以及生成基础概念性问题的答案。虽然在某些领域,LLM可能尚无法媲美专用的语言特定工具,但其作为多编程语言一站式工具的便利性,可能超过更专业化系统的优势。我们希望我们的基准测试能够服务于多重目的:评估LLM不断发展的能力,帮助教师提高学生对LLM生成解决方案局限性的认识,并为编程语言研究者提供信息,以便将领域特定推理整合到LLM中,并为低资源语言开发更强大的代码合成与修复工具。

0
下载
关闭预览

相关内容

人们为了让计算机解决各种棘手的问题,使用编程语言 编写程序代码并通过计算机运算得到最终结果的过程。
利用多个大型语言模型:关于LLM集成的调研
专知会员服务
35+阅读 · 2025年2月27日
《以人为中心的大型语言模型(LLM)研究综述》
专知会员服务
41+阅读 · 2024年11月25日
大型语言模型(LLMs),附Slides与视频
专知会员服务
71+阅读 · 2024年6月30日
NLP 与 NLU:从语言理解到语言处理
AI研习社
15+阅读 · 2019年5月29日
用于数学的 10 个优秀编程语言
算法与数据结构
13+阅读 · 2018年1月5日
深度学习基础之LSTM
全球人工智能
29+阅读 · 2017年12月18日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
Palantir AIP平台:连接智能体与决策
专知会员服务
7+阅读 · 今天1:22
《美海军软件测试战略》90页slides
专知会员服务
7+阅读 · 今天1:00
面向具身智能与机器人仿真的三维生成:综述
专知会员服务
6+阅读 · 4月30日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员