Imagine you’re a TA grading a stack of data science notebooks. The first question asks students to pick a feature to drop from a dataset and justify it. Student A drops "number of bedrooms." Student B drops "square footage." Both are perfectly valid choices.
But here’s the catch: the rest of the assignment—the model training, the error plots, the final analysis—depends entirely on that first choice. If you’re a traditional autograder looking for a single "correct" numerical answer, you’re going to fail Student B, even if their logic is flawless. This "path-dependency" is why we still spend countless hours grading notebooks by hand.
This paper introduces a way to move beyond rigid unit tests and into the world of path-aware, rubric-guided autograding using Large Language Models (LLMs).
TL;DR
The authors developed an LLM-based system that grades Jupyter notebooks not as a series of isolated tests, but as a logical "flow" where later answers are judged based on a student's earlier, unique choices. By "softening" instructor rubrics to accept alternative valid paths and using multimodal vision to "see" student plots, the system achieves human-level grading agreement at a fraction of the cost.
What Problem Does This Paper Address?
In fields like machine learning and data science, assignments are often flow-structured. They aren't just about writing a function that passes a test; they are about a narrative of inquiry. A student might make a design choice in cell 2 that changes the "correct" output for cell 20.
Current autograders (like nbgrader) are great at checking if a function returns 42, but they are brittle when faced with open-ended analysis. They can't easily judge if a written justification makes sense or if a plot accurately reflects the code that generated it. This leaves instructors with a choice: stick to boring, rigid assignments that are easy to grade, or assign authentic, open-ended projects that take weeks to grade manually.
Methods
The authors built a pipeline that treats the LLM like a sophisticated teaching assistant. Here is how the "magic" happens:
- Rubric Generation & Softening: The system takes an instructor’s reference solution and generates a draft rubric. It then performs a "softening pass," rewriting rigid criteria (e.g., "Must drop bedrooms") into flexible ones (e.g., "Must drop a justified feature and maintain consistency").
- Question Grouping: Instead of grading one cell at a time, the system sends "question groups" to the LLM. This gives the model the context it needs to see how Q1 influenced Q3.
- Multimodal Evidence: The grader doesn't just read code; it uses vision-capable models to inspect student-generated figures and plots.
- Human-in-the-Loop: The system includes an "Instructor Review" interface where staff can see the LLM’s reasoning, confidence scores, and flags for manual review before any grade is finalized.
Datasets
The system was battle-tested in a real-world machine learning course:
- Live Deployment: Graded four major assessments for 24 students in a Spring 2026 course.
- Archived Benchmark: Re-graded 171 historical submissions from nine different lab assessments (spanning 2024–2026) to compare LLM scores against original human TA scores.
- Red-Team Benchmark: A synthetic dataset designed to test "prompt injection"—attempts by students to trick the AI into giving them a perfect score via hidden text or malicious instructions.
Key Insights and Ideas
- The "Slot Machine" Effect: One of the most critical findings was the importance of model temperature. Models that didn't support "zero-temperature" (deterministic) inference acted like slot machines, giving different grades to the same notebook on different runs. Stability is a prerequisite for fairness.
- Context is King: By grading questions in groups, the LLM could "forgive" a student for an early mistake if they followed through correctly on the subsequent logic, or conversely, catch a student whose final analysis didn't actually match their earlier data.
- Softening Works: The "softening pass" was essential for moving from "did the student do exactly what I did?" to "did the student do something scientifically sound?"
Key Results
- Human-Level Agreement: On a subset of homework, the system’s agreement with instructors ($\kappa = 0.87$) was actually slightly higher than the agreement between two human instructors ($\kappa = 0.77$).
- Stability: Using
gpt-4.1(at zero temperature), the system achieved a 65.2% exact match rate across five independent runs, with a maximum score variance of only 1 point. - Efficiency: Grading a full cohort cost roughly $0.11 per student and took minutes, compared to an estimated 10 hours of manual labor for a human instructor.
- Resilience: The system successfully resisted most prompt-injection attacks, thanks to "safety guardrails" that sanitize student input before it reaches the model.
Limitations and Future Work
While the results are promising, the authors note that open-ended interpretation remains the "final boss" of autograding. While the LLM is good at checking logic, truly subjective reasoning is still best handled by a human.
The study was also limited to a small class size (24 students). The next step is to see if this "path-aware" approach can scale to massive open online courses (MOOCs) where thousands of students might take thousands of different, valid paths through a single notebook. For now, the authors recommend keeping a human in the loop to review "low-confidence" flags—a hybrid approach that saves time without sacrificing pedagogical integrity.
Summary updated