Human-Human-AI Triadic Programming: Uncovering the Role of AI Agent and the Value of Human Partner in Collaborative Learning
Taufiq Daryanto, Xiaohan Ding, Kaike Ping, Lance T. Wilhelm, Yan Chen, Chris Brown, Eugenia H. Rho
TL;DR
This work investigates whether AI in programming should replace or augment human collaboration by introducing a human–human–AI (HHAI) triadic programming setup. Using a within-subjects design with $n=20$ CS students across three conditions (Shared AI, Personal AI, and Human–AI), the study shows that HHAI enhances collaborative learning and social presence relative to a dyadic HAI baseline, while reducing reliance on AI-generated code—most strongly in the Shared AI condition. The authors demonstrate that AI integrated as a peer alongside humans activates socially shared regulation of learning, improving accountability and preserving conversational flow. They derive design implications emphasizing visible AI outputs to peers, calibrated proactivity, and multimodal integrated interfaces to augment rather than automate peer collaboration in educational programming contexts.
Abstract
As AI assistance becomes embedded in programming practice, researchers have increasingly examined how these systems help learners generate code and work more efficiently. However, these studies often position AI as a replacement for human collaboration and overlook the social and learning-oriented aspects that emerge in collaborative programming. Our work introduces human-human-AI (HHAI) triadic programming, where an AI agent serves as an additional collaborator rather than a substitute for a human partner. Through a within-subjects study with 20 participants, we show that triadic collaboration enhances collaborative learning and social presence compared to the dyadic human-AI (HAI) baseline. In the triadic HHAI conditions, participants relied significantly less on AI-generated code in their work. This effect was strongest in the HHAI-shared condition, where participants had an increased sense of responsibility to understand AI suggestions before applying them. These findings demonstrate how triadic settings activate socially shared regulation of learning by making AI use visible and accountable to a human peer, suggesting that AI systems that augment rather than automate peer collaboration can better preserve the learning processes that collaborative programming relies on.
