Year: 2026
Type: dissertation
Abstract: This study investigates the ability of small language models (SLMs) to contextualize beginner programming exercises and compares their performance to that of large language models (LLMs). Contextualization can improve engagement and understanding, but solutions based on LLMs raise concerns regarding privacy and computational requirements. SLMs offer full control over input and output data and can be run locally on consumer-grade hardware, making them a potential alternative for such tasks. The objective of this study was to determine whether SLMs can consistently contextualize existing beginner-level programming exercises according to a given context. Models of varying sizes and specializations were evaluated to assess their ability to perform this task and to compare their performance with that of LLMs. The results show that some SLMs are capable of producing meaningful and consistent contextualizations, with performance in certain cases comparable to LLMs. Model size alone was not a reliable predictor of performance, as factors such as training data and model specialization had a significant impact. These findings suggest that appropriately selected SLMs can serve as a viable alternative to LLMs for contextualizing programming exercises.
Source: Aaltodoc (Aalto University)
Author: Kaluski, Daniel
Language: English
Subfield: Computer Science Applications
Field: Computer Science
Domain: Physical Sciences
SDG: Quality education
Open Access status: green
OpenAlex ID: W7165506807
