TL;DR
This study compares the quality of C programming learning resources generated by OpenAI’s Codex model against those created by students in a large introductory course. Through a blind peer-evaluation process, the researchers found that students perceived AI-generated content to be just as correct and helpful as content created by their human peers.
What Problem Does This Paper Address?
As education shifts toward online platforms, there is an insatiable demand for high-quality, personalized learning materials (like practice problems and explanations). Traditionally, this burden falls on instructors or is distributed to students through "learnersourcing"—where students create content for one another. However, learnersourcing often suffers from inconsistent quality and low student engagement.
Large Language Models (LLMs) offer a potential third way: generating educational content at scale. The core question this paper tackles is: Can we trust LLMs to produce content that is actually useful and accurate for learners? Specifically, how does AI-generated content stack up against human-generated content when both are given the same starting examples?
Methods
The researchers integrated a study into a first-year programming course ($N=950$ students) at the University of Auckland using a platform called RiPPLE.
- The Task: Students were asked to create a "code example" consisting of a C code fragment and a natural language explanation. They were provided with six instructor-created exemplars to guide them.
- AI Generation: The researchers used the same six exemplars to prompt OpenAI Codex (
code-davinci-002) using a few-shot approach. They generated 100 novel examples. - Blind Evaluation: Both student-generated ($n=886$) and AI-generated ($n=101$) resources were pooled together. Students then performed peer reviews, rating the resources on a 5-point scale for code correctness, explanation correctness, and overall helpfulness, without knowing the source of the content.
Datasets
The study utilized:
- Instructor Exemplars: 6 C programming functions (e.g., calculating averages, reversing arrays) used as prompts.
- Student Contributions: 886 unique code/explanation pairs.
- AI Contributions: 100 unique code/explanation pairs generated by Codex.
- Peer Review Data: A total of 4,499 individual evaluations provided by students.
Key Insights and Ideas
- The "Mirroring" Effect: AI-generated resources tended to follow the instructor's exemplars very closely. They were concise and focused on single functions. In contrast, students showed much higher autonomy, often including test cases, comments, or full-fledged programs.
- Syntactic Divergence: There were significant differences in how the two groups used C keywords. For instance, the AI used
whileloops four times more frequently than students, while students preferredforloops. The AI also used thereturnkeyword nearly twice as often as humans. - Quality Parity: Despite the differences in style and length, the perceived quality was statistically indistinguishable. This suggests that LLMs have reached a "utility threshold" where they can effectively supplement human-authored materials in introductory technical subjects.
Key Results
- Perceived Quality: Both student and AI resources received a median score of 4 out of 5 across all categories (code correctness, explanation correctness, and helpfulness). No statistically significant difference was found ($p > 0.05$).
- Content Length: AI-generated code was significantly shorter (median 224 characters) than student code (median 377 characters). Conversely, AI explanations were longer and more detailed (median 395 characters) than student explanations (median 303 characters).
- Reliability: AI-generated explanations were noted for having almost zero grammatical or spelling errors, which may have contributed to their high helpfulness ratings.
Limitations and Future Work
- Prompt Sensitivity: The AI's tendency to mirror the prompt suggests that the variety of AI output is heavily dependent on the diversity of the few-shot examples provided. Future work should explore how different prompting strategies affect the "creativity" of the output.
- Domain Specificity: This study was limited to introductory C programming. It remains to be seen if LLMs perform as well in more subjective fields or advanced technical topics where "correctness" is harder to define.
- Long-term Learning Outcomes: While students perceived the AI content as helpful, the study did not measure whether using AI-generated resources actually leads to better exam performance or deeper conceptual understanding over time.
Summary updated