One night, I found my partner, Boyan Li, hunched over a stack of programming submissions at our kitchen table.

One night, I found my partner, Boyan Li, hunched over a stack of programming submissions at our kitchen table. As part of his PhD teaching at Harvard Medical School in Boston, Massachusetts, he had assigned students a computational-biology task: implement a specified algorithm and run it on a provided data set. Grading, however, was not a simple matter of pressing “run” and checking whether the numbers matched. Each solution had to be executed, its outputs reviewed and its logic followed line by line.

Some submissions were unambiguous. A few were plainly correct; others failed outright. But most of the work lived in the middle ground — programs that were partially right, or correct in one scenario but fragile in another, or that reached the right answer for the wrong reasons. Those cases demanded the most time and judgement. Watching as a higher-education researcher, I was struck by how interpretive the process was. Even when the artefact is code — often seen as rigid and rule-bound — evaluation still hinges on decisions about what constitutes understanding, what counts as an acceptable mistake and how much variation in approach should be rewarded or penalized. In that sense, grading becomes less like a mechanical audit and more like a conversation between teacher and learner.

That observation raised a practical question: could generative artificial intelligence help with the heavy lifting of assessment without stripping away the human judgement that makes grading meaningful?

Programming assignments, on paper, look like an ideal use case. Unlike essays, code is structured, constrained by syntax and designed to produce verifiable outputs. To test the idea, Li tried OpenAI’s ChatGPT 5.4. He provided the model with the assignment instructions and an instructor reference solution, then asked it to judge a student’s submission for correctness.

The results were disappointing. In practice, the system behaved as though it were performing a “diff” against the reference: it largely evaluated similarity rather than understanding. It struggled to recognize legitimate alternative implementations and routinely flagged differences as problems. It also tended to fixate on secondary concerns, such as computational efficiency, instead of the central learning goal — whether the student had grasped and correctly implemented the underlying algorithm.

It became clear that the tool was missing the pedagogical context that human graders carry implicitly. I suggested feeding it information that instructors typically learn through teaching: common student errors, known stumbling blocks and guidance on which minor issues can be ignored. Li already had a workflow that generated some of this insight. Before marking, he writes his own solution and then studies the official reference, a process that helps him predict where students might go wrong — often in the same places he initially struggled.

More context came from interactions with students themselves. In office hours, similar questions surfaced repeatedly. Some students arrived with AI-generated explanations that they could not fully interpret, offering clues about where conceptual misunderstandings were clustering. Those patterns revealed bottlenecks in correctly implementing the full algorithm — bottlenecks that would not be obvious from the reference solution alone.

Once those insights were incorporated, the AI became more useful in a specific way: it could help expand testing beyond the rubric’s headline checkpoints. It suggested additional test cases to probe edge conditions — scenarios with extreme but valid inputs where a seemingly working program can fail.

In one assignment, students wrote a genome-sequence alignment algorithm. A student submitted code that was long, difficult to read and yet passed all three rubric checks. ChatGPT, after extended reasoning, pointed to a flaw in the underlying logic and proposed an edge case where the program would produce the wrong result. Without the model’s prompt, the error might have slipped through or required hours of painstaking manual tracing.

Even then, the limitations remained. ChatGPT sometimes treated harmless departures from the reference as incorrect, and it could deliver confident-sounding explanations that collapsed under scrutiny — reminders that, at least for now, AI can assist grading, but it cannot replace the contextual judgement that educators bring to assessment.