McGill University
Evaluating LLMs in the context of a functional programming course: A comprehensive study
Abstract
dc:description.abstractLarge-Language Models (LLMs) are changing the way learners acquire knowledge out- side the classroom setting. Previous studies have shown that LLMs seem effective in responding to short and simple questions in introductory CS courses using high-resource programming languages such as Java or Python. This thesis evaluates the effectiveness of LLMs in the context of a low-resource programming language—OCaml—within 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 program- ming problems); 2) λREPAIR (a benchmark containing programs with syntax, type, and logical errors drawn from actual student submissions); and 3) λEXPLAIN (a benchmark containing natural language questions regarding theoretical programming concepts). We grade each LLM’s responses with respect to correctness using the OCaml compiler and an autograder. Furthermore, our evaluation goes beyond common evaluation methodology by using manual grading to assess the quality of the responses with respect to correctness, algorithm design, and readability.Our study shows that the top three LLMs are effective on all tasks within a typical functional programming course, although they solve significantly fewer homework prob- lems in this low-resource setting compared to their success on introductory 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 for students.This work provides several contributions: our benchmarks serve to assess the evolv- ing capabilities of LLMs, help instructors raise awareness among students about the limitations of LLM-generated solutions, and inform programming language researchers about opportunities to integrate domain-specific reasoning into LLMs to develop more powerful code synthesis and repair tools for low-resource languages.
Degree
thesis:*- Name thesis:degree_name
- Master of Science
- Grantor dc:publisher
- McGill University
- Year dc:date.issued
- 2026
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Zhang, Jaylene
- Advisor dc:contributor.advisor
-
- Pientka, Brigitte
Subjects
dc:subject × 1Rights
dc:rights- Statement dc:rights
-
- All items in eScholarship@McGill are protected by copyright with all rights reserved unless otherwise indicated.
- Language dc:language.iso
- en
Identifiers
dc:identifier.*- OCLC
- 1600266799
- Identifier URI
- https://hdl.handle.net/20.500.14905/140977