← Latest papers
💬 NLP

Automated Knowledge Component Generation for Interpretable Knowledge Tracing in Coding Problems

This paper introduces KCGen-KT, an automated LLM-based pipeline that generates and tags knowledge components for open-ended coding problems, demonstrating through extensive evaluation that these AI-generated components outperform traditional human-written ones in predicting student performance and modeling learning curves.

Original authors: Zhangqi Duan, Nigel Fernandez, Arun Balajiee Lekshmi Narayanan, Mohammad Hassany, Rafaella Sampaio de Alencar, Peter Brusilovsky, Bita Akram, Andrew Lan

Published 2026-05-19
📖 5 min read🧠 Deep dive

Original authors: Zhangqi Duan, Nigel Fernandez, Arun Balajiee Lekshmi Narayanan, Mohammad Hassany, Rafaella Sampaio de Alencar, Peter Brusilovsky, Bita Akram, Andrew Lan

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are a teacher trying to figure out exactly what a student is struggling with in a coding class. In the old days, you'd have to manually write down a list of specific skills (like "knowing how to use a loop" or "understanding how to add numbers") and then go through every single homework problem to tag which skills it tested. This is like a librarian manually writing a card catalog for every book in a massive library; it takes forever, is prone to human error, and is incredibly boring.

This paper introduces a new, automated way to do this using Artificial Intelligence (specifically, Large Language Models or LLMs), but with a twist: it works for open-ended coding problems, where students write their own code from scratch, rather than just picking answers from a multiple-choice list.

Here is a breakdown of what they did, using simple analogies:

1. The Problem: The "Open-Ended" Chaos

In multiple-choice questions, there is only one right answer, so it's easy to guess what skill was being tested. But in coding, students can solve the same problem in ten different ways. One student might use a "for loop," while another uses "regular expressions." Both get the right answer, but they used different skills.

  • The Analogy: Imagine asking people to build a birdhouse. If you give them a multiple-choice quiz, you know exactly what they learned. But if you ask them to build it, one person might use a hammer and nails, while another uses glue and wood. Figuring out exactly which skills each person used just by looking at the finished birdhouse is very hard.

2. The Solution: The AI "Skill Detective"

The authors built a three-step automated pipeline to act as a "Skill Detective":

  • Step 1: The Investigation (Generation): They feed the AI a coding problem and a bunch of different student solutions (both correct and incorrect). The AI acts like a detective, reading the code and saying, "Ah, to solve this, you needed to know how to use an 'If statement' and how to do 'Math with absolute values'." It creates a list of these skills (called Knowledge Components, or KCs).
  • Step 2: The Sorting Hat (Clustering): The AI might generate 100 slightly different names for the same skill (e.g., "If-Else," "Conditional Logic," "Decision Making"). The system groups these similar ideas together, like sorting a pile of mixed socks into pairs.
  • Step 3: The Label Maker (Summarization): Finally, the AI looks at each group of similar skills and gives them one clear, human-readable name (like "Conditional Logic"). It then tags every problem with these new, clean labels.

3. The Result: A Smarter Tutor (KCGen-KT)

Once the AI has these skill labels, they built a new "Knowledge Tracing" system (a way to track student learning over time) called KCGen-KT.

  • How it works: Instead of just guessing if a student will get the next question right or wrong, this system looks at the student's history with specific skills. It asks, "Does this student struggle with 'Loops' but ace 'Variables'?"
  • The Magic: The system translates the student's skill level into a "soft token" (a digital signal) that the AI can read. This allows the AI to predict not just if the student will fail, but what their next piece of code will look like.

4. The Proof: Did it Work?

The researchers tested this on two real-world datasets containing thousands of student coding submissions (one in Java, one in Python).

  • Better than Humans: Surprisingly, the AI-generated skill tags actually helped predict student performance better than the tags written by human experts.
  • Better than Old AI: The new system beat previous state-of-the-art AI models that didn't use these specific skill tags.
  • The "Learning Curve" Check: They checked if the system followed the "Law of Practice" (the idea that people get better the more they practice). The AI-generated skills showed a clear pattern: as students practiced a specific skill more, their error rate went down. This proved the AI was identifying real, meaningful skills.
  • Human Approval: When they showed the AI's work to actual computer science teachers, the teachers agreed that the AI's skill descriptions were clear, understandable, and accurate.

Summary

In short, this paper says: "We taught an AI to automatically figure out exactly what skills students are using in their coding homework. We then used those AI-generated skill tags to build a smarter system that predicts how students will do in the future. It works better than human experts and better than previous AI methods, and it helps us understand student learning in a way that is clear and interpretable."

What they did NOT claim:

  • They did not claim this replaces teachers; they explicitly state it is meant to support them.
  • They did not test this on math or science problems yet (only coding).
  • They did not claim it is perfect; they noted that sometimes the AI misses skills shared across problems because it analyzes them one by one.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →