
ATMOS
Yun Ma: New Exploration of AI-Enhanced Programming Instruction at Peking University
On September 9, 2024, Peking University's "Cyber Teaching Assistant" system ushered in a major expansion and upgrade, and Ma Yun's team launched a general teaching auxiliary system suitable for all subjects - "Cyber Teacher".

China Education Network
“After the launch of ChatGPT, I was impressed by its programming capabilities and began considering how it could support teaching. However, integrating course teaching with large language models (LLMs) was unprecedented, so everything had to start from scratch,” says Ma Yun, Assistant Professor at the Artificial Intelligence Research Institute at Peking University, in an interview.
Peking University offers a compulsory course, Introduction to Computing C, to over 1,600 non-science students each year. Ma is responsible for one of the classes, which has around 120 students. In the summer of 2023, he integrated ChatGPT into the course by developing a “Cyber Teaching Assistant.”
Introduction to Computing C: A Programming Course for Humanities Students
Introduction to Computing C, formerly Computer Basics for Humanities, is a required course for non-science majors at Peking University, initially covering basic computer principles and tools like WORD, PPT, and EXCEL. In 2020, it was renamed Introduction to Computing C, and the curriculum shifted to Python programming.
Ma’s teaching team includes 17 instructors, collectively teaching more than 1,600 students annually. Introduction to Computing C is designed to develop students’ computational thinking, guiding them to apply programming methods to solve practical problems. Internationally, the rise of AI has encouraged the use of computational analysis in the humanities and social sciences, forming new research paradigms.
The teaching group encourages innovation, and Ma takes an open-minded approach, enthusiastically embracing new technologies. He frequently introduces students to IT trends, such as cloud computing, big data, AI, blockchain, and the metaverse. With the emergence of ChatGPT, he incorporated it into his teaching, creating a self-help Q&A system called “Cyber TA” and applied LLMs across lectures, assignments, and lesson prep.
The Birth of "Cyber TA"
Introduction to Computing C targets non-science majors with varied backgrounds in math, computer science, and logical thinking, making programming a challenging course. Programming requires scientific thinking and skill, and students often encounter issues, resulting in a high volume of questions. Although Peking University typically assigns three teaching assistants to classes of this size, Ma recruited three additional volunteers to form a team of six, barely keeping up with student inquiries, especially near assignment deadlines and exams.
Seeing this need, Ma’s team developed Cyber TA using ChatGPT’s advanced programming capabilities. The first challenge was adapting ChatGPT, a general-purpose LLM, to suit the course content. They crafted a series of prompt templates to fill in with specific details of students’ questions, such as, “You are a TA helping humanities students with Python programming. The task is [ ], the example is [ ], the student’s code is [ ], and the problem encountered is [ ]. Please correct the issue.” When students submit a link with problematic code, Cyber TA fills in the prompt and sends it to ChatGPT for a more targeted answer. This was Cyber TA’s first feature—debugging code.
Ma’s team also added two other functions: “Add Comments” to generate code annotations to help students understand code logic and “Alternative Solutions” to provide multiple approaches to the same problem, encouraging students to explore different solutions.
Cyber TA was well-received by students, with over 84% frequently using it, 92% turning to it first when encountering bugs, and over 80% finding it beneficial to their programming skills.
Practical Challenges and Future Directions
Despite Cyber TA’s success, there are areas for improvement. First, Cyber TA’s responses sometimes misalign with the course pace, introducing advanced topics too early, which can confuse beginners. Ma is exploring ways to adapt answers to students’ levels by creating beginner and advanced versions, as well as a version for international students needing multi-language support.
Second, Cyber TA struggles with more complex problems, particularly those requiring algorithmic techniques. Improving the model’s ability to tackle these challenges is an ongoing focus.
Third, some students have become overly reliant on Cyber TA, neglecting their debugging skills. Ma placed a message on Cyber TA’s homepage: “A ship in harbor is safe, but that’s not what ships are built for.” After exams, many students admitted this message resonated with them, realizing that over-reliance on Cyber TA could hinder their growth.
Application of Large Language Models in Teaching
In addition to Cyber TA, Ma Yun has integrated large language models (LLMs) into the teaching, assignments, and lesson planning stages of his course.
In the teaching phase, Ma designated specific class time to explain the foundational principles of LLMs and techniques to enhance response quality through prompt engineering. He introduced methods like “assigning roles to the model,” “providing highly specific instructions,” and “using chain-of-thought prompts.” He encouraged students to use LLMs regularly to boost their learning efficiency.
In the assignments phase, Ma combined LLMs with course projects, encouraging students to use LLMs like Baidu’s Ernie Bot for “paired programming” as an extension beyond the core curriculum. Ma even encouraged students to try completing assignments solely through interaction with an LLM without writing a single line of code; while no group fully achieved this, many produced innovative functionalities using LLMs. Through these projects, students discovered that they could apply classroom knowledge with LLMs to achieve complex and practical features. They also realized that although LLMs can assist with certain programming tasks, solving real-world problems still requires substantial skill and human insight.
For lesson planning, Ma used LLMs to create assignment and exam questions and adjusted the difficulty distribution of exercises. Programming involves two steps: first, translating real-world issues into mathematical problems, and second, converting those into programming language. While question topics can vary greatly, the underlying principles remain consistent. Students often struggle to see the essence behind the question, which requires cognitive flexibility. LLMs are well-suited for designing realistic questions relevant to students' fields, saving time for instructors. For instance, before the midterm exam, a monkey wandering around Peking University became a campus-wide discussion, so Ma created a two-dimensional array question inspired by the incident, which students found highly engaging.
Lifelong Learning is Essential for Teachers and Students
Ma believes that while ChatGPT’s emergence is impressive, it is fundamentally a tool. Technology is evolving at an unprecedented rate. In the past, new innovations would take decades; now, groundbreaking technologies may emerge within a few years or even months. At present, ChatGPT cannot extend the boundaries of human knowledge. Although AI may develop this ability in the future, expanding these boundaries still relies on human wisdom today. For teachers and students, lifelong learning is an ongoing journey.
For this reason, Ma sees LLMs as setting a higher standard for the Introduction to Computing C course.
First, students must be taught AI-related knowledge and understand the value of human thought. They should learn about the mechanics, methods, and thought processes of AI and be able to apply it to everyday issues. At the same time, they should realize that simply assigning a task to AI does not guarantee high-quality answers. It requires step-by-step breakdowns, a comprehensive grasp of the subject, and both macro and micro understanding. Ma wants students to understand that AI can handle foundational, repetitive tasks, while humans should engage in higher-level activities that reflect intellectual depth, creativity, and interpersonal connection.
Second, students need to learn how to achieve human-machine synergy. They must learn to think critically about collaborating effectively with AI to enhance efficiency. In other words, students should understand how to go from zero to one, then use AI to accelerate from one to one hundred. While AI improves efficiency, the core content must still be understood by humans who can leverage AI to achieve a leap in productivity.
Future Exploration
Founded in 2019, the Artificial Intelligence Research Institute at Peking University is a cross-disciplinary platform for faculty across departments to explore AI applications in their fields. Professors from various schools can discuss using AI to address field-specific challenges and contribute to building better AI. For example, faculty in the Philosophy Department examine the origins and philosophical principles of intelligence, while those in the Law School focus on legal and ethical frameworks for AI, and professors in the Life Sciences analyze the brain’s intelligence mechanisms to inspire AI design. With its broad range of disciplines, Peking University’s collaborative environment has led faculty to generate numerous innovative ideas, supporting various fields of inquiry. Ma currently collaborates with professors from the Foreign Language Department, the School of Journalism and Communication, and the School of Psychology and Cognitive Science on multiple interdisciplinary projects.
Regarding Introduction to Computing C, Cyber TA currently focuses on assignment support. Ma and his assistants are expanding its features to cover class materials and textbooks, adding practical capabilities beyond Q&A. Ma aims to lean further into AI integration in his 2024 curriculum, continually exploring educational reforms suited to the AI era.
Source: China Education Network, Feb-Mar 2024