Will Your Next Pair Programming Partner Be Human? An Empirical Evaluation of Generative AI as a Collaborative Teammate in a Semester-Long Classroom Setting

Wenhan Lyu, Yimeng Wang, Yifan Sun, Yixuan Zhang

An Empirical Evaluation of Generative AI as a Collaborative Teammate in a Semester-Long Classroom Setting

Abstract

This study evaluates whether Generative AI (GenAI) can function as a true "teammate" in pair programming rather than just a tool. Through a semester-long investigation, researchers found that the combination of two humans plus AI (PAI) yielded the highest performance, while solo students working with AI (SAI) performed the worst. These results suggest that AI currently complements, but does not replace, the cognitive benefits of human collaboration.

Introduction

Pair programming—where two developers share one workstation to write and review code—is a cornerstone of computer science education and industry practice. However, the rise of Large Language Models (LLMs) like GitHub Copilot and ChatGPT has disrupted this dynamic. While LLMs are proficient at generating code snippets, their role as long-term collaborators remains poorly understood. This paper addresses the lack of empirical evidence regarding how GenAI influences collaboration dynamics, learning outcomes, and student attitudes in a real-world classroom setting.

Methodology

The researchers conducted a mixed-methods study over a full semester with 39 undergraduate students in an advanced Web Development course. The study utilized a randomized within-subjects design where students completed assignments under three distinct conditions following an initial familiarization phase:

  1. Traditional Pair Programming (PP): Two humans, no GenAI.
  2. Pair Programming with GenAI (PAI): Two humans working alongside LLM tools.
  3. Solo Programming with GenAI (SAI): One human paired with LLM tools.

Students had access to both inline completion (GitHub Copilot) and conversational AI (ChatGPT). The team collected quantitative performance metrics (autograded assignment scores) and longitudinal survey data at three time points (Initial, Midterm, Final).

Figure 1: Study timeline and experimental conditions across three stages of the semester.

Key Insights and Results

Performance Outcomes

The study revealed a significant performance gap between the experimental conditions. Students in the PAI (2 humans + AI) condition achieved the highest median score of 60.00, significantly outperforming the SAI (Solo + AI) condition, which had the lowest median score of 33.33. Traditional pair programming (PP) fell in the middle with a median score of 47.14.

Figure 4: Distribution of assignment scores across the three experimental conditions (PAI, PP, SAI), showing the performance advantage of human-AI collaboration.

The "Triple Threat" Advantage

The highest performance in the PAI condition suggests that the "Navigator" role in pair programming remains essential. A human partner is needed to vet AI suggestions and maintain high-level logic, tasks that a solo programmer often struggles to manage alone while interacting with an LLM.

Evolving Roles and Workflows

  • Role Specialization: Students treated AI as a Technical Assistant for syntax and debugging, while reserving humans for Idea Exchange regarding architectural decisions and creative problem-solving.
  • Deadlock Breaking: AI acted as a bridge in novice-novice pairs, providing the initial momentum needed to overcome "problem-solving deadlocks."
  • Distributed Workflow: Students moved away from single shared screens, finding AI chat too disruptive. They adapted by using multi-screen setups where one person coded while the other researched via AI.

Attitudinal Shifts

Students' agreement that LLMs are an integral part of their "Coding Routine" increased significantly over the semester ($p < 0.05$). Preference for future AI-assisted solo programming was driven by a positive perception of GenAI's collaboration quality, whereas those valuing "skill development" preferred the PAI condition.

Conclusion

While GenAI is a powerful tool, it does not yet replace the necessity of human partnership in complex programming tasks. The study highlights that the most effective configuration is a hybrid model where AI supports a human pair.

Limitations and Future Work: The study's small sample size (N=39) and classroom environment may limit generalizability. Future research should investigate voice-integrated AI to reduce context-switching friction and explore the long-term ethical implications of AI reliance on fundamental skill acquisition in early computer science education.

Summary updated

BibTeX
@misc{lyu2025will,
  author = {Wenhan Lyu and Yimeng Wang and Yifan Sun and Yixuan Zhang},
  title = {{Will Your Next Pair Programming Partner Be Human? An Empirical Evaluation of Generative AI as a Collaborative Teammate in a Semester-Long Classroom Setting}},
  year = {2025},
  eprint = {2505.08119},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.08119},
}
Figure