Human ratings of LLM response generation in pair-programming dialogue (2025)

Abstract: We take first steps in exploring whether Large Language Models (LLMs) can be adapted to dialogic learning practices, specifically pair programming — LLMs have primarily been implemented as programming assistants, not fully exploiting their dialogic potential. We used new dialogue data from real pair-programming interactions between students, prompting state-of-the-art LLMs to assume the role of a student, when generating a response that continues the real dialogue. We asked human annotators to rate human and AI responses on the criteria through which we operationalise the LLMs’ suitability for educational dialogue: Coherence, Collaborativeness, and whether they appeared human. Results show model differences, with Llama-generated responses being rated similarly to human answers on all three criteria. Thus, for at least one of the models we investigated, the LLM utterance-level response generation appears to be suitable for pair-programming dialogue.

## introduction pair programming is a technique where two programmers work together, simultaneously, on the same piece of code. numerous studies have reported on its benefits for students, for example improving the quality of the code they produce or increasing their confidence @xcite . however, the literature also highlights the challenges that hinder the wider implementation of this technique, such as scheduling issues or lack of suitable partners (ibid.). a solution that has been proposed is using a dialogue agent as a partner when a human partner is not available. wizard-of-oz studies suggest the viability of this option, as students welcomed having an ai partner (even before llm-based dialogue systems became widely available), and they produced code of the same quality (or higher) as when pairing with a human @xcite . those studies discussed the technology available at the time that could be harnessed to develop the system that they simulated, with some limitations. in this context, the use of llms for response generation is promising. firstly, they can be adapted to new domains to produce reasonable natural language responses even with little domain adaptation @xcite . with regards to output quality, evaluation studies suggest, for example, that llms can generate coherent as well as engaging stories @xcite , whereas results are more mixed (depending partly on how well-resourced a language is) for data-to-text generation @xcite . @xcite considered the task of feedback comment generation for writing learning @xcite -a specifically educational settings. secondly, great advancements have been made recently in the automatic generation of code @xcite . nonetheless, code generation models have primarily been used as coding assistants rather than pair programmers (ibid.) some claims have been made about the use of llms for pair programming, but closer examination reveals that the collaborator role of a pairprogramming partner is conflated with llms' default assistant role foot_0 . an exception can be found more recently in a study @xcite where different educational pair-programming settings are explored; two of those settings (a human pair with an llm, and a solo human with an llm) encourage the use of llms as collaborators. still, the researchers found that the "llm-based tools were primarily perceived as technical assistants" (ibid, p. 8), used for debugging and syntax queries. in an educational setting, these tools need to simulate a different type of role: as collaborators that engage the learners @xcite . thus, here we take the first steps in exploring whether llms are suited to step out of the code assistant role and into a programming peer role. as a beginning step, we analyse whether they can generate single responses that are contextually appropriate in relation to the dialogue history so far, before the approach can be carried further to study whether the models' performance is consistent across a whole dialogue. guided by gricean maxims of conversation @xcite and the principles of dialogic teaching @xcite , we operationalise the idea of suitability as the responses being coherent (do the responses make sense in the current context?) and collaborative (do the responses make a helpful contribution without taking over the whole task?). in line with traditions in researching dialogue systems, we also evaluate whether answers seem human to users, to assess their naturalness. these gives rise to our three research questions: we carry out our evaluation by asking human annotators to rate a set of responses obtained by prompting two llms to provide a continuation to a given dialogue context. the dialogue contexts were obtained from real pair-programming dialogues between students @xcite . the raters who judged a portion of our large corpus were shown responses from our three sources (human ground truth, gpt, and llama), without knowing the source of any of them, nor how many might be ai-generated. our pair-programming dialogue corpus is, as of yet, not accessible while we finalise the evaluation studies that we collected it for, to avoid data contamination @xcite . the corpus will be available to the research community for future evaluation studies, but under rigorous conditions to prevent its use as potential training material for llms. nevertheless, we appreciate that over time the corpus might anyway be leaked into training data for future llms. the following section summarises the main studies that have informed our work. in our methodology section, we first provide a brief description of the dataset we used. then, we discuss how we arrived at our final prompts and model choices. thirdly, we describe how the evaluation of the responses was carried out. afterwards, we present and discuss our quantitative and qualitative analysis results. ## related work as defined above, pair programming is a collaboration technique used in programming whereby two individuals (a pair) work on the same code simultaneously @xcite . the pair can collaborate using the same computer if they are co-located, or they can collaborate remotely using the wide range of tools available for remote shared access to a programming interface @xcite . with two people programming simultaneously, roles need to be negotiated to ensure successful collaboration; this normally results in programmers adopting the role of navigator or driver, though researchers have sometimes described pairprogramming interactions through different roles @xcite . the navigator contributes verbally by suggesting where the code can go, while the driver types in the code that goes in the direction agreed with the navigator. these roles may be fixed or switch through the interaction; switching may even be encouraged in educational settings for students to benefit from both roles, as in @xcite ). pair programming has attracted much scholarly interest and its benefits and implementation have been studied in both educational and professional settings @xcite . among the most widely reported benefits are increased code quality and programmer confidence @xcite @xcite . despite its benefits, pair programming faces significant hurdles for its implementation in educational settings specially. infrastructural issues can be remedied through the use of platforms and other tools for remote pair programming @xcite . however, other issues remain largely unsolved: scheduling problems and lack of suitable partners @xcite . one solution that has been proposed is replacing the human partner with an ai agent when no (suitable) human partner can be found. as we mentioned, this idea has been tested through wizardof-oz studies @xcite . these studies showed that, even before llm-chatbots entered everyday life, students could welcome an ai partner, and that the quality of the code produced with an ai partner could be similar or sometimes higher than when collaborating with a human partner. the authors of these studies designed the interactions based on the state of the art at the time, but since then great advances have been made in natural language processing and programming language processing, both separately and in conjunction @xcite . since the release of openai's chatgpt, a large body of research has been released using this tool and other large language models -see @xcite for a review focused on chatgpt; while it seems to be the most widely used model, there are numerous open-source and open-weights alternatives @xcite . these models have surpassed previous techniques in all kinds of nlp tasks. while testing on previous nlp benchmarks can be uninformative due to possible data contamination, evidence of excellent llm performance in many language-related tasks is abundant; see @xcite or @xcite for some interesting examples among the many available. moreover, they are making advanced nlp tools increasingly accessible, as often good results can be obtained without even the need to finetune @xcite , and even zero-shot use can be sufficient in some scenarios through effective prompting @xcite . additionally, newer large language models are being released with an emphasis on efficiency, making their use feasible even without gpus (e.g., high-performing small variants of the llama family can be run on simple cpus foot_1 ). this growing smorgasbord of llms also features different types of models with regard to their openness (ranging from commercial models to fully open models), further increasing their accessibility @xcite . llms are not only stateof-the-art models of popular natural languagestheir training data also includes code. while performance is not always up to par @xcite , llms have generally demonstrated good performance at tasks involving code @xcite . thus, in the current landscape, it appears that llms could be ideally suited to fulfill the role envisioned in the cited wizard-of-oz studies @xcite : having ai as a pair-programming partner when no suitable human partner is available. in addition to large size, one important ingredient for llms' success is instruction tuning @xcite . this optimises the models for dialogue use and task completion via prompting, beyond the simple objective of text completion. llms are already revolutionising the education sector, for better or worse. they have been used in many instances for computing education, primarily for question-answering and debugging @xcite . however, to harness the educational potential of these tools, students need to be engaged as active agents in their learning, rather than passive recipients of information @xcite . for that to happen, models need to be guided away from a helpful assistant role into an engaging collaborator role, be it through few-shot learning or finetuning @xcite . that switch in roles could allow llms to be used in dialogic teaching practices, which require collaboration @xcite . llms have already shown their ability to imitate students in some contexts @xcite ) -can they also act as pair-programming partners? ## results and discussion ## conclusions we set out to explore whether recent llms have brought the state of the art to a stage where an ai pair-programming partner could be easily developed. we tested llama 3.2 1b and gpt 4o mini on humanness, coherence, and collaborativeness. both models returned good responses in terms of coherence, though for our other suitability measures llama showed much better performance than gpt. its ability to imitate the style of the input dialogue made its answers seem more human-like. as a side effect, llama responses were also rated as more collaborative overall, since they included some instances of cumulative talk and were rarely rated as not collaborative. responses from gpt often showed a style easily recognised as characteristic of llms; this style also led gpt responses to often be rated as not collaborative, as the prototypical llm-style response features a complete solution, instead of making the user a participant in the development of the solution. llama's already promising performance was obtained through few-shot learning, showing a promising path where large datasets might not be needed to adapt a general-knowledge model to our task. nonetheless, we will release a modest dialogue dataset which could be utilised to explore more data-intensive approaches (e.g., fine-tuning pre-trained models). future work also needs to confirm whether performance remains consistent through a whole dialogue. llama showed good performance at the utterance level through different stages of the evaluation dialogues; however, performance consistency has not yet been tested in a more realistic scenario of live interaction. what seems clear is that, although models have been trained to be helpful, this does not always translate into them being collaborative. in settings where what is helpful differs from obsequious subservience, it is thus necessary to teach the models a different attitude. fortunately, as we have shown, with certain models, a few-shot approach may be sufficient.